Author: bobtarling
Date: 2011-05-18 15:22:07-0700
New Revision: 19459

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

Log:
Don't generate notation for a model element that is not a NamedElement

Modified: 
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java?view=diff&pathrev=19459&r1=19458&r2=19459
==============================================================================
--- 
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java   
    (original)
+++ 
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java   
    2011-05-18 15:22:07-0700
@@ -249,11 +249,13 @@
             if (edgePort != null) {
                 edgePort.setOwner(getOwner());
             }
-            NotationName nn = Notation.findNotation(
-                    settings.getNotationSettings().getNotationLanguage());
-            notationProviderName =
-                NotationProviderFactory2.getInstance().getNotationProvider(
-                        getNotationProviderType(), element, this, nn);
+            if (Model.getFacade().isANamedElement(element)) {
+                NotationName nn = Notation.findNotation(
+                        settings.getNotationSettings().getNotationLanguage());
+                notationProviderName =
+                    NotationProviderFactory2.getInstance().getNotationProvider(
+                            getNotationProviderType(), element, this, nn);
+            }
 
             addElementListener(element, "remove");
         }
@@ -992,8 +994,8 @@
         /* This should NOT be looking for a NamedElement, 
          * since this is not always about the name of this 
          * modelelement alone.*/
-        if (Model.getFacade().isAModelElement(own)) {
-            NotationName notation = Notation.findNotation(
+        if (Model.getFacade().isANamedElement(own)) {
+            final NotationName notation = Notation.findNotation(
                     getNotationSettings().getNotationLanguage());
             notationProviderName =
                 NotationProviderFactory2.getInstance().getNotationProvider(

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

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to