Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborn2015-10-19 19:48:49 +0000
committerkborn2015-10-20 16:42:45 +0000
commit7eecfa440f1db3e7e4d2134b378ec691438b4b37 (patch)
treed876faa9edde041f456a34e2944b3cd7eb57d411
parent5065fc7d67fce8cf776c3638b6ec06bed31981c9 (diff)
downloadorg.eclipse.emft.henshin-7eecfa440f1db3e7e4d2134b378ec691438b4b37.tar.gz
org.eclipse.emft.henshin-7eecfa440f1db3e7e4d2134b378ec691438b4b37.tar.xz
org.eclipse.emft.henshin-7eecfa440f1db3e7e4d2134b378ec691438b4b37.zip
beautification of the 'transferMoney' rule.
Change-Id: Id0302799a750ef6b580c9c5a90fc4c6bd8faed56 Signed-off-by: kborn <kristopherborn@gmx.de>
-rw-r--r--doc/www/examples/bank/index.html3
-rw-r--r--doc/www/examples/bank/rule-transfer-money.pngbin13477 -> 15544 bytes
-rw-r--r--plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin5
-rw-r--r--plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin_diagram22
4 files changed, 17 insertions, 13 deletions
diff --git a/doc/www/examples/bank/index.html b/doc/www/examples/bank/index.html
index 833a0ab98..c0d63652d 100644
--- a/doc/www/examples/bank/index.html
+++ b/doc/www/examples/bank/index.html
@@ -149,7 +149,8 @@ the old credit is matched using a parameter <i>x</i> and set
to <i>x-amount</i>, analogously for the destination account.
Note that the conditions check whether the credit balance on
the source account is high enough and that transfers are always
-positive. If the conditions don’t hold, the rule can’t be applied.
+positive. If the conditions don not hold, the rule can not be applied.
+The conditions are evaluated by the Oracle Nashorn JavaScript Engine.
Note also that <i>x</i> and <i>y</i> have to be specified as
parameters. When executing this rule, these parameters will
be automatically initialized by the found match.
diff --git a/doc/www/examples/bank/rule-transfer-money.png b/doc/www/examples/bank/rule-transfer-money.png
index cdb59ed0f..4df7b2e6b 100644
--- a/doc/www/examples/bank/rule-transfer-money.png
+++ b/doc/www/examples/bank/rule-transfer-money.png
Binary files differ
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin
index 67c3faa8c..ac610e5ca 100644
--- a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin
@@ -166,7 +166,7 @@
<type href="bank.ecore#//Client/accounts"/>
</edges>
</rhs>
- <attributeConditions xmi:id="_kkKAYGwLEeW5Br8zt3c4Qg" name="financial covering" conditionText="(x-amount)>0"/>
+ <attributeConditions xmi:id="_kkKAYGwLEeW5Br8zt3c4Qg" name="financial covering" conditionText="x>amount"/>
<attributeConditions xmi:id="_89rI8GwLEeW5Br8zt3c4Qg" name="positive transfer only" conditionText="amount>0"/>
<mappings xmi:id="_XG_vAX_5EeKZZICbS5P5TQ" origin="_XGrl8X_5EeKZZICbS5P5TQ" image="_XG2lEX_5EeKZZICbS5P5TQ"/>
<mappings xmi:id="_XG_vAn_5EeKZZICbS5P5TQ" origin="_XGs0EH_5EeKZZICbS5P5TQ" image="_XG3zMH_5EeKZZICbS5P5TQ"/>
@@ -226,6 +226,9 @@
<mappings xmi:id="_XHFOkn_5EeKZZICbS5P5TQ" origin="_XHBkMH_5EeKZZICbS5P5TQ" image="_XHEAcH_5EeKZZICbS5P5TQ"/>
<mappings xmi:id="_XHF1oH_5EeKZZICbS5P5TQ" origin="_XHBkMX_5EeKZZICbS5P5TQ" image="_XHEAcX_5EeKZZICbS5P5TQ"/>
<multiRules xmi:id="_XHKuIH_5EeKZZICbS5P5TQ" name="">
+ <parameters xmi:id="_hDQQsHcoEeWYVP_eitzqMg" name="client">
+ <type xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </parameters>
<lhs xmi:id="_XHKuIX_5EeKZZICbS5P5TQ" name="LHS">
<nodes xmi:id="_XHLVMH_5EeKZZICbS5P5TQ" name="client" incoming="_XHMjUX_5EeKZZICbS5P5TQ _XHNKYH_5EeKZZICbS5P5TQ _XHOYgH_5EeKZZICbS5P5TQ">
<type href="bank.ecore#//Client"/>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin_diagram b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin_diagram
index 44c6c642c..3c07b7b72 100644
--- a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin_diagram
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/bank/bank.henshin_diagram
@@ -227,17 +227,6 @@
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YqX9UujyEeCw6tx5JXcQ0g" points="[-35, 12, 229, -83]$[-208, 75, 56, -20]"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ytw2sH_5EeKZZICbS5P5TQ" id="(0.4864864864864865,0.0)"/>
</edges>
- <edges xmi:type="notation:Connector" xmi:id="_RDsGgOj3EeCw6tx5JXcQ0g" type="4001" source="_PszzIOj3EeCw6tx5JXcQ0g" target="_PFg_EOj2EeCw6tx5JXcQ0g">
- <children xmi:type="notation:DecorationNode" xmi:id="_RDtUoOj3EeCw6tx5JXcQ0g" type="6001">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_RDtUoej3EeCw6tx5JXcQ0g" x="10" y="41"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_RDt7sOj3EeCw6tx5JXcQ0g" type="6002">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_RDt7sej3EeCw6tx5JXcQ0g" x="-5" y="42"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_RDsGgej3EeCw6tx5JXcQ0g" fontName="Sans"/>
- <element xmi:type="henshin:Edge" href="bank.henshin#_XG1-AX_5EeKZZICbS5P5TQ"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RDsGguj3EeCw6tx5JXcQ0g" points="[1, 20, -4, -64]$[1, 53, -4, -31]"/>
- </edges>
<edges xmi:type="notation:Connector" xmi:id="_5-9xQHg-EeGZMfr3Iy5Flw" type="4001" source="_r4lFYHg-EeGZMfr3Iy5Flw" target="_r4nhoHg-EeGZMfr3Iy5Flw">
<children xmi:type="notation:DecorationNode" xmi:id="_5--_YHg-EeGZMfr3Iy5Flw" type="6001">
<layoutConstraint xmi:type="notation:Location" xmi:id="_5-_mcHg-EeGZMfr3Iy5Flw" x="9" y="13"/>
@@ -294,4 +283,15 @@
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3Whv8nseEeGvRuXq6ahpsw" points="[8, 2, -98, 0]$[90, 3, -16, 1]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3W15AHseEeGvRuXq6ahpsw" id="(0.8545454545454545,0.5111111111111111)"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_fSO_AHcoEeWYVP_eitzqMg" type="4001" source="_PszzIOj3EeCw6tx5JXcQ0g" target="_PFg_EOj2EeCw6tx5JXcQ0g">
+ <children xmi:type="notation:DecorationNode" xmi:id="_fSQNIHcoEeWYVP_eitzqMg" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_fSQNIXcoEeWYVP_eitzqMg" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fSQ0MHcoEeWYVP_eitzqMg" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_fSQ0MXcoEeWYVP_eitzqMg" x="-12" y="45"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_fSO_AXcoEeWYVP_eitzqMg" fontName="Segoe UI"/>
+ <element xmi:type="henshin:Edge" href="bank.henshin#_XG1-AX_5EeKZZICbS5P5TQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_fSO_AncoEeWYVP_eitzqMg" points="[-5, 25, 0, -82]$[0, 75, 5, -32]"/>
+ </edges>
</notation:Diagram>

Back to the top