mercredi 19 novembre 2008

Developing in Eclipse, modelling, reverse engineering and profiling in Netbeans.

As the old saying goes, "no size fits all"; even in the Java IDE world. I am a big fan of Eclipse as a development platform especially all the technologies that constitute the platform from SWT/JFace to GMF/EMF and RCP.
But not everything in Eclipse is as great as the above technologies and projects. 
Lately I had developed an application in Java/SWT/JFace as a tool to analyze performance metrics that are output by the software application that the company I currently work for sells and supports.
As the tool grew more complex and powerful, I had to reverse engineer and profile that application. Naturally in Eclipse one would use UML2Tools for modelling and TPTP for profiling. Problem is that I found UML2Tools to be a not so intuitive and ergonomic tool and that TPTP was a big pain in the neck to make it work once every ten attempts.
While looking at all possible alternatives (mainly free to use) I evaluated the Netbeans modeling and profiling modules. 
After some pain in making an SWT application compile and run from within Netbeans, I was impressed by the intuitiveness and easy of use of these two modules.
I think from now both Eclipse and Netbeans will be part of my Java development toolset.

Cheers,

mardi 11 novembre 2008

Making my first JFace application work.


I spent a few hours trying to make the simple HelloWorld JFace application from the book "The Definitive Guide to SWT and JFace" work. Had to go through a bunch of Internet forums and trial and error in order to make it work. The secret lies in the external jars that should be added to the build path of the project in Eclipse. Without these jars I kept getting the following error when trying to launch the application:

java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor

The minimum set I had to include to make the application work is the following:
  • org.eclipse.swt.xxx.jar
  • org.eclipse.jface.xxx.jar
  • org.eclipse.core.runtime.xxx.jar
  • org.eclipse.equinox.common.xxx.jar
  • org.eclipse.core.commands.xxx.jar
Hoping this will prove helpful to you...