Login
Pass
Always remember me
Categories

Archive for the ‘Eclipse’ Category

An effective way to fight duplicated libs and version conflicting classes using Memory Analyzer Tool

In this blog post I suggest a very effective way to spot duplicated libs/classes in your java application. I found and used this tip during the integration phase on an application server – which is quite a common use case.

This tutorial will be very helpful in the following cases:

  • NoClassDefFoundError:  there are two different versions of the same class in your classpath.
  • Integration with unknown huge products (not osgi-ed):  detect multiple libs with the same version, and so reduce memory footprint.

Read the rest of this entry »

How to run UI tests on hudson.eclipse.org server (on a server without a window manager activated by default)

I’m currently trying to move GMF-Runtime build to Tycho (following GMF-Tooling). I asked for a job on the hudson.eclipse.org server for this new fast and simple build but I encountered an issue. And I found a solution.  Read the rest of this entry »

My EclipseCon Europe 2011 Feedback (Better late than never)

It was my second EclipseCon Europe. And the first difference that I encountered between the two conferences was during my trip

from Grenoble to Ludwigsburg. Last year, during the flight, the Swiss airline company offered me chocolates – this year the German airline gave me a camembert sandwich. (Which would you prefer?) OK, time to talk about #ECE2011 more seriously. I can’t cover all the great things so here is just a selection.

Read the rest of this entry »

Eclipse preferences customization

This post will show how to customize Eclipse RCP preferences. This came from the need to have a user friendly interface in our product instead of the rough default tree view of Eclipse preferences.

Default Eclipse preferences TreeView

Default Eclipse preferences TreeView

If you are not familiar with Eclipse preferences, you can have an in-depth look of how preferences works in this article by Lars Vogel.

First remove all the preferences you don’t need in your RCP. Some of these were brought in by 3rd party plug-ins such as JDT.

You’ll have to override the postWindowOpen() method of the WorkbenchWindowAdvisor application:

//Clean the preferences

PreferenceManager preferenceManager = PlatformUI.getWorkbench().getPreferenceManager();

for(Object elem : preferenceManager.getElements(PreferenceManager.POST_ORDER)){

if(elem instanceof IPreferenceNode){

//FILTER REGARDING THE NODE ID

if(((IPreferenceNode)elem).getId().equals("....")) {

preferenceManager.remove((IPreferenceNode) elem) ;

}

....

This gives you better visibility of your RCP preferences.

Next the idea is to build a new UI for this dialog, keeping the Eclipse PreferencePage mechanism. To show a quick preview of the result I made a mockup of this dialog using the WindowBuilder tool. With this tool, you can draw your UI very easily, though a background knowledge of SWT helps a lot.

WindowBuilder overview

Using mockups is a good practice to test your user interface and collect your team’s feedback. Here we clearly want to have an “OS X style” for our preferences. Once the mockup shows the interface the way you want it, you can  go ahead with your implementation using the code generated by WindowBuilder. The generated code is pretty clean and easy to modify.

Eclipse preference API

Next the goal is to integrate the PreferencePages to the new Dialog. In Eclipse you can define a preference page using an extension point. Thus a PreferencePage is bound to an ID. To find them you can use the PreferenceManager like this :

/**

* Find the IPreferenceNode from its id

**/


public static IPreferenceNode findNodeMatching(String nodeId) {

List nodes = PlatformUI.getWorkbench().getPreferenceManager().getElements(PreferenceManager.POST_ORDER);

for (Iterator i = nodes.iterator(); i.hasNext();) {

IPreferenceNode node = (IPreferenceNode) i.next();

if (node.getId().equals(nodeId)) {

return node;

}

}

return null;

}

Then, once you retrieve the IPreferenceNode, you can create the page in a Composite:

protected void openPreferencePage(String pageId,Composite parentComposite) {

IPreferenceNode node = PreferenceUtil.findNodeMatching(pageId) ;

node.createPage();

node.getPage().createControl(parentComposite) ;

}

In addition, I found it useful to reuse the Eclipse keyword contributions linked to those pages. To achieve this, I implemented my own listener inspired from the one in the default preference tree filter.

Here is a quick preview of the result:

I’ll be sharing more cool Eclipse stuff soon!

Comparing Eclipse and NetBeans RCPs

I recently had the opportunity to see a presentation about NetBeans RCP given by Geertjan Wielenga at AlpesJUG, and to chat with the speaker afterwards. We had an interesting discussion about how NetBeans RCP and Eclipse RCP compare to each other.

Some food for the trolls

Read the rest of this entry »

Bonita is the Best Eclipse-based Modeling Application !

As you may know, the BonitaSoft R&D team was honoured to receive the award of Best Eclipse Modeling Application during EclipseCon last month. We are very proud of that recognition.

Although the R&D team is considered the “winner” in this success, we are very aware that there are a lot of people who have been involved in the development of Bonita Open Solution. Maybe some of them do not even know it!

So, we want to thank a lot of people who really deserve it:

  • Thanks to the R&D team, who developed this product well enough to get attention from the Eclipse community.
  • Thanks to the BonitaSoft officers, who are driving the product to ensure it is succeeding in the world of BPM, and that it is really democratizing BPM.
  • Thanks to all the BonitaSoft employees who provide a lot of feedback and help to ensure that the product meets the expectations of day-to-day users.
  • Thanks to the entire community of BonitaSoft users and contributors, who provide feedback, report bugs, and suggest new ideas. They may not be really aware enough of how much their input helps make the product better and better.
  • And also thanks to the Eclipse community, and the other open-source communities we depend on, who very often solve our problems. There are lots and lots of people who helped us to develop Bonita Open Solution and even if they are not aware of it, they deserve a piece of this award.

And here it is:

Best Modeling Tool Award

This award is not only for a team or a company, it is also for a community of users and was earned because we had access to the knowledge of several communities of technical experts. Once again, a great example of how Open Source leads to great things!