svn commit: r19464 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2011-05-19 00:22:25-0700
New Revision: 19464

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java

Log:
Handle non-named items

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java?view=diff&pathrev=19464&r1=19463&r2=19464
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java	2011-05-19 00:22:25-0700
@@ -203,7 +203,22 @@
     public List<String> getPathList(Object element) {
         // TODO: Needs completing - stub implementation only! - tfm
         List<String> path = new ArrayList<String>();
-        path.add(modelImpl.getFacade().getName(element));
+        String name;
+        if (modelImpl.getFacade().isANamedElement(element)) {
+            name = modelImpl.getFacade().getName(element);
+        } else {
+            // TODO: Some elements such as Generalization are
+            // no longer named.  For a transitional period we'll
+            // return a String so debug can continue, but the
+            // calling code should probably be fixed. - tfm 20070607
+            // Bob says - these are the comments that were in
+            // FacadeEUMLImpl.getName. Same trick is needed here
+            // for now.
+            name = modelImpl.getFacade().getUMLClassName(element)
+                + " <not nameable>"; //$NON-NLS-1$
+        }
+
+        path.add(name);
         return path;
     }

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

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.