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

Mappings updated according to 968ea3c

Change-Id: Ie973f014d0d7aaf3a8dab9db8967f9be0f7e679a
parent c17ce576
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@
              </endLabelStyleDescription>
              </endLabelStyleDescription>
            </style>
            </style>
          </conditionnalStyles>
          </conditionnalStyles>
          <conditionnalStyles predicateExpression="[self.owner().oclAsType(tdl::Interaction).target->asSequence()->indexOf(self) > 1 and self.owner().oclAsType(tdl::Interaction).isTrigger/]">
          <conditionnalStyles predicateExpression="[self.owner().oclIsKindOf(tdl::Message) and self.owner().oclAsType(tdl::Message).target->asSequence()->indexOf(self) > 1 and self.owner().oclAsType(tdl::Message).isTrigger/]">
            <style targetArrow="NoDecoration" sizeComputationExpression="2">
            <style targetArrow="NoDecoration" sizeComputationExpression="2">
              <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <endLabelStyleDescription showIcon="false" labelExpression="[ if (self.variable.oclIsUndefined()) then '' else self.variable.name endif /]">
              <endLabelStyleDescription showIcon="false" labelExpression="[ if (self.variable.oclIsUndefined()) then '' else self.variable.name endif /]">
@@ -65,7 +65,7 @@
              </endLabelStyleDescription>
              </endLabelStyleDescription>
            </style>
            </style>
          </conditionnalStyles>
          </conditionnalStyles>
          <conditionnalStyles predicateExpression="[self.owner().oclAsType(tdl::Interaction).isTrigger/]">
          <conditionnalStyles predicateExpression="[self.owner().oclIsKindOf(tdl::Message) and self.owner().oclAsType(tdl::Message).isTrigger/]">
            <style targetArrow="NoDecoration" sizeComputationExpression="2">
            <style targetArrow="NoDecoration" sizeComputationExpression="2">
              <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <centerLabelStyleDescription showIcon="false" labelExpression="[ serialise(self.owner().oclAsType(tdl::Interaction).argument) /]">
              <centerLabelStyleDescription showIcon="false" labelExpression="[ serialise(self.owner().oclAsType(tdl::Interaction).argument) /]">
@@ -104,7 +104,7 @@
              </style>
              </style>
            </subNodeMappings>
            </subNodeMappings>
            <subNodeMappings name="boundedLoop.iteration" semanticCandidatesExpression="[self/]" domainClass="tdl.BoundedLoopBehaviour">
            <subNodeMappings name="boundedLoop.iteration" semanticCandidatesExpression="[self/]" domainClass="tdl.BoundedLoopBehaviour">
              <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[serialise(self.numIteration)/]" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
              <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[if (not self.numIteration->isEmpty()) then '[' + serialise(self.numIteration.expression->any(true))+  ']' else '' endif/]" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
                <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
                <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
                <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
@@ -127,7 +127,7 @@
              </style>
              </style>
            </subNodeMappings>
            </subNodeMappings>
            <subNodeMappings name="periodicBehaviour.iteration" semanticCandidatesExpression="[self/]" domainClass="tdl.PeriodicBehaviour">
            <subNodeMappings name="periodicBehaviour.iteration" semanticCandidatesExpression="[self/]" domainClass="tdl.PeriodicBehaviour">
              <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[serialise(self.period)/]" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
              <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[if (not self.period->isEmpty()) then '[' + serialise(self.period->any(true))+  ']' else '' endif/]" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW">
                <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
                <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
                <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
                <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
@@ -141,7 +141,7 @@
            </style>
            </style>
          </subContainerMappings>
          </subContainerMappings>
          <subContainerMappings xsi:type="description_1:OperandMapping" name="block" semanticCandidatesExpression="[getBlocks()/]" domainClass="tdl.Block" startingEndFinderExpression="[self/]" finishingEndFinderExpression="[getEnd()/]">
          <subContainerMappings xsi:type="description_1:OperandMapping" name="block" semanticCandidatesExpression="[getBlocks()/]" domainClass="tdl.Block" startingEndFinderExpression="[self/]" finishingEndFinderExpression="[getEnd()/]">
            <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" labelExpression="[if (not self.guard.oclIsUndefined()) then '[' + serialise(self.guard)+  ']' else '' endif/]" labelAlignment="LEFT">
            <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" showIcon="false" labelExpression="[if (not self.guard->isEmpty()) then '[' + serialise(self.guard.expression->any(true))+  ']' else '' endif/]" labelAlignment="LEFT">
              <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
              <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
