Skip to content

Commit ddc75f5

Browse files
author
nmacedo
committed
fixed bug in operation parsing
1 parent 8aa87b5 commit ddc75f5

File tree

3 files changed

+5
-3
lines changed
  • examples/pt.uminho.haslab.echo.examples/metamodels/uml2rdbms_simple
  • plugins
    • pt.uminho.haslab.echo.plugin/src/pt/uminho/haslab/echo/plugin/views
    • pt.uminho.haslab.echo/src/pt/uminho/haslab/echo/transform/alloy

3 files changed

+5
-3
lines changed

examples/pt.uminho.haslab.echo.examples/metamodels/uml2rdbms_simple/UML.ecore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<details key="acyclic_inheritance" value="not self->closure(super)->includes(self)"/>
77
<details key="unique_names" value="self.attributes->forAll(x | self.attributes->forAll(y | x = y or x.name &lt;> y.name))"/>
88
</eAnnotations>
9-
<eAnnotations source="Echo/Gen">
9+
<eAnnotations source="Echo/Gen_">
1010
<details key="gen_linear" value="self.attributes->forAll(x | x.name = self.name)"/>
1111
<details key="gen_linear" value="not self.persistent implies (self.attributes->isEmpty() and self.child->one(x | x.persistent) and (self.child->one(x | not x.persistent) or (not self.child->exists(x | not x.persistent))))"/>
1212
<details key="gen_linear" value="self.persistent implies (self.attributes->one(x | true) and self.child->isEmpty())"/>

plugins/pt.uminho.haslab.echo.plugin/src/pt/uminho/haslab/echo/plugin/views/GraphView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ public void dispose() {
100100
*/
101101
public void drawGraph() {
102102
EchoRunner runner = EchoPlugin.getInstance().getRunner();
103-
A4Solution sol = ((AlloyTuple) runner.getAInstance().getContents()).getSolution();
103+
if (runner == null) return;
104+
AlloyTuple tuple = ((AlloyTuple) runner.getAInstance().getContents());
105+
A4Solution sol = tuple.getSolution();
104106
try {
105107
if (sol != null && sol.satisfiable()) {
106108
sol.writeXML(".dummy.xml");

plugins/pt.uminho.haslab.echo/src/pt/uminho/haslab/echo/transform/alloy/ECore2Alloy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ private void processOperations(List<EOperation> operations) throws ErrorTransfor
428428

429429
OCL2Alloy converter = new OCL2Alloy(sd,posstatevars,prestatevars);
430430
for (EAnnotation ea : operation.getEAnnotations())
431-
if(ea.getSource().equals("http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot")) {
431+
if(ea.getSource().equals("http://www.eclipse.org/emf/2002/Ecore/OCL")) {
432432
Expr oclalloy = Sig.NONE.no();
433433
for(String sExpr: ea.getDetails().values()) {
434434
try{

0 commit comments

Comments
 (0)