svn commit: r16448 - trunk/src/argouml-app/src/org/argouml/uml/diagram: activity/ui state/ui

Michiel van der Wulp <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2008-12-28 01:50:20-0800
New Revision: 16448

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigActionState.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java
   trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java

Log:
This fixes the failing test in TestProject.
But we really need to think about the notation-provider initialisation and refresh...

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigActionState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigActionState.java?view=diff&pathrev=16448&r1=16447&r2=16448
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigActionState.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigActionState.java	2008-12-28 01:50:20-0800
@@ -306,7 +306,9 @@
      */
     @Override
     public void removeFromDiagramImpl() {
-        notationProvider.cleanListener(this, getOwner());
+        if (notationProvider != null) {
+            notationProvider.cleanListener(this, getOwner());
+        }
         super.removeFromDiagramImpl();
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java?view=diff&pathrev=16448&r1=16447&r2=16448
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigState.java	2008-12-28 01:50:20-0800
@@ -176,7 +176,9 @@
      */
     @Override
     public void removeFromDiagramImpl() {
-        notationProviderBody.cleanListener(this, getOwner());
+        if (notationProviderBody != null) {
+            notationProviderBody.cleanListener(this, getOwner());
+        }
         super.removeFromDiagramImpl();
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java?view=diff&pathrev=16448&r1=16447&r2=16448
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/FigTransition.java	2008-12-28 01:50:20-0800
@@ -139,7 +139,7 @@
         super.setLayer(lay);
 
         /* This presumes that the layer is set after the owner: */
-        if (getOwner() != null) {
+        if (getLayer() != null && getOwner() != null) {
             initPorts();
         }
     }
@@ -151,11 +151,14 @@
         super.setOwner(owner);
 
         /* This presumes that the owner is set after the layer: */
-        if (getLayer() != null) {
+        if (getLayer() != null && getOwner() != null) {
             initPorts();
         }
     }
 
+    /**
+     * TODO: This needs documentation! Is this really needed? Why?
+     */
     private void initPorts() {
         Object sourceSV = Model.getFacade().getSource(getOwner());
         Object destSV = Model.getFacade().getTarget(getOwner());

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

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.