@@ -324,7 +324,7 @@
        <containerMappings xsi:type="description_1:InteractionUseMapping" name="assignment" semanticCandidatesExpression="[allBehaviours()/]" domainClass="tdl.Assignment" startingEndFinderExpression="[self/]" finishingEndFinderExpression="[getEnd()/]" coveredLifelinesExpression="[getTestConfiguration().connection.endPoint->select(ref|ref.component = self.componentInstance)/]">
        <containerMappings xsi:type="description_1:InteractionUseMapping" name="assignment" semanticCandidatesExpression="[allBehaviours()/]" domainClass="tdl.Assignment" startingEndFinderExpression="[self/]" finishingEndFinderExpression="[getEnd()/]" coveredLifelinesExpression="[getTestConfiguration().connection.endPoint->select(ref|ref.component = self.componentInstance)/]">
          <subNodeMappings name="assignment.config" semanticCandidatesExpression="[self/]" domainClass="tdl.Assignment"/>
          <subNodeMappings name="assignment.config" semanticCandidatesExpression="[self/]" domainClass="tdl.Assignment"/>
          <subNodeMappings name="assignment.assignment" semanticCandidatesExpression="[self/]" domainClass="tdl.Assignment">
          <subNodeMappings name="assignment.assignment" semanticCandidatesExpression="[self/]" domainClass="tdl.Assignment">
            <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[self.variable.name + ' := ' + serialise(self.expression)/]" labelPosition="node" resizeKind="NSEW">
            <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="[self.variable.variable.name + ' := ' + serialise(self.expression)/]" labelPosition="node" resizeKind="NSEW">
              <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
              <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
              <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+12 −3
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@ import org.etsi.mts.tdl.Function;
import org.etsi.mts.tdl.FunctionCall;
import org.etsi.mts.tdl.FunctionCall;
import org.etsi.mts.tdl.GateReference;
import org.etsi.mts.tdl.GateReference;
import org.etsi.mts.tdl.Interaction;
import org.etsi.mts.tdl.Interaction;
import org.etsi.mts.tdl.LocalExpression;
import org.etsi.mts.tdl.Message;
import org.etsi.mts.tdl.Message;
import org.etsi.mts.tdl.MultipleCombinedBehaviour;
import org.etsi.mts.tdl.MultipleCombinedBehaviour;
import org.etsi.mts.tdl.ParallelBehaviour;
import org.etsi.mts.tdl.ParallelBehaviour;
@@ -222,16 +223,24 @@ public class CreateAction implements IExternalJavaAction {
	}
	}
	
	
	private void setDataUse(EObject target, DataUse dataUse) {
	private void setDataUse(EObject target, DataUse dataUse) {
		LocalExpression exp = null;
		if (target instanceof BoundedLoopBehaviour
				|| target instanceof PeriodicBehaviour
				|| target instanceof Block) {
			exp = tdlFactory.eINSTANCE.createLocalExpression();
			exp.setExpression(dataUse);
		}
		
		if (target instanceof Target) {
		if (target instanceof Target) {
			Interaction interaction = (Interaction) target.eContainer();
			Interaction interaction = (Interaction) target.eContainer();
			if (interaction instanceof Message)
			if (interaction instanceof Message)
				((Message) interaction).setArgument(dataUse);
				((Message) interaction).setArgument(dataUse);
		} else if (target instanceof BoundedLoopBehaviour)
		} else if (target instanceof BoundedLoopBehaviour)
			((BoundedLoopBehaviour) target).setNumIteration(dataUse);
			((BoundedLoopBehaviour) target).getNumIteration().add(exp);
		else if (target instanceof PeriodicBehaviour)
		else if (target instanceof PeriodicBehaviour)
			((PeriodicBehaviour) target).setPeriod(dataUse);
			((PeriodicBehaviour) target).getPeriod().add(exp);
		else if (target instanceof Block)
		else if (target instanceof Block)
			((Block) target).setGuard(dataUse);
			((Block) target).getGuard().add(exp);
		else if (target instanceof Assertion)
		else if (target instanceof Assertion)
			((Assertion) target).setCondition(dataUse);
			((Assertion) target).setCondition(dataUse);
		else if (target instanceof Assignment)
		else if (target instanceof Assignment)