NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scriptable NetBeans Modules

Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message

Joined: 14 Aug 2009
Posts: 245

PostPosted: Mon Dec 19, 2016 1:49 pm    Post subject: Scriptable NetBeans Modules Reply with quote


I think it would be useful to provide a bridge for NetBeans modules done with scripting languages.

Javascript is the prime candindate since we have Nashorn at JRE level, but I assume once the hooks are in place more languages will be supported.

The way I expect it to work is to use JAR files but in the MANIFEST add

OpenIDE-Module-ScriptEngine: nashorn

then all class references will be interpreted through the script engine.

So, I could have

OpenIDE-Module-Install: ro/emilianbold/js/install.js

Then in META-INF/services/name.of.Class I could add


For layer .instance file we could have another attribute like

<file name="x.instance">
  <attr name="instanceScript" stringvalue="ro/emilianbold/js/serviceimpl.js"/>

or maybe register the extension and treat .EXT.instance as a script:

OpenIDE-Module-ScriptExtension: js

<file name="ro-emilianbold-js-serviceimpl.js.instance" />

Were there some prior attempts towards something like this?

Does anybody want to help me spec this out and write some prototype?

One area that will be sub-optimal is lazy-loading: I believe the module system used reflection to instantiate lazily services. This will not work for scripts as they will have to be loaded and executed. Still, I believe this will be manageable.

PS: Also CCing address-removed ([email]address-removed[/email]) 

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo