svn commit: r13790 - trunk/src_new/org/argouml/uml/diagram/ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-11-19 12:52:17-0800
New Revision: 13790

Modified:
   trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java
   trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java

Log:
Fix for the exception mentioned in desc8 of issue4912.

Modified: trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java?view=diff&rev=13790&p1=trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java&r1=13789&r2=13790
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/ArgoFigGroup.java	2007-11-19 12:52:17-0800
@@ -76,8 +76,9 @@
             Editor editor = Globals.curEditor();
             if (editor == null) {
                 // TODO: The above doesn't work reliably in a constructor.  We
-                // need a better way of getting default fig settings for the owning
-                // project rather than using the project manager singleton. - tfm
+                // need a better way of getting default fig settings 
+                // for the owning project rather than using the 
+                // project manager singleton. - tfm
                 return ProjectManager.getManager().getCurrentProject();
             }
             Layer lay = editor.getLayerManager().getActiveLayer();
@@ -85,6 +86,9 @@
                 layer = (LayerPerspective) lay;
             }
         }
+        if (layer == null) {
+            return null;
+        }
         UMLMutableGraphSupport gm = 
             (UMLMutableGraphSupport) layer.getGraphModel();
         return gm.getProject();

Modified: trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&rev=13790&p1=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&r1=13789&r2=13790
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2007-11-19 12:52:17-0800
@@ -2032,8 +2032,9 @@
             Editor editor = Globals.curEditor();
             if (editor == null) {
                 // TODO: The above doesn't work reliably in a constructor.  We
-                // need a better way of getting default fig settings for the owning
-                // project rather than using the project manager singleton. - tfm
+                // need a better way of getting default fig settings 
+                // for the owning project rather than using the 
+                // project manager singleton. - tfm
                 return ProjectManager.getManager().getCurrentProject();
             }
             Layer lay = editor.getLayerManager().getActiveLayer();
@@ -2041,6 +2042,9 @@
                 layer = (LayerPerspective) lay;
             }
         }
+        if (layer == null) {
+            return null;
+        }
 	UMLMutableGraphSupport gm = 
 	    (UMLMutableGraphSupport) layer.getGraphModel();
 	return gm.getProject();
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.