Hi there,
I was curious that the latest nightly build was created over a month ago. Especially after the commit
of Christian Krause regarding the fixes for Java 8, I’d like to ask, if you could create a new build containing these fixes.
The issue we are facing is the following. Right now the package import to the JS Engine is not working.
I saw that the importing issue should be solved by adding the rhino compatibility mode. Still there is a problem in the evaluation of attributes/variables:
We are calling a static method in a java class using the fully qualified name. The attribute value is
set to lets say:
Attribute = “This is the new attribute value: ” + de.mypackage.StringCreator.createString(var)
where createString is a static method using a String parameter.
The issue is, that the attribute evaluator in the EngineImpl does not recognize the variable de.mypackage.StringCreator.createString(var)
as a full qualified Java Class, hence we get the following error message:
java.lang.RuntimeException: ReferenceError: "de" is not defined in <eval> at line number
1
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.evalAttributeExpression(EngineImpl.java:906)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChanges(EngineImpl.java:861)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChanges(EngineImpl.java:876)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChange(EngineImpl.java:756)
at org.eclipse.emf.henshin.interpreter.impl.RuleApplicationImpl.execute(RuleApplicationImpl.java:99)
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.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.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.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.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)
I fixed this issue by adding a conditional check if the attribute.getValue() String contains any “.”
elements and added a “importPackage(de.mypackage)” before the actual evaluation, maybe you could add a similar check to make it work in the nightly build as well.
Greetings and thanks for all your work,
Markus