svn commit: r17111 - trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2009-04-13 11:58:52-0700
New Revision: 17111

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigFeature.java

Log:
Remove remaining uses of ArgoFig.setOwner().  Reintroduce method implementations in top level Argo Fig classes that throws UnsupportedOperationException to catch any future uses.

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java?view=diff&pathrev=17111&r1=17110&r2=17111
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java	2009-04-13 11:58:52-0700
@@ -77,9 +77,9 @@
         settings = theSettings;
 
         if (element != null) {
-            setOwner(element);
+            super.setOwner(element);
         } else {
-            setOwner(new CommentEdge());
+            super.setOwner(new CommentEdge());
         }
         
         setBetweenNearestPoints(true);
@@ -285,4 +285,21 @@
     public ItemUID getItemUID() {
         return itemUid;
     }
+    
+
+    /**
+     * Setting the owner of the Fig must be done in the constructor and not
+     * changed afterwards for all ArgoUML figs.
+     * 
+     * @param owner owning UML element
+     * @deprecated for 0.27.3 by tfmorris. Set owner in constructor. This method
+     *             is implemented in GEF, so we'll leave this implementation
+     *             here to block any attempts to use it within ArgoUML.
+     */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    public void setOwner(Object owner) {
+        throw new UnsupportedOperationException(
+                "Owner must be set in constructor and left unchanged");
+    }
 } 

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigFeature.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigFeature.java?view=diff&pathrev=17111&r1=17110&r2=17111
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigFeature.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigFeature.java	2009-04-13 11:58:52-0700
@@ -98,20 +98,6 @@
         Model.getPump().addModelEventListener(this, owner, EVENT_NAME);
     }
 
-    /*
-     * @see org.argouml.uml.diagram.ui.FigSingleLineText#setOwner(java.lang.Object)
-     */
-    @SuppressWarnings("deprecation")
-    @Deprecated
-    @Override
-    public void setOwner(Object owner) {
-        super.setOwner(owner);
-        
-        if (owner != null) {
-            updateOwnerScope(Model.getFacade().isStatic(owner));
-            Model.getPump().addModelEventListener(this, owner, EVENT_NAME);
-        }
-    }
 
     /*
      * @see org.argouml.uml.diagram.ui.FigSingleLineText#removeFromDiagram()

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

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.