svn commit: r16880 - trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java

Michiel van der Wulp <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2009-03-11 14:45:42-0700
New Revision: 16880

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java

Log:
The given patch for issue 5719 that fixes this issue: "NPE when pressing new project if there is a swimlane".

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&pathrev=16880&r1=16879&r2=16880
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2009-03-11 14:45:42-0700
@@ -1509,7 +1509,9 @@
         }
         super.setOwner(owner);
         nameFig.setOwner(owner); // for setting abstract
-        getStereotypeFig().setOwner(owner);
+        if (getStereotypeFig() != null) {
+            getStereotypeFig().setOwner(owner);
+        }
         initNotationProviders(owner);
         readyToEdit = true;
         renderingChanged();
@@ -1577,7 +1579,9 @@
                     + this.getClass());
             return;
         }
-        getStereotypeFig().populate();
+        if (getStereotypeFig() != null) {
+            getStereotypeFig().populate();
+        }
     }
 
     /**
@@ -1819,7 +1823,9 @@
 	 
 	boolean hiding = 
 	    practicalView == DiagramAppearance.STEREOTYPE_VIEW_SMALL_ICON;
-	getStereotypeFig().setHidingStereotypesWithIcon(hiding);
+        if (getStereotypeFig() != null) {
+            getStereotypeFig().setHidingStereotypesWithIcon(hiding);
+        }
 
         if (practicalView == DiagramAppearance.STEREOTYPE_VIEW_BIG_ICON) {
 
@@ -1965,7 +1971,9 @@
         setShadowSize(0);
         super.removeFromDiagram();
         // Get model listeners removed:
-        getStereotypeFig().removeFromDiagram();
+        if (getStereotypeFig() != null) {
+            getStereotypeFig().removeFromDiagram();
+        }
     }
 
     /**

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

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.