Skip to main content



      Home
Home » Newcomers » Newcomers » GroovyScriptEngineFactory not accessible from Eclipse RCP
GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701106] Thu, 09 July 2015 07:17 Go to next message
Eclipse UserFriend
I have created an eclipse plugin that contributes a tool bar action. This plugin has dependency on groovy plugin 'org.codehaus.groovy'.

Here is my action command:
public void run(final IAction action) {
    ScriptEngineManager scrEngMgr = new ScriptEngineManager();
    List <ScriptEngineFactory> factories = scrEngMgr.getEngineFactories();
}


On execution of this command from RCP, in the list of ScriptEngineFactory, I do not get the GroovyScriptEngineFactory.

Looks like the RCP is not able to access the groovy jar exported by the groovy plugin.
I checked the source of groovy plugin 'org.codehaus.groovy' and see that in the MANIFEST.mf, all packages are exported and also lib/groovy-all-a.8.6.jar is added in the classpath.

Just for testing sake, in the same plugin, when I tried to run the same piece of code in a test class with a main() as a Java application, I do get the GroovyScriptEngineFactory from ScriptEngineManager.

Any clue on how to access GroovyScriptEngineFactory in an RCP?
Re: GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701185 is a reply to message #1701106] Thu, 09 July 2015 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Are all of its dependencies met by your RCP application?
Re: GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701554 is a reply to message #1701185] Tue, 14 July 2015 02:54 Go to previous messageGo to next message
Eclipse UserFriend
Attached is my test plugin 'com.test.groovy'. The target in my Eclipse platform has 'org.codehaus.groovy' plugin in it.
When I debug as Eclipse Application with the attached test plugin, with a breakpoint set in run() of class SampleAction, on click of the toolbar icon 'Hello, Eclipse World', I do not get GroovyScriptEngineFactory Confused

I am attaching the target Groovy plugin 'org.codehaus.groovy' also for your reference.

In the OSGI console of the launched application, I am able to see both my test plugin and its dependent Groovy plugin in RESOLVED state

osgi> ss com.test.groovy
"Framework is launched."


id State Bundle
1483 RESOLVED com.test.groovy_1.0.0.qualifier
osgi> ss org.codehaus.groovy
"Framework is launched."


id State Bundle
1855 RESOLVED org.codehaus.groovy_1.8.6.20150602185256141
osgi>
Re: GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701555 is a reply to message #1701554] Tue, 14 July 2015 02:55 Go to previous message
Eclipse UserFriend
Missed to attach my test plugin com.test.groovy

[Updated on: Tue, 14 July 2015 02:56] by Moderator

Previous Topic:Maven Dependency
Next Topic:SVN repository on local IP address?
Goto Forum:
  


Current Time: Tue May 20 18:43:36 EDT 2025

Powered by FUDForum. Page generated in 0.07800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top