Author: mvw
Date: 2008-01-14 14:10:47-0800
New Revision: 14043
Modified:
trunk/src_new/org/argouml/application/Main.java
Log:
As discussed on the dev list: ArgouML shall initialise the Gui BEFORE the Modules are initialised.
See also issue 4752 and issue 4952.
Modified: trunk/src_new/org/argouml/application/Main.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/application/Main.java?view=diff&rev=14043&p1=trunk/src_new/org/argouml/application/Main.java&p2=trunk/src_new/org/argouml/application/Main.java&r1=14042&r2=14043
==============================================================================
--- trunk/src_new/org/argouml/application/Main.java (original)
+++ trunk/src_new/org/argouml/application/Main.java 2008-01-14 14:10:47-0800
@@ -125,9 +125,6 @@
private static String theTheme;
- private static boolean preInitialized = false;
- private static boolean initialized = false;
-
/**
* The main entry point of ArgoUML.
* @param args command line parameters
@@ -248,27 +245,23 @@
private static void initPreinitialize() {
- if (!preInitialized) {
- preInitialized = true;
- checkJVMVersion();
- checkHostsFile();
-
- // Force the configuration to load
- Configuration.load();
-
- // Synchronize the startup directory
- String directory = Argo.getDirectory();
- org.tigris.gef.base.Globals.setLastDirectory(directory);
-
- initVersion();
- initTranslator();
-
- // then, print out some version info for debuggers...
- org.argouml.util.Tools.logVersionInfo();
- setSystemProperties();
- }
- }
+ checkJVMVersion();
+ checkHostsFile();
+ // Force the configuration to load
+ Configuration.load();
+
+ // Synchronize the startup directory
+ String directory = Argo.getDirectory();
+ org.tigris.gef.base.Globals.setLastDirectory(directory);
+
+ initVersion();
+ initTranslator();
+
+ // then, print out some version info for debuggers...
+ org.argouml.util.Tools.logVersionInfo();
+ setSystemProperties();
+ }
private static void initTranslator() {
@@ -383,45 +376,43 @@
SplashScreen splash) {
ProjectBrowser pb = null;
- if (!initialized) {
- initialized = true;
+ st.mark("initialize model subsystem");
+ initModel();
+ updateProgress(splash, 5, "statusmsg.bar.model-subsystem");
+
+ st.mark("initialize the profile subsystem");
+ new InitProfileSubsystem().init();
+
+ // Initialize the Java code generator. (why so early? - tfm)
+ GeneratorJava.getInstance();
+
+ // The reason the gui is initialized before the commands are run
+ // is that some of the commands will use the projectbrowser.
+ st.mark("initialize gui");
+ pb = initializeGUI(splash);
+
+ st.mark("initialize subsystems");
+ SubsystemUtility.initSubsystem(new InitUiCmdSubsystem());
+ SubsystemUtility.initSubsystem(new InitNotationUI());
+ SubsystemUtility.initSubsystem(new InitNotation());
+ SubsystemUtility.initSubsystem(new InitNotationUml());
+ SubsystemUtility.initSubsystem(new InitNotationJava());
+ SubsystemUtility.initSubsystem(new InitDiagramAppearanceUI());
+ SubsystemUtility.initSubsystem(new InitUmlUI());
+ SubsystemUtility.initSubsystem(new InitCheckListUI());
+ SubsystemUtility.initSubsystem(new InitCognitiveUI());
+
+ /*
+ * Initialize the module loader. At least the plug-ins that provide
+ * profiles need to be initialized before the project is loaded,
+ * because some of these profile may have been set as default
+ * profiles and need to be applied to the project as soon as it has
+ * been created or loaded. The first instance of a Project is needed
+ * during the GUI initialization.
+ */
+ st.mark("initialize modules");
+ SubsystemUtility.initSubsystem(new InitModuleLoader());
- st.mark("initialize model subsystem");
- initModel();
- updateProgress(splash, 5, "statusmsg.bar.model-subsystem");
-
- st.mark("initialize the profile subsystem");
- new InitProfileSubsystem().init();
-
- /*
- * Initialize the module loader. At least the plug-ins that provide
- * profiles need to be initialized before the project is loaded,
- * because some of these profile may have been set as default
- * profiles and need to be applied to the project as soon as it has
- * been created or loaded. the first instance of a Project is needed
- * during the gui initialization
- */
- st.mark("modules");
- SubsystemUtility.initSubsystem(new InitModuleLoader());
-
- // Initialize the Java code generator. (why so early? - tfm)
- GeneratorJava.getInstance();
-
- // The reason the gui is initialized before the commands are run
- // is that some of the commands will use the projectbrowser.
- st.mark("initialize gui");
- pb = initializeGUI(splash);
-
- SubsystemUtility.initSubsystem(new InitUiCmdSubsystem());
- SubsystemUtility.initSubsystem(new InitNotationUI());
- SubsystemUtility.initSubsystem(new InitNotation());
- SubsystemUtility.initSubsystem(new InitNotationUml());
- SubsystemUtility.initSubsystem(new InitNotationJava());
- SubsystemUtility.initSubsystem(new InitDiagramAppearanceUI());
- SubsystemUtility.initSubsystem(new InitUmlUI());
- SubsystemUtility.initSubsystem(new InitCheckListUI());
- SubsystemUtility.initSubsystem(new InitCognitiveUI());
- }
return pb;
}
@@ -635,9 +626,9 @@
* @param list The commands, a list of strings.
*/
public static void performCommands(List<String> list) {
- initPreinitialize();
- initializeSubsystems(new SimpleTimer(), null);
- ArgoFrame.getInstance().setVisible(true);
+// initPreinitialize();
+// initializeSubsystems(new SimpleTimer(), null);
+// ArgoFrame.getInstance().setVisible(true);
performCommandsInternal(list);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.