svn commit: r13678 - trunk/src_new/org/argouml: ui/cmd uml/diagram/static_structure/ui uml/ui/foundation/core

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-10-11 01:39:45-0700
New Revision: 13678

Modified:
   trunk/src_new/org/argouml/ui/cmd/ActionNew.java
   trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java
   trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java

Log:
More cleanup of deprecated method usage

Modified: trunk/src_new/org/argouml/ui/cmd/ActionNew.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/cmd/ActionNew.java?view=diff&rev=13678&p1=trunk/src_new/org/argouml/ui/cmd/ActionNew.java&p2=trunk/src_new/org/argouml/ui/cmd/ActionNew.java&r1=13677&r2=13678
==============================================================================
--- trunk/src_new/org/argouml/ui/cmd/ActionNew.java	(original)
+++ trunk/src_new/org/argouml/ui/cmd/ActionNew.java	2007-10-11 01:39:45-0700
@@ -80,7 +80,7 @@
         TargetManager.getInstance().cleanHistory();
         p.remove();
         p = ProjectManager.getManager().makeEmptyProject();
-        TargetManager.getInstance().setTarget(p.getDiagrams().toArray()[0]);
+        TargetManager.getInstance().setTarget(p.getDiagramList().get(0));
         Designer.enableCritiquing();
         Model.getPump().startPumpingEvents();
     }
@@ -89,4 +89,4 @@
      * The UID.
      */
     private static final long serialVersionUID = -3943153836514178100L;
-} /* end class ActionNew */
+} 

Modified: trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java?view=diff&rev=13678&p1=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java&p2=trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java&r1=13677&r2=13678
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/static_structure/ui/FigFeature.java	2007-10-11 01:39:45-0700
@@ -49,6 +49,7 @@
  */
 public abstract class FigFeature extends CompartmentFigText {
 
+    // TODO: for UML 2.x this is isStatic
     private static final String EVENT_NAME = "ownerScope";
     
     private static class SelectionFeature extends Selection {
@@ -105,8 +106,7 @@
         super.setOwner(owner);
         
         if (owner != null) {
-            updateOwnerScope(Model.getScopeKind().getClassifier().equals(
-                    Model.getFacade().getOwnerScope(owner)));
+            updateOwnerScope(Model.getFacade().isStatic(owner));
             Model.getPump().addModelEventListener(this, owner, EVENT_NAME);
         }
     }
@@ -128,6 +128,7 @@
     public void propertyChange(PropertyChangeEvent pce) {
         super.propertyChange(pce);
         if (EVENT_NAME.equals(pce.getPropertyName())) {
+            // TODO: This needs to be modified for UML 2.x
             updateOwnerScope(Model.getScopeKind().getClassifier().equals(
                     pce.getNewValue()));    
         }

Modified: trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java?view=diff&rev=13678&p1=trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java&r1=13677&r2=13678
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java	(original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/core/UMLFeatureOwnerScopeCheckBox.java	2007-10-11 01:39:45-0700
@@ -46,14 +46,7 @@
      * @see org.argouml.uml.ui.UMLCheckBox2#buildModel()
      */
     public void buildModel() {
-        Object scope = Model.getFacade().getOwnerScope(getTarget());
-        if (scope != null
-                && scope.equals(
-                        Model.getScopeKind().getClassifier())) {
-            setSelected(true);
-        } else {
-            setSelected(false);
-        }
+        setSelected(Model.getFacade().isStatic(getTarget()));
     }
 
 }
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.