How to Analyze Java Desktop App Features Prior to Porting to the NetBeans Platform

Porting an application to the NetBeans Platform is an intricate process precisely because an application's features tend to be tangled throughout the application. It would be pretty handy if you could somehow analyze your application to determine where all the code related to a particular self-identified feature is found. For example, imagine if we'd be able to annotate entry points into features (however you define those entry points is up to you) as follows:
@FeatureEntryPoint( "program startup" )
public static void main(String[] args) {
        UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);
        DataInfo di = new DataInfo();
        NDVis nv = new NDVis(di);

Next, we would run an analyzer on our application. Many details about the tangledness of our features would then be determined, i.e., every piece of our code that is called by the entry point above would be marked in the IDE, as follows:

Take note of the vertical bar on the left of the screenshot above. That shows that the current piece of code is part of a self-identified feature (i.e., it is called during the execution of that feature). And when I hover on that vertical bar I can see, as can be seen above, the name of the feature to which it belongs.

But that's kind of only the tip of the iceberg. The movie of how this analyzer works is worth watching. I made that movie while I was in Denmark recently, where Andrzej Olszak, the analyzer's lead developer, demonstrated it during a course.

The point is that now it is available here from the Plugin Portal and here is the related website with all details, including a tutorial that uses the Anagram Game.


Post a Comment:
  • HTML Syntax: NOT allowed

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.


« March 2015