Author: linus
Date: 2010-04-17 02:35:52-0700
New Revision: 18270

Removed:
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionList.java
Modified:
   branches/BRANCH_0_30_x/   (props changed)
   branches/BRANCH_0_30_x/src/argouml-app/   (props changed)
   branches/BRANCH_0_30_x/src/argouml-app/tests/org/argouml/profile/   (props 
changed)
   
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
   
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java

Log:
Merging rev 18210 and 18211 from trunk for Issue 6046.

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java?view=diff&pathrev=18270&r1=18269&r2=18270
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
  (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
  2010-04-17 02:35:52-0700
@@ -520,6 +520,7 @@
         validContainmentMap.put(ActionSequence.class, 
                 new Class<?>[] { 
                     TemplateParameter.class,
+                    CreateAction.class, DestroyAction.class, SendAction.class, 
TerminateAction.class, UninterpretedAction.class, ActionSequence.class,
                     Argument.class
                 });
         
@@ -873,9 +874,13 @@
     
     private void setNewAction(Object container, Action action) {
         if (container instanceof Transition) {
-            ((Transition) container).setEffect((Action) action);
+            ((Transition) container).setEffect(action);
+        } else if (container instanceof State) {
+            ((State) container).setEntry(action);
+        } else if (container instanceof ActionSequence) {
+            ((ActionSequence) container).getAction().add(action);
         } else {
-            ((State) container).setEntry((Action) action);
+            throw new IllegalArgumentException("Did not expect a " + 
container);
         }
     }
     

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml?view=diff&pathrev=18270&r1=18269&r2=18270
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
       (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
       2010-04-17 02:35:52-0700
@@ -1966,8 +1966,7 @@
   </panel>
   <panel name="ActionSequence">
     <text name="name" type="Name" />
-    <list name="action" type="Action" />
-    
+    <list name="action" 
type="org.omg.uml.behavioralelements.commonbehavior.CallAction,org.omg.uml.behavioralelements.commonbehavior.CreateAction,org.omg.uml.behavioralelements.commonbehavior.DestroyAction,org.omg.uml.behavioralelements.commonbehavior.ReturnAction,org.omg.uml.behavioralelements.commonbehavior.SendAction,org.omg.uml.behavioralelements.commonbehavior.TerminateAction,org.omg.uml.behavioralelements.commonbehavior.UninterpretedAction,org.omg.uml.behavioralelements.commonbehavior.ActionSequence"
 />
     <debug />
     <attribute name="visibility" type="VisibilityKind" />
     <attribute name="modifiers">

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java?view=diff&pathrev=18270&r1=18269&r2=18270
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
    (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java
    2010-04-17 02:35:52-0700
@@ -89,6 +89,7 @@
         addGetterSetter("reception", new ReceptionGetterSetter());
         addGetterSetter("deferrableEvent", new DeferrableEventGetterSetter());
         addGetterSetter("entry", new EntryActionGetterSetter());
+        addGetterSetter("action", new ActionGetterSetter());
         
         // UML2 only
         addGetterSetter("ownedOperation", new FeatureGetterSetter());
@@ -1060,6 +1061,30 @@
         }
     }
     
+    private class ActionGetterSetter extends ListGetterSetter {
+        
+        public Collection getOptions(Object modelElement, String type) {
+            return Model.getFacade().getActions(modelElement);
+        }
+      
+        public Object get(Object modelElement, String type) {
+            // not needed
+            return null;
+        }
+      
+        public void set(Object element, Object x) {
+            // not needed
+        }
+
+        public boolean isValidElement(Object element, String type) {
+            return getOptions(element, type).contains(element);
+        }
+        
+        public Object getMetaType() {
+            return Model.getMetaTypes().getAction();
+        }
+    }
+    
     private class TemplateParameterGetterSetter extends ListGetterSetter {
         
         public Collection getOptions(Object modelElement, String type) {

Modified: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java?view=diff&pathrev=18270&r1=18269&r2=18270
==============================================================================
--- 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
   (original)
+++ 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java
   2010-04-17 02:35:52-0700
@@ -60,10 +60,7 @@
         JComponent list = null;
         DefaultListModel model = null;
         
-        if ("action".equals(propName)) {
-            model = new UMLActionSequenceActionListModel(modelElement);
-            list = new OldScrollList(new 
UMLActionSequenceActionList((UMLModelElementListModel) model));     
-        } else if ("annotatedElement".equals(propName)) {
+        if ("annotatedElement".equals(propName)) {
             model = new UMLCommentAnnotatedElementListModel(modelElement);
         } else if ("association".equals(propName)) {
             model = new UMLClassifierAssociationEndListModel(modelElement);

Removed: 
branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionList.java
Url: 
http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_30_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionList.java?view=markup&pathrev=18269

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

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

Reply via email to