svn commit: r18408 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2010-05-28 00:47:15-0700
New Revision: 18408

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

Log:
UML2: don't create components as subsystems (moving subsystem case to the end in the buildNode method)

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java?view=diff&pathrev=18408&r1=18407&r2=18408
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	2010-05-28 00:47:15-0700
@@ -268,8 +268,6 @@
         } else if (elementType == metaTypes.getInstance()) {
             throw new IllegalArgumentException(
                     "Attempt to instantiate abstract type"); //$NON-NLS-1$
-        } else if (elementType == metaTypes.getSubsystem()) {
-            o = modelImpl.getModelManagementFactory().createSubsystem();
         } else if (elementType == metaTypes.getCallState()) {
             o = modelImpl.getActivityGraphsFactory().createCallState();
         } else if (elementType == metaTypes.getSimpleState()) {
@@ -336,6 +334,10 @@
             o = modelImpl.getUseCasesFactory().createExtensionPoint();
         } else if (elementType == metaTypes.getReception()) {
             o = modelImpl.getCommonBehaviorFactory().createReception();
+        } else if (elementType == metaTypes.getSubsystem()) {
+            // in UML2 subsystem is a Component with <<subsystem>> stereotype
+            // so this must occur after the metaTypes.getComponent() case
+            o = modelImpl.getModelManagementFactory().createSubsystem();
         }
         if (!(o instanceof EObject)) {
             throw new IllegalArgumentException(

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

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.