diff options
author | khussey | 2006-05-15 22:29:41 +0000 |
---|---|---|
committer | khussey | 2006-05-15 22:29:41 +0000 |
commit | 0efe7e95230583b8f8583c2aa10703b5409216a1 (patch) | |
tree | df87e92b6067dfd7d5e3ac9ab043ea22ee275f87 /plugins | |
parent | c60ceecdcb45928a3e9b981a81f24d45c57a4389 (diff) | |
download | org.eclipse.uml2.test-0efe7e95230583b8f8583c2aa10703b5409216a1.tar.gz org.eclipse.uml2.test-0efe7e95230583b8f8583c2aa10703b5409216a1.tar.xz org.eclipse.uml2.test-0efe7e95230583b8f8583c2aa10703b5409216a1.zip |
[141857] Updating migration based on changes to action input/output ownership.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java | 63 |
1 files changed, 24 insertions, 39 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java index 544c662c..b2a29847 100644 --- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java +++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java @@ -8,7 +8,7 @@ * Contributors: * IBM - initial API and implementation * - * $Id: UML22UMLResourceHandler.java,v 1.20 2006/05/12 03:56:59 khussey Exp $ + * $Id: UML22UMLResourceHandler.java,v 1.21 2006/05/15 22:29:41 khussey Exp $ */ package org.eclipse.uml2.uml.resource; @@ -651,14 +651,10 @@ public class UML22UMLResourceHandler "argument", true); //$NON-NLS-1$ if (value instanceof InputPin) { - InputPin inputPin = (InputPin) value; - - doSwitch(inputPin); - - ((CallBehaviorAction) interactionUse.createArgument( - inputPin.getName(), - UMLPackage.Literals.CALL_BEHAVIOR_ACTION)) - .getArguments().add(inputPin); + ((OpaqueAction) interactionUse.createArgument( + ((InputPin) value).getName(), + UMLPackage.Literals.OPAQUE_ACTION)) + .getInputValues().add(value); } } @@ -1084,43 +1080,30 @@ public class UML22UMLResourceHandler AnyType extension = getExtension(resource, opaqueAction); if (extension != null) { - Activity activity = opaqueAction.getActivity(); - - if (activity != null) { - Object value = getValue(extension.getMixed(), - "duration", true); //$NON-NLS-1$ - - if (value instanceof Duration) { - Duration duration = (Duration) value; - - doSwitch(duration); - - ValuePin inputValue = (ValuePin) activity - .createNode(duration.getName(), - UMLPackage.Literals.VALUE_PIN); - - inputValue.setType(duration.getType()); - inputValue.setValue(duration); + Object value = getValue(extension.getMixed(), + "duration", true); //$NON-NLS-1$ - opaqueAction.getInputValues().add(inputValue); - } + if (value instanceof Duration) { + Duration duration = (Duration) value; - value = getValue(extension.getMixed(), "now", true); //$NON-NLS-1$ + ValuePin inputValue = (ValuePin) opaqueAction + .createInputValue(duration.getName(), duration + .getType(), UMLPackage.Literals.VALUE_PIN); - if (value instanceof TimeExpression) { - TimeExpression timeExpression = (TimeExpression) value; + inputValue.setValue(duration); + } - doSwitch(timeExpression); + value = getValue(extension.getMixed(), "now", true); //$NON-NLS-1$ - ValuePin inputValue = (ValuePin) activity - .createNode(timeExpression.getName(), - UMLPackage.Literals.VALUE_PIN); + if (value instanceof TimeExpression) { + TimeExpression timeExpression = (TimeExpression) value; - inputValue.setType(timeExpression.getType()); - inputValue.setValue(timeExpression); + ValuePin inputValue = (ValuePin) opaqueAction + .createInputValue(timeExpression.getName(), + timeExpression.getType(), + UMLPackage.Literals.VALUE_PIN); - opaqueAction.getInputValues().add(inputValue); - } + inputValue.setValue(timeExpression); } } @@ -1485,6 +1468,8 @@ public class UML22UMLResourceHandler if (eObject instanceof ParameterableElement) { ParameterableElement parameterableElement = (ParameterableElement) eObject; + doSwitch(parameterableElement); + String id = resource.getID(templateParameter); if (parameterableElement instanceof Classifier) { |