svn commit: r16998 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Christian López Espínola <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: penyaskito
Date: 2009-03-29 16:52:56-0700
New Revision: 16998

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Log:
Only call isConcurrent when the target is a CompositeState, avoiding exceptions.

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java?view=diff&pathrev=16998&r1=16997&r2=16998
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	2009-03-29 16:52:56-0700
@@ -141,13 +141,15 @@
         }
         // there are other cases that need special treatment, 
         // like concurrent regions
-        if (Model.getFacade().isAConcurrentRegion(target)) {
-            title = Translator.localize("label.concurrent.region");
-        } else if (Model.getFacade().isConcurrent(target)) {
-            title = Translator.localize("label.concurrent.composite.state");
-        } else if (!Model.getFacade().isASubmachineState(target)) {
-            // PropPanelSubmachine is a subclass that handles its own title
-            title = Translator.localize("label.composite-state");
+        if (Model.getFacade().isACompositeState(target)) {
+            if (Model.getFacade().isAConcurrentRegion(target)) {
+                title = Translator.localize("label.concurrent.region");
+            } else if (Model.getFacade().isConcurrent(target)) {
+                title = Translator.localize("label.concurrent.composite.state");
+            } else if (!Model.getFacade().isASubmachineState(target)) {
+                // PropPanelSubmachine is a subclass that handles its own title
+                title = Translator.localize("label.composite-state");
+            }
         }
         else {
             title = Model.getMetaTypes().getName(target);

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

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.