Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » GroovyScriptEngineFactory not accessible from Eclipse RCP
GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701106] Thu, 09 July 2015 11:17 Go to next message
Vrinda A is currently offline Vrinda AFriend
Messages: 8
Registered: November 2012
Junior Member
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 17:13 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Are all of its dependencies met by your RCP application?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: GroovyScriptEngineFactory not accessible from Eclipse RCP [message #1701554 is a reply to message #1701185] Tue, 14 July 2015 06:54 Go to previous messageGo to next message
Vrinda A is currently offline Vrinda AFriend
Messages: 8
Registered: November 2012
Junior Member
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 06:55 Go to previous message
Vrinda A is currently offline Vrinda AFriend
Messages: 8
Registered: November 2012
Junior Member
Missed to attach my test plugin com.test.groovy

[Updated on: Tue, 14 July 2015 06:56]

Report message to a moderator

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


Current Time: Tue Apr 23 15:58:50 GMT 2024

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

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

Back to the top