Commit ad2634fd authored by Martti Käärik's avatar Martti Käärik
Browse files

Added data use editing capabilities to member assignment.

Change-Id: Ibe673a717b70a8f33e1731a85100a94d5175702b
parent 7c8dfa90
......@@ -1931,6 +1931,20 @@
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool_1:SelectionWizardDescription" name="createDataInstanceUseGeneric" label="Data Instance Use" precondition="[oclIsKindOf(MemberAssignment)/]" candidatesExpression="[getDataInstances()/]">
<element name="element"/>
<containerView name="containerView"/>
<container name="container"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="[self/]">
<subModelOperations xsi:type="tool_1:ExternalJavaAction" name="createDataInstanceUseGenericAction" id="org.etsi.mts.tdl.graphical.viewpoint.createAction">
<parameters name="target" value="[container/]"/>
<parameters name="element" value="[element/]"/>
<parameters name="class" value="DataInstanceUse"/>
</subModelOperations>
</firstModelOperations>
</initialOperation>
</ownedTools>
</toolSections>
</defaultLayer>
</ownedRepresentations>
......@@ -1940,7 +1954,7 @@
<ownedJavaExtensions qualifiedClassName="org.etsi.mts.tdl.graphical.extensions.BehaviourModifications"/>
</ownedViewpoints>
<extensions xsi:type="properties:ViewExtensionDescription" identifier="org.eclipse.sirius.ui.properties">
<pages identifier="org.eclipse.sirius.ui.properties.defaultpage" labelExpression="aql:self.className()" semanticCandidateExpression="aql:input.getAllSemanticElements()" groups="//@extensions.0/@groups.1 //@extensions.0/@groups.2 //@extensions.0/@groups.3 //@extensions.0/@groups.4 //@extensions.0/@groups.5 //@extensions.0/@groups.6 //@extensions.0/@groups.8 //@extensions.0/@groups.7 //@extensions.0/@groups.9 //@extensions.0/@groups.0"/>
<pages identifier="org.eclipse.sirius.ui.properties.defaultpage" labelExpression="aql:self.className()" semanticCandidateExpression="aql:input.getAllSemanticElements()" groups="//@extensions.0/@groups.1 //@extensions.0/@groups.2 //@extensions.0/@groups.3 //@extensions.0/@groups.4 //@extensions.0/@groups.5 //@extensions.0/@groups.6 //@extensions.0/@groups.8 //@extensions.0/@groups.7 //@extensions.0/@groups.9 //@extensions.0/@groups.10 //@extensions.0/@groups.0"/>
<groups identifier="org.eclipse.sirius.ui.properties.defaultgroup" labelExpression="Properties" semanticCandidateExpression="var:self" preconditionExpression="">
<controls xsi:type="properties:DynamicMappingFor" iterator="eStructuralFeature" iterableExpression="aql:input.emfEditServices(self).getEStructuralFeatures()">
<ifs predicateExpression="aql:input.emfEditServices(self).needsTextWidget(eStructuralFeature) and not input.emfEditServices(self).isMultiline(eStructuralFeature)">
......@@ -2107,5 +2121,17 @@
</initialOperation>
</controls>
</groups>
<groups identifier="org.etsi.mts.tdl.properties.memberAssignmentGroup" labelExpression="TDL Properties" domainClass="tdl.MemberAssignment" semanticCandidateExpression="var:self">
<controls xsi:type="properties:TextAreaDescription" identifier="memberSpec" labelExpression="Value" valueExpression="aql:self.serialise(self.memberSpec)" lineCount="3">
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:self">
<subModelOperations xsi:type="tool_1:ExternalJavaAction" name="parseMessageArgumentAction" id="org.etsi.mts.tdl.graphical.viewpoint.parseAction">
<parameters name="element" value="var:self"/>
<parameters name="newValue" value="var:newValue"/>
</subModelOperations>
</firstModelOperations>
</initialOperation>
</controls>
</groups>
</extensions>
</description:Group>
......@@ -29,11 +29,13 @@ import org.etsi.mts.tdl.FunctionCall;
import org.etsi.mts.tdl.GateReference;
import org.etsi.mts.tdl.Interaction;
import org.etsi.mts.tdl.LocalExpression;
import org.etsi.mts.tdl.MemberAssignment;
import org.etsi.mts.tdl.Message;
import org.etsi.mts.tdl.MultipleCombinedBehaviour;
import org.etsi.mts.tdl.ParallelBehaviour;
import org.etsi.mts.tdl.PeriodicBehaviour;
import org.etsi.mts.tdl.SingleCombinedBehaviour;
import org.etsi.mts.tdl.StaticDataUse;
import org.etsi.mts.tdl.Target;
import org.etsi.mts.tdl.TestDescription;
import org.etsi.mts.tdl.TestDescriptionReference;
......@@ -277,6 +279,8 @@ public class CreateAction implements IExternalJavaAction {
((TimeOperation) target).setPeriod(dataUse);
else if (target instanceof TimeConstraint)
((TimeConstraint) target).setTimeConstraintExpression(dataUse);
else if (target instanceof MemberAssignment)
((MemberAssignment) target).setMemberSpec((StaticDataUse) dataUse);
}
@Override
......
......@@ -24,8 +24,10 @@ import org.etsi.mts.tdl.Block;
import org.etsi.mts.tdl.BoundedLoopBehaviour;
import org.etsi.mts.tdl.DataUse;
import org.etsi.mts.tdl.LocalExpression;
import org.etsi.mts.tdl.MemberAssignment;
import org.etsi.mts.tdl.Message;
import org.etsi.mts.tdl.PeriodicBehaviour;
import org.etsi.mts.tdl.StaticDataUse;
import org.etsi.mts.tdl.TimeConstraint;
import org.etsi.mts.tdl.TimeOperation;
import org.etsi.mts.tdl.TimerStart;
......@@ -52,6 +54,10 @@ public class ParseAction implements IExternalJavaAction {
List<LocalExpression> localExpressions = null;
switch (type.getClassifierID()) {
case tdlPackage.MEMBER_ASSIGNMENT:
((MemberAssignment)element).setMemberSpec((StaticDataUse) value);
break;
case tdlPackage.MESSAGE:
((Message)element).setArgument(value);
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment