New Article: "Programming NetBeans Platform with IntelliJ IDEA"

The NetBeans Platform allows rapid construction of an application that has some advanced capabilities, including templates, undo/redo, auto update, and more. It is an alternative to Eclipse Platform for those that wish to use standard Java Swing user interface instead of the Eclipse SWT user interface. The NetBeans Platform grew organically from the lessons learned about application architecture learned by the NetBeans IDE development team. Some of those lessons included the need to isolate the various parts of the application into "Modules" and the need to organize user interface items of interest into a hierarchy of "Nodes".

The NetBeans Platform enjoys use in many Java Swing-based Java UI applications. Some developers have acquired proficiency with the IntelliJ IDE and may wish to maintain or develop an application based on the NetBeans Platform without having to use the NetBeans IDE. This brand new article, which includes the texts above, shows the necessary steps to allow the IntelliJ developer to edit, compile, and debug a NetBeans Platform application from within IntelliJ IDE: 

http://sett.ociweb.com/sett/settSep2013.html

Great article, it's a step by step guide to setting up the famous NetBeans Platform Quick Start in IntelliJ, including annotation processing and debugging.

Comments:

The android tools team moved from eclipse to intellij due to difficulty in extending eclipse. This is another case against eclipse. I believe Netbeans is as capable as intellij. It just needs more hands. Regards.

Posted by guest on September 09, 2013 at 03:01 AM PDT #

Hi Geertjan,
I think that your link: https://platform.netbeans.org/screenshots.html
is the best example why one should *not* use RCP (independent from whether it's Eclipse, NetBeans or something else). All applications look very similar, all application try to benefit from the default dialogs and windows (e.g. https://netbeans.org/images_www/screenshots/platform/nato.PNG), which - in my opinion - leads to using the same type of GUI which is not very user friendly and intuitive. Instead of going new ways in designing applications (see iOS or Android), RCP-applications (at least in your example) are not designed from a great user-experience, but from what the RCP most easily offers.
That's why I gave up learning RCP (for me as hobby programmer it's too complex) and still use the Swing Application Framework (JSR 296), which is really great for designing (desktop-)applications from the ground.
I would say, the way of designing a GUI should be: concept/idea of functions and how to best implement them considering usablity (form follows function). If I see RCP-applications, I have the feeling all are designed the other way round: what functions does (NetBeans-)RCP offer and how can we fit our application into this "corset", independent from whether it has great usability or not.
I have to clarify here, that I use NetBeans (non-RCP), because it's an absolutely great IDE, but I only use it because you provided the SAF-plugin for newer NetBeans versions...
Best wishes
Daniel

Posted by Daniel on September 10, 2013 at 06:04 AM PDT #

Daniel, I believe using the same type of GUI is very user friendly and intuitive. Things I've learned from using NetBeans IDE can immediately be applied to JMonkeyEngine SDK or to the hundreds of other NetBeans Platform applications. Secondly, if you're creating really large applications, you need modularity and a window system, plus many other basic features, none of which SAF even tries to provide. NATO and all the other organizations using the NetBeans Platform "corset" are extremely happy they made the decision to use the NetBeans Platform because it lets them focus on their business logic.

Posted by Geertjan on September 10, 2013 at 09:03 AM PDT #

A decent blog post about IntelliJ and NetBeans.

I'm not quite able to run the WordProcessor app because I still receive two errors from IntelliJ. These two are AnnotationTypeMismatchExceptions. I'm sure I'm missing something seemingly simple.

Error: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
java.lang.RuntimeException: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
at com.sun.tools.javac.main.Main.compile(Main.java:469)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:132)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:166)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:364)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:276)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:190)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:162)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:998)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:739)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:770)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:702)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:523)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:314)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:179)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:220)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:112)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:132)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
at com.sun.tools.javac.model.AnnotationProxyMaker$ValueVisitor$1AnnotationTypeMismatchExceptionProxy.generateException(AnnotationProxyMaker.java:264)
at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:75)
at $Proxy8.service(Unknown Source)
at org.netbeans.modules.openide.util.ServiceProviderProcessor.register(ServiceProviderProcessor.java:103)
at org.netbeans.modules.openide.util.ServiceProviderProcessor.handleProcess(ServiceProviderProcessor.java:87)
at org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.process(AbstractServiceProviderProcessor.java:117)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1108)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
... 24 more

Posted by Derek on September 10, 2013 at 09:48 AM PDT #

Perhaps, the difference is whether you want to create an application that is only internally used for in your own company. In this case you may not take "usability" into account. But think of applications made for "users" (customers, private users etc.). Except for coding/programming tools that often have similar (docked) windows like NetBeans platform, I don't know many apps that really look like that. Simply because it's not plain (simplicity) enough. The examples shown on the platform webpage are very technical applications, something that "normal" users mostly would not use.

I know of all advantages the platform technology offers. And I wish, SAF would have been developed further, so at least some more features would be included in the SAF. For me, it's more work to modify the GUI from the platform basic application to meet my needs that designing the GUI from the scratch, using SAF. I have coded an application that uses many windows, all of them were designed with the GUI builder in NetBeans. This app. is only about 3MB large, so there's no need for modular updates, I can simply update the whole app. In this case I did not need the advantages of the platform technology and could rely on a simple Java swing app. And I'm feeling comfortable with the SAF support according to window-management (saving position and size...).

Probably I really do largely misunderstand the usage of (NetBeans-)Platform - really helpful would be an example of a platform application that looks like, for instance, Evernote, 1Password or something like that. The "skeletal structure", the very basic platform GUI when creating a new NetBeans Platform project, looks even too much to me. I prefer starting completely from the scratch with my GUI...

Anyway, again I want to remark that I really enjoy using NetBeans, even if I only develop my apps with the SAF-plugin. ;-)

Posted by Daniel on September 10, 2013 at 12:46 PM PDT #

You don't know any apps that look like that? I guess you don't know about Gephi (gephi.org) and hundreds of other NetBeans Platform applications. Users of Gephi are pretty normal users, users of AgroSense (agrosense.eu) too, many of those applications don't have any technical end users at all. You wish SAF had been developed further to have more features? So, that means you don't understand SAF (as well as not understanding the NetBeans Platform), since SAF was explicitly intended not to have many features, the theory behind SAF is that developers don't really need many features in their frameworks, which is -- in my humble opinion -- totally absurd and the reason why large applications can't be based on SAF because you really need to have at least a window system and modularity if you're going to create large maintainable applications.

Posted by Geertjan on September 10, 2013 at 10:45 PM PDT #

In regards to the Error: java.lang.annotation.AnnotationTypeMismatchException

I had the same problem. I fixed it by adding a UppercaseFilter module dependency on WordEditorAPI

Posted by mike on December 11, 2013 at 10:09 PM PST #

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
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today