From Project to Scenario

One of the powerful features of the NetBeans Platform is its project system. You can include NetBeans modules in your application that let the user choose File | New Project and then the user can begin creating a new project:

The dialog below then opens, where sample templates of your project type can be listed so that the user can get started with it easily:

The details on setting all this up is described in the tutorial, as well as in NetBeans Platform for Beginners.

However, what if we don't like the word "Project"? Instead, we want the word to be "Scenario", throughout all the UI of our application, in each menu item and dialog? Simply right-click the application and choose Branding:

In the Branding dialog, go to "Internationalization Resource Bundles" and then search for the word/s that you want to brand, e.g., "New Project":

Then a search is done through all the strings in the NetBeans Platform, which are all found in properties files. Each matching string can be right-clicked, as shown above, at which point you can type in a different word.

All changes you make are shown in bold:

After you click OK in the dialog above, open the Files window, expand the 'branding' folder of your application, and you will find that new properties files have been created, in a folder structure matching the folder structure where the original key/value pairs are found.

When you build the application, you'll find that a JAR is added for each NetBeans module that you have overridden with your branded words:

And now your words will override those from the NetBeans Platform. For example, you'll see "Scenario" everywhere, instead of "Project".

One small 'gotcha' is to be aware of the ampersands:

In other words, if you search for "New Project", you will not find your words if they have an ampersand (for quick access via accelerator keys that are created for them by the NetBeans Platform Action System).

And that's all, a very simple and effective mechanism for turning the Project system into a Scenario system.

Comments:

>>> "One of the powerful features of the NetBeans Platform is its project system."

This is so true. For our ground system software we use three different types of projects to manage daily operational workflow: Test Procedure Projects, Daily Operational Products projects and Monte Carlo projects (for simulation). The project workflow provides organization and custom actions to operators and analysts in a similar fashion to how developers leverage a Java or C++ project. The icing on the cake is the integrated CM repository support which allows operators and analysts to commit and exchange daily/experimental work all encapsulated within neat "project" containers.

Posted by Sean Phillips on May 19, 2014 at 05:37 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
2
3
8
9
10
19
24
25
26
27
28
29
30
31
      
Today