Hi Christian,
unfortunately the patch did not work out for me.
Getting the following stack trace:
Exception in thread "main" java.lang.AssertionError: __noSuchProperty__ placeholder called
at jdk.nashorn.internal.objects.NativeJavaImporter.__noSuchProperty__(NativeJavaImporter.java:109)
at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:498)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:206)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:546)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:528)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:524)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:194)
at javax.script.AbstractScriptEngine.eval(Unknown Source)
at org.eclipse.emf.henshin.interpreter.impl.ScriptEngineWrapper.eval(ScriptEngineWrapper.java:99)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.evalAttributeExpression(EngineImpl.java:909)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChanges(EngineImpl.java:869)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChanges(EngineImpl.java:884)
at org.eclipse.emf.henshin.interpreter.impl.EngineImpl.createChange(EngineImpl.java:761)
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)
regardless, which import mechanism I’m using.
Greetings,
Markus
Hi Markus,
there is currently no global import mechanism (you could inject them into the JS engine I guess, but thats not really convenient). Could you maybe send us a patch of your implementation?
PS: Please note that if we include it, it will be of course published under the terms of the EPL. If you don't want that, please don't send us anything...
2014-08-22 12:25 GMT+02:00 <mke@xxxxxxxxxx>:
Just wanted to say thanks for an implementation of a JS- Java Package import Feature at
Rule level. Works like a charm!
A small question regarding global imports of java packages into the JS-Engine:
Would it be possible to extend the Engine interface resp. EngineImpl with a constructor,
where String array of globally imported packages can be set, because we use java methods quite regularly, and it would save a huge amount of time, if we could import all libraries at once during the startup of the engine. I’ve done it for my local work, but
I’m not sure if anything else will break using this extension.
Or is there already a global import mechanism, that I overlooked?
Greetings,
Markus
Hi,
please use this Git config in Windows:
If you have dirty projects due to windows line endings, try a hard reset after setting the config.
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev