Author: mvw
Date: 2007-06-22 10:26:51-0700
New Revision: 12890
Added:
trunk/src_new/org/argouml/moduleloader/InitModuleLoader.java (contents, props changed)
Modified:
trunk/src_new/org/argouml/application/Main.java
trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java
Log:
Remove dependency from org.argouml.moduleloader to org.argouml.ui.
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=12890&p1=trunk/src_new/org/argouml/application/Main.java&p2=trunk/src_new/org/argouml/application/Main.java&r1=12889&r2=12890
==============================================================================
--- trunk/src_new/org/argouml/application/Main.java (original)
+++ trunk/src_new/org/argouml/application/Main.java 2007-06-22 10:26:51-0700
@@ -65,6 +65,7 @@
import org.argouml.language.java.generator.GeneratorJava;
import org.argouml.model.Model;
import org.argouml.model.ModelImplementation;
+import org.argouml.moduleloader.InitModuleLoader;
import org.argouml.moduleloader.ModuleLoader2;
import org.argouml.notation.InitNotation;
import org.argouml.notation.ui.InitNotationUI;
@@ -403,7 +404,7 @@
// Initialize the module loader.
st.mark("modules");
- ModuleLoader2.doLoad(false);
+ initSubsystem(new InitModuleLoader());
st.mark("open window");
@@ -798,6 +799,9 @@
}
/**
+ * The use of this method in the top-level package
+ * prevents that the subsystem would depend on the GUI.
+ *
* @param subsystem the subsystem to be initialised
*/
private static void initSubsystem(InitSubsystem subsystem) {
Added: trunk/src_new/org/argouml/moduleloader/InitModuleLoader.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/moduleloader/InitModuleLoader.java?view=auto&rev=12890
==============================================================================
--- (empty file)
+++ trunk/src_new/org/argouml/moduleloader/InitModuleLoader.java 2007-06-22 10:26:51-0700
@@ -0,0 +1,57 @@
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.moduleloader;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.argouml.application.api.GUISettingsTabInterface;
+import org.argouml.application.api.InitSubsystem;
+
+/**
+ * Initialise this subsystem.
+ *
+ * @author Michiel
+ */
+public class InitModuleLoader implements InitSubsystem {
+
+ public List<GUISettingsTabInterface> getProjectSettingsTabs() {
+ return Collections.emptyList();
+ }
+
+ public List<GUISettingsTabInterface> getSettingsTabs() {
+ List<GUISettingsTabInterface> result =
+ new ArrayList<GUISettingsTabInterface>();
+ result.add(new SettingsTabModules());
+ return result;
+ }
+
+ public void init() {
+ ModuleLoader2.getInstance();
+ ModuleLoader2.doLoad(false);
+ }
+
+}
Modified: trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java?view=diff&rev=12890&p1=trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java&p2=trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java&r1=12889&r2=12890
==============================================================================
--- trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java (original)
+++ trunk/src_new/org/argouml/moduleloader/ModuleLoader2.java 2007-06-22 10:26:51-0700
@@ -51,7 +51,6 @@
import org.apache.log4j.Logger;
import org.argouml.application.api.Argo;
import org.argouml.i18n.Translator;
-import org.argouml.ui.GUI;
/**
* This is the module loader that loads modules implementing the
@@ -109,7 +108,6 @@
*/
private ModuleLoader2() {
moduleStatus = new HashMap<ModuleInterface, ModuleStatus>();
- GUI.getInstance().addSettingsTab(new SettingsTabModules());
}
/**
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.