Geertjan's Blog

  • April 6, 2016

New Release of Oracle JET Support Plugin for NetBeans IDE 8.1

Geertjan Wielenga
Product Manager

Great news—there's a new release of the Oracle JET Support plugin for NetBeans IDE. The plugin is now at version 0.9.1, as shown below in the Plugin Manager (under the Tools menu). If you have an earlier version installed, go to the Updates tab below and you'll be able to install the new release there.

When you've installed the new release of the plugin, you'll see in the New Project dialog (Ctrl-Shift-N) that there's a different project template available in the "HTML5/JavaScript" category. This is the "Oracle JET Base Distribution" project template, i.e., the absolute basic starting point, the one I've been using a lot since it doesn't include all kinds of sample code that can initially be confusing:

In the "Samples" category, you'll find the "Oracle JET QuickStart Basic" project template, which is the same as before, just in a different location, i.e., the correct location, since it is a sample and not an empty project, together with the "Oracle JET Component Interaction Sample", which has been there from the start of the plugin.

When you complete the step-by-step wizard for setting up the "Oracle JET Base Distribution" project template, you'll see this in the Projects window:

In the New File dialog, two new Oracle JET templates are available for the first time, shown below:

The difference between these two templates is that, while both create a JavaScript file and HTML file, the "Empty" module has absolutely minimal content, while the "Knockout" module is the "Hello World" example from the Knockout site. When you click Next for both of these templates, you'll see this:

I.e., notice that now, if "js/viewModels" and "js/views" don't exist, they'll be created for you and a "home.js" will be put in "js/viewModels", while a "home.html" will be put in "js/views":

As always, you need to get "main-template.js" and copy it to "js/main.js":

In "main.js", type "vm" and then press Tab to create your root ViewModel in the require block, i.e., the code template "vm" is part of this plugin. Also add "ojs/ojmodule" to the require block.

Create an "index.html" file in the root folder of the project and reference the RequireJS library, while setting "js/main" as the "data-main", and notice that when you use the "ojModule" data binding to load your "home module, you have code completion and documentation to help you, for the first time. 

As a special bonus, go to the Template Manager, under the Tools menu, you'll be able to edit all the templates used by the New File dialog, including the Oracle JET templates, so that you can use them to generate whatever you like whenever a new Oracle JET module is created via the New File dialog.

Note: All the new features in the Oracle JET Support plugin come from the "SmartTools4OracleJET" plugin, which is now no longer needed. If you have it installed, uninstall it. It will also be removed from the Plugin Manager.

In NetBeans IDE 8.2, scheduled for August this year, the Oracle JET Support plugin will be a standard part of NetBeans IDE, you'll not need to install it yourself, i.e., all of these features will be available out of the box. 

Join the discussion

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