Monday, December 26, 2005

Simplified resource bundle handling with osgi.util.NLS

In eclipse 3.1 there is a new package org.eclipse.osgi.util.NLS. This class allows you to have simple access to a resource bundle.
public class MyMessages extends NLS {
private static final String BUNDLE_NAME = "gr.scharf.MyMessages"; //$NON-NLS-1$

public static String HELLO_WORLD;
public static String HELLO_SOMETHING;

static {
// initialize resource bundles
NLS.initializeMessages(BUNDLE_NAME, MyMessages.class);
}
}

And in the file gr/scharf/MyMessages.properties I put:
  HELLO_WORLD=Hello world!
HELLO_SOMETHING=Hello {0}!


Then access to the properties is very simple:
    System.out.println(MyMessages.HELLO_WORLD);
System.out.println(MyMessages.bind(MyMessages.HELLO_SOMETHING,"world"));


Pretty cool, I think, because it loads the strings from the .properties file into the Messages class transparently. This also helps searching for strings in the code, because it is the same name as in the .properties file.

Sunday, December 25, 2005

When workspaces don't build correctly....

I have some workspaces that are quite 'old'. They have been used with several versions of eclipse. It happens quite often, when I add or remove a project that those workspaces do not build. Eclipse complains that some project should be build first and I should clean the workspace. Well, cleaning the workspace does not help. So, I opened and closed some projects until I got it to work. Very frustrating! It seems that the build order is wrong.

Today, I had the problem again. But I looked at Preferences->General->Workspace->"Build Order". There nothing was set and "use default build order" was unchecked. I checked use default build order and now it works!

Am I the only one having this problem? I wonder if something has changed between two versions of eclipse and the "Build Order" setting did not migrate well and caused that problem.

Thursday, December 15, 2005

How to split eclipse plugins into features?

At the eclipse council meeting this week, we discussed pluging dependencies. There was some controversy on how to split features.

I think installable features should minimize external dependencies. If possible, put plugins that have no external dependencies (=depend only to the platform) into a feature. And put plugins with external dependencies into other features.

Some (bad) examples to illustrate the problem, of what happens if you create features that contain everything:

At the level of features EMF requires JDT. This means: although you can have a meaningful set of plugins (that is the EMF runtime) that do not require JDT, there is currently no way to properly install EMF without installing JDT (else you get some kind of errors in the error log).

The other bad example is the PDE error log: If you want to use the PDE error log, you have to install PDE and JDT. In practice, you can simply install org.eclipse.pde.runtime, and it works fine. However, if someone installs PDE in another extension location, eclipse will complain.

Therefore, installable features should allow you to use a "meaningful" set of plugins without pulling in the rest of the world...

Take-home message: When you create features ask yourself if there is a useful subset of plugins that has minimal external dependencies and create a feature for those. Others using these plugins will not be forced to install the rest.

Tuesday, December 06, 2005

eclipse news and findings 2005-12-05

Tuesday, November 01, 2005

HTMLSave saves files as HTML

htmlSave saves editor contents as HTML. It needs access to the text to extract the style information...

Tuesday, October 25, 2005

CDT: Mike Milinkovich starting talk


- eclipse fondation does not dictate what to do
- next june 9 projects will ship at the seame time next
year
- last 13 month committers doubled
- 3 * startegic membership
- cdt should become over-night sensation
- escape the java ghetto
- eclipse is not only about java
- eclipse ia about more language and platforms
- even microsoft regognizes eclipse: do you know how
expensive it is to use eclipse?
- eclipse commiters work for companies
- being predictable is very important
- eclipse wants to be predictable
- as apposed to GNU
- at appache it juts happens
- fundation wants to make the life of projects easy!
- commiters now live in silos
- Ward Cunningham will be the "free radical"
- break walls between projects
- about dev. process
- nurture committer culture
- we want people to feel proud to work for eclipse
- eclipse needs more successes
- cdt should become more successfull
- software takes time...
- php projects will be part of eclipse
- eclipse acts as a bridge to other OS
- linux
- mozilla as scalability
- big value of eclipse is how to embrace commercial
adoption

Q: have a session for managers about eclipse
A: business track at eclipsecon. There was also a panel.



Monday, October 17, 2005

Examples of eclipse RCP projects

A PDF document with screenshots of many RCP apps.

Ian Skerrett gives great insight into open source marketing

Ian Skerrett wrote a great article on open source marketing. He starts with: "Fire the marketers..."

Eclipse press release guidelines.

Eclipse press release guidelines. It explains, when a press release is triggered. Ian Skerrett, thinks fewer press releases is better....

Blog of Eclipse foundation members

Mike Milinkovich, Executive Director of the Eclipse Foundation..
Ian Skerrett, Director of Marketing with the Eclipse Foundation.
Bjorn Freeman-Benson, Technical Director, Open Source Process and Infrastructure for the Eclipse Foundation.