Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-05-19 12:56:48 -0400
committerdstadnik2008-05-19 12:56:48 -0400
commitff9577365c39fb2bb1cc6abc18b696311928970c (patch)
tree60f584ad20222563a04bccfbe4b0d1062d046cdb /examples
parent02d1b9220ff9bf75df0e9e91896718c494243990 (diff)
downloadorg.eclipse.gmf-tooling-ff9577365c39fb2bb1cc6abc18b696311928970c.tar.gz
org.eclipse.gmf-tooling-ff9577365c39fb2bb1cc6abc18b696311928970c.tar.xz
org.eclipse.gmf-tooling-ff9577365c39fb2bb1cc6abc18b696311928970c.zip
regenerated
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen129
1 files changed, 80 insertions, 49 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen b/examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen
index cd1d0308a..db1bbb379 100644
--- a/examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen
+++ b/examples/org.eclipse.gmf.examples.taipan/models/taipan.gmfgen
@@ -2,7 +2,7 @@
<gmfgen:GenEditorGenerator xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2006/GenModel" packageNamePrefix="org.eclipse.gmf.examples.taipan.gmf.editor"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2008/GenModel" packageNamePrefix="org.eclipse.gmf.examples.taipan.gmf.editor"
modelID="TaiPan"
copyrightText="Copyright (c) 2006, 2007 Borland Software Corporation&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Dmitry Stadnik (Borland) - initial API and implementation">
<audits>
@@ -15,14 +15,13 @@
<rules
name="Port Location"
description="Empty port location check"
- contextSelectorLocalClassName="PortLocation"
id="port_location"
+ rule="//@expressionProviders/@providers.0/@expressions.7"
message="Port location should not be empty"
category="//@audits/@categories.0">
- <rule
- body="location.size() > 0"/>
<target
- xsi:type="gmfgen:GenDomainElementTarget">
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="//@audits/@clientContexts.0">
<element
href="taipan.genmodel#//taipan/Port"/>
</target>
@@ -30,15 +29,13 @@
<rules
name="Ship Name"
description="Empty ship name check"
- contextSelectorLocalClassName="ShipName"
id="ship_name"
+ rule="//@expressionProviders/@providers.1/@expressions.0"
message="Ship name should not be empty"
category="//@audits/@categories.0">
- <rule
- body="self.length() > 0"
- language="java"/>
<target
xsi:type="gmfgen:GenDomainAttributeTarget"
+ contextSelector="//@audits/@clientContexts.1"
nullAsError="true">
<attribute
href="taipan.genmodel#//taipan/Ship/name"/>
@@ -47,14 +44,13 @@
<rules
name="Large Item Weight"
description="Large item weight check"
- contextSelectorLocalClassName="LargeItemWeight"
id="litem_weight"
+ rule="//@expressionProviders/@providers.0/@expressions.9"
message="Large item weight should be greater than zero."
category="//@audits/@categories.0">
- <rule
- body="weight > 0"/>
<target
- xsi:type="gmfgen:GenDomainElementTarget">
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="//@audits/@clientContexts.2">
<element
href="taipan.genmodel#//taipan/LargeItem"/>
</target>
@@ -62,26 +58,36 @@
<rules
name="Ship Type"
description="Ship type check"
- contextSelectorLocalClassName="ShipType"
id="ship_type"
+ rule="//@expressionProviders/@providers.0/@expressions.10"
message="Invalid ship type."
category="//@audits/@categories.0">
- <rule
- body="element.eClass().name = 'Ship'"/>
<target
xsi:type="gmfgen:GenDiagramElementTarget"
+ contextSelector="//@audits/@clientContexts.3"
element="//@diagram/@topLevelNodes.1"/>
</rules>
+ <clientContexts
+ id="PortLocation"
+ ruleTargets="//@audits/@rules.0/@target"/>
+ <clientContexts
+ id="ShipName"
+ ruleTargets="//@audits/@rules.1/@target"/>
+ <clientContexts
+ id="LargeItemWeight"
+ ruleTargets="//@audits/@rules.2/@target"/>
+ <clientContexts
+ id="ShipType"
+ ruleTargets="//@audits/@rules.3/@target"/>
</audits>
<metrics>
<metrics
name="Route Reliability"
description="Safety of the route."
key="RouteRelb"
+ rule="//@expressionProviders/@providers.0/@expressions.8"
lowLimit="0.1"
highLimit="0.9">
- <rule
- body="reliability"/>
<target
xsi:type="gmfgen:GenDomainElementTarget">
<element
@@ -92,11 +98,9 @@
name="Ship Load"
description="Quantity of items loaded on ship."
key="ShipLoad"
+ rule="//@expressionProviders/@providers.1/@expressions.1"
lowLimit="1.0"
highLimit="5.0">
- <rule
- body="cargo.size()"
- language="java"/>
<target
xsi:type="gmfgen:GenDomainElementTarget">
<element
@@ -137,7 +141,7 @@
canonicalEditPolicyClassName="SmallItemsCanonicalEditPolicy"
graphicalNodeEditPolicyClassName="SmallItemsGraphicalNodeEditPolicy"
createCommandClassName="SmallItemsCreateCommand"
- containers="//@diagram/@compartments.0 //@diagram/@compartments.2">
+ containers="//@diagram/@compartments.2 //@diagram/@compartments.0">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -174,7 +178,7 @@
canonicalEditPolicyClassName="LargeItemCanonicalEditPolicy"
graphicalNodeEditPolicyClassName="LargeItemGraphicalNodeEditPolicy"
createCommandClassName="LargeItemCreateCommand"
- containers="//@diagram/@compartments.1 //@diagram/@compartments.3">
+ containers="//@diagram/@compartments.3 //@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -242,7 +246,7 @@
canonicalEditPolicyClassName="EmptyBoxCanonicalEditPolicy"
graphicalNodeEditPolicyClassName="EmptyBoxGraphicalNodeEditPolicy"
createCommandClassName="EmptyBoxCreateCommand"
- containers="//@diagram/@compartments.1 //@diagram/@compartments.3">
+ containers="//@diagram/@compartments.3 //@diagram/@compartments.1">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
@@ -334,13 +338,12 @@
figureQualifiedClassName="org.eclipse.gmf.examples.taipan.figures.ShipShape">
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
- <modelFacet>
+ <modelFacet
+ modelElementSelector="//@expressionProviders/@providers.0/@expressions.5">
<metaClass
href="taipan.genmodel#//taipan/Ship"/>
<containmentMetaFeature
href="taipan.genmodel#//taipan/Aquatory/ships"/>
- <modelElementSelector
- body="not oclIsKindOf(taipan::Warship)"/>
</modelFacet>
<labels
visualID="5004"
@@ -470,18 +473,17 @@
<requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="//@expressionProviders/@providers.0/@expressions.0">
<metaClass
href="taipan.genmodel#//taipan/Route"/>
<containmentMetaFeature
href="taipan.genmodel#//taipan/Aquatory/routes"/>
- <modelElementSelector
- body="reliability >= 0.5"/>
<modelElementInitializer
xsi:type="gmfgen:GenFeatureSeqInitializer">
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- body="0.8">
+ value="//@expressionProviders/@providers.0/@expressions.1">
<feature
href="taipan.genmodel#//taipan/Route/reliability"/>
</initializers>
@@ -559,18 +561,17 @@
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.gmf.examples.taipan.figures.DashedConnection"/>
<modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="//@expressionProviders/@providers.0/@expressions.2">
<metaClass
href="taipan.genmodel#//taipan/Route"/>
<containmentMetaFeature
href="taipan.genmodel#//taipan/Aquatory/routes"/>
- <modelElementSelector
- body="reliability &lt; 0.5"/>
<modelElementInitializer
xsi:type="gmfgen:GenFeatureSeqInitializer">
<initializers
xsi:type="gmfgen:GenFeatureValueSpec"
- body="0.2">
+ value="//@expressionProviders/@providers.0/@expressions.3">
<feature
href="taipan.genmodel#//taipan/Route/reliability"/>
</initializers>
@@ -680,10 +681,8 @@
<targetMetaFeature
href="taipan.genmodel#//taipan/BesiegePortOrder/port"/>
</modelFacet>
- <creationConstraints>
- <sourceEnd
- body="self.attackOrders->select(order | order.port = oppositeEnd)->isEmpty()"/>
- </creationConstraints>
+ <creationConstraints
+ sourceEnd="//@expressionProviders/@providers.0/@expressions.6"/>
</links>
<links
visualID="4006"
@@ -711,12 +710,9 @@
<targetMetaFeature
href="taipan.genmodel#//taipan/EscortShipsOrder/ships"/>
</modelFacet>
- <creationConstraints>
- <sourceEnd
- body="self.escortOrder->isEmpty() or self.escortOrder.ships->select(ship | ship = oppositeEnd)->isEmpty()"/>
- <targetEnd
- body="not self.oclIsKindOf(Warship)"/>
- </creationConstraints>
+ <creationConstraints
+ sourceEnd="//@expressionProviders/@providers.0/@expressions.4"
+ targetEnd="//@expressionProviders/@providers.0/@expressions.5"/>
</links>
<links
visualID="4007"
@@ -1001,10 +997,45 @@
href="taipan.genmodel#/"/>
<expressionProviders>
<providers
- xsi:type="gmfgen:GenExpressionInterpreter"
- expressions="//@diagram/@links.1/@modelFacet/@modelElementSelector //@diagram/@links.1/@modelFacet/@modelElementInitializer/@initializers.0 //@diagram/@links.2/@modelFacet/@modelElementSelector //@diagram/@links.2/@modelFacet/@modelElementInitializer/@initializers.0 //@diagram/@links.5/@creationConstraints/@sourceEnd //@diagram/@links.5/@creationConstraints/@targetEnd //@diagram/@links.4/@creationConstraints/@sourceEnd //@audits/@rules.0/@rule //@metrics/@metrics.0/@rule //@audits/@rules.2/@rule //@audits/@rules.3/@rule"/>
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="reliability >= 0.5"/>
+ <expressions
+ body="0.8"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="reliability &lt; 0.5"/>
+ <expressions
+ body="0.2"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.escortOrder->isEmpty() or self.escortOrder.ships->select(ship | ship = oppositeEnd)->isEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="not self.oclIsKindOf(Warship)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.attackOrders->select(order | order.port = oppositeEnd)->isEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="location.size() > 0"/>
+ <expressions
+ body="reliability"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="weight > 0"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="element.eClass().name = 'Ship'"/>
+ </providers>
<providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- expressions="//@audits/@rules.1/@rule //@metrics/@metrics.1/@rule"/>
+ xsi:type="gmfgen:GenJavaExpressionProvider">
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.length() > 0"/>
+ <expressions
+ body="cargo.size()"/>
+ </providers>
</expressionProviders>
</gmfgen:GenEditorGenerator>

Back to the top