projet-mini-genie-logiciel-.../runtime-Eclipse/fr.n7.petrinet.design/description/petriNet.odesign
2021-10-15 18:57:16 +02:00

69 lines
6.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" name="petrinet" version="12.0.0.2017041100">
<ownedViewpoints name="petrinetViewpoint" modelFileExtension="petrinet">
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="NetworkDiagram" domainClass="petrinet::Network" enablePopupBars="true">
<metamodel href="http://petrinet#/"/>
<defaultLayer name="NetworkDiagram">
<nodeMappings name="PlaceNode" domainClass="petrinet::Place">
<style xsi:type="style:DotDescription" borderSizeComputationExpression="3" labelSize="12" showIcon="false" labelExpression="[self.name + '\n(' + self.tokens +')'/]" labelPosition="node" resizeKind="NSEW">
<borderColor 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']"/>
</style>
</nodeMappings>
<nodeMappings name="TransitionNode" domainClass="petrinet::Transition">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="3" labelSize="12" showIcon="false" labelPosition="node" resizeKind="NSEW">
<borderColor 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']"/>
</style>
</nodeMappings>
<edgeMappings name="ArcEdge" sourceMapping="//@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='PlaceNode'] //@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='TransitionNode']" targetMapping="//@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='PlaceNode'] //@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='TransitionNode']" targetFinderExpression="[if (self.outgoing) then self.place else self.transition endif/]" sourceFinderExpression="[if (self.outgoing) then self.transition else self.place endif/]" domainClass="petrinet::Arc" useDomainElement="true">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<centerLabelStyleDescription labelSize="12" showIcon="false" labelExpression="[if (self.weight>1) then self.weight else '' endif/]">
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<toolSections name="Outils">
<ownedTools xsi:type="tool:NodeCreationDescription" name="PlaceCreation" nodeMappings="//@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='PlaceNode']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="[container/]">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="petrinet::Place" referenceName="nodes"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:NodeCreationDescription" name="TransitionCreation" nodeMappings="//@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@nodeMappings[name='TransitionNode']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="[container/]">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="petrinet::Transition" referenceName="nodes"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:EdgeCreationDescription" name="ArcCreation" edgeMappings="//@ownedViewpoints[name='petrinetViewpoint']/@ownedRepresentations[name='NetworkDiagram']/@defaultLayer/@edgeMappings[name='ArcEdge']">
<sourceVariable name="source"/>
<targetVariable name="target"/>
<sourceViewVariable name="sourceView"/>
<targetViewVariable name="targetView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="[self.eContainer().eContainer()/]">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="petrinet::Arc" referenceName="arcs">
<subModelOperations xsi:type="tool_1:SetValue" featureName="transition" valueExpression="[if (source.oclIsKindOf(petrinet::Transition)) then source else target endif/]"/>
<subModelOperations xsi:type="tool_1:SetValue" featureName="place" valueExpression="[if (target.oclIsKindOf(petrinet::Place)) then target else source endif/]"/>
<subModelOperations xsi:type="tool_1:SetValue" featureName="outgoing" valueExpression="[source.oclIsKindOf(petrinet::Transition)/]"/>
</subModelOperations>
</firstModelOperations>
</initialOperation>
</ownedTools>
</toolSections>
</defaultLayer>
</ownedRepresentations>
<ownedJavaExtensions qualifiedClassName="fr.n7.petrinet.design.Services"/>
</ownedViewpoints>
</description:Group>