svn commit: r17680 - trunk/src/argouml-app: src/org/argouml/uml/ui/foundation/core tests/org/argouml/uml/ui/foundation/core

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-12-19 02:19:28-0800
New Revision: 17680

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionSetFeatureOwnerScope.java
   trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java
   trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java

Log:
Allow ArgoUML UndoableAction to be used - fixing previously failing test to initialise profiles

Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionSetFeatureOwnerScope.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionSetFeatureOwnerScope.java?view=diff&pathrev=17680&r1=17679&r2=17680
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionSetFeatureOwnerScope.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionSetFeatureOwnerScope.java	2009-12-19 02:19:28-0800
@@ -30,8 +30,8 @@
 
 import org.argouml.i18n.Translator;
 import org.argouml.model.Model;
+import org.argouml.ui.UndoableAction;
 import org.argouml.uml.ui.UMLCheckBox2;
-import org.tigris.gef.undo.UndoableAction;
 
 /**
  * @since Nov 6, 2002
@@ -39,13 +39,10 @@
  */
 public class ActionSetFeatureOwnerScope extends UndoableAction {
 
-    private static final ActionSetFeatureOwnerScope SINGLETON =
-        new ActionSetFeatureOwnerScope();
-
     /**
      * Constructor for ActionSetElementOwnershipSpecification.
      */
-    protected ActionSetFeatureOwnerScope() {
+    public ActionSetFeatureOwnerScope() {
         super(Translator.localize("Set"), null);
         // Set the tooltip string:
         putValue(Action.SHORT_DESCRIPTION, 
@@ -65,12 +62,4 @@
             }
         }
     }
-
-    /**
-     * @return Returns the SINGLETON.
-     */
-    public static ActionSetFeatureOwnerScope getInstance() {
-        return SINGLETON;
-    }
-
 }

Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java?view=diff&pathrev=17680&r1=17679&r2=17680
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java	2009-12-19 02:19:28-0800
@@ -39,7 +39,7 @@
      */
     public UMLFeatureOwnerScopeCheckBox() {
         super(Translator.localize("checkbox.static-lc"),
-                ActionSetFeatureOwnerScope.getInstance(), "ownerScope");
+                new ActionSetFeatureOwnerScope(), "ownerScope");
     }
 
     /*

Modified: trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java?view=diff&pathrev=17680&r1=17679&r2=17680
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java	(original)
+++ trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestUMLFeatureOwnerScopeCheckBox.java	2009-12-19 02:19:28-0800
@@ -28,6 +28,7 @@
 import org.argouml.model.InitializeModel;
 
 import org.argouml.model.Model;
+import org.argouml.profile.init.InitProfileSubsystem;
 
 /**
  * @since Nov 6, 2002
@@ -59,6 +60,7 @@
     protected void setUp() throws Exception {
         super.setUp();
         InitializeModel.initializeDefault();
+        new InitProfileSubsystem().init();
         elem = Model.getCoreFactory().createAttribute();
 
 	box = new UMLFeatureOwnerScopeCheckBox();

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2431691

To unsubscribe from this discussion, e-mail: [[email protected]].
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.