Dear Henshin developers,
I have some troubles regarding the _javascript_ interpreter when
using Enums to match attribute values. Attached you'll find the
error message [1].
The bug only appears when using the metamodel via the package
registry. I have to do so, since I am not working on an xmi file
but using Xtext in my usecase.
Attached, you find all necessary files in order to reconstruct
the bug.
- ecore-model / genmodel (you probably need to create a new one)
- henshin-model (working - with xmi)
- henshin-model (not working - with registered package)
- Tester file to run the unit
Please note that the EnumBug.* files are actually working when
used with an xmi file. (I attached those also, just to see the
difference).
Steps to Reconstruct the Error
1. To actually see the error you have to register the EBug
Package and its genmodel to your instance.
2. Run HenshinTester.xtend|.java
(By the way, is there any convenient way to do this in the same
eclipse instance? Currently I am Exporting the project into my
dropins folder, but that cannot be the ultimate solution)
Thanks for your help
Jona
[1]
Exception in thread "main" java.lang.RuntimeException: sun.org.mozilla._javascript_.internal.EcmaError: ReferenceError: "belongs_to" is not defined. (<Unknown source>#1) in <Unknown source> at line number 1
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.evalAttributeExpression(EngineImpl.java:656)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.createConstraints(VariableInfo.java:150)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:107)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:123)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:120)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:112)
at org.eclipse.emf.henshin.interpreter.info.VariableInfo.<init>(VariableInfo.java:73)
at org.eclipse.emf.henshin.interpreter.info.RuleInfo.<init>(RuleInfo.java:26)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.getRuleInfo(EngineImpl.java:496)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchFinder.<init>(EngineImpl.java:193)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchGenerator.iterator(EngineImpl.java:153)
at org.eclipse.emf.henshin.interpreter.impl.RuleApplicationImpl.execute(RuleApplicationImpl.java:89)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.executeRule(UnitApplicationImpl.java:175)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.doExecute(UnitApplicationImpl.java:99)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.execute(UnitApplicationImpl.java:89)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.executeSequentialUnit(UnitApplicationImpl.java:222)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.doExecute(UnitApplicationImpl.java:103)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.execute(UnitApplicationImpl.java:89)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.executeLoopUnit(UnitApplicationImpl.java:395)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.doExecute(UnitApplicationImpl.java:111)
at org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.execute(UnitApplicationImpl.java:89)
at de.unimarburg.webdsl.HenshinTester$3.apply(HenshinTester.java:139)
at de.unimarburg.webdsl.HenshinTester$3.apply(HenshinTester.java:1)
at org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_doubleArrow(ObjectExtensions.java:104)
at de.unimarburg.webdsl.HenshinTester.transform(HenshinTester.java:143)
at de.unimarburg.webdsl.HenshinTester.main(HenshinTester.java:35)