X

Geertjan's Blog

  • March 22, 2016

ProjektMotor Blueprint Infrastructure for Extending NetBeans in JavaScript

Geertjan Wielenga
Product Manager

A key problem for JavaScript developers using NetBeans IDE is that they need to know Java if they want to extend it.

For example, let's say you want to extend NetBeans IDE to provide code completion for Oracle JET components, such as a gauge. Hard enough to do that if you're a Java developer. Now imagine you're a JavaScript developer, getting to this point, i.e., implementing various NetBeans APIs, is impossible without knowing Java:

Moreover, since you don't simply want essentially a code template, but a dialog-driven set of GUI components, such as the below, life becomes even harder for the poor JavaScript developer trying to extend NetBeans IDE:

Having read the above and looked at the images, you're now ready to appreciate what ProjektMotor in Leipzig, Germany is working on: a project called "Control-Space". The project provides a blueprint infrastructure, enabling a JavaScript developer to define the code completion, as well as the GUI component that you see above, in JavaScript, as shown below:

The above is a Control-Space Blueprint, defining code completion in an HTML file for loading an HTML file named "gauge.html", which will be pasted into the HTML file at the cursor, after the dialog is completed. Support has been added as well for generating the corresponding JavaScript side. Essentially the above is a JavaScript DSL on top of the corresponding NetBeans APIs, which are all of course in Java.

Similarly, in addition to code completion extensions defined in JavaScript, you can use JavaScript to define new Nodes in a Blueprint Explorer window which, when clicked, can do anything you like, e.g., open windows or editors, generate boilerplate HTML, all by means of JavaScript:

Another example... Blueprints for removing menus from the main menubar in NetBeans IDE, again handy for JavaScript developers to tweak on the fly their development environment:


The third type of Blueprint is a Blueprint for testing Blueprints, again expressed in JavaScript. 

Next, imagine Blueprints for defining hints and error markings in the JavaScript editor, expressed in JavaScript. And imagine being able to define Eclipse workspaces in NetBeans via JavaScript. I.e., anything you can do when extending NetBeans via Java you can do, in principle, assuming the applicable abstractions have been created, in JavaScript. 

Now imagine a Blueprint marketplace, where JavaScript developers can share/sell their Blueprints. Many possibilities flowing from there, I think, and basically NetBeans IDE becomes whatever your Blueprints define it to be. 

Interesting, isn't it? :-) 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.