Friday, March 27, 2009

How to update Eclipse plug-in in P2 world?

Well, before p2 it was pretty easy - one just had to drop updated plug-in into eclipse\plugins directory, and after restart (using -clean) updated plug-in was immediately there. Excelent for testing. Of course what you dropped manually, was then not possible to uninstall using Update Manager.

With p2 there's a few more steps required. If you can't make a feature update (which would be perfect solution), you need a feature patch, that will tell p2 that some plug-ins need an update. It's pretty easy with PDE Create Feature Patch wizard - only two things to take care about:
1. Make sure you know, which feature originally contributes a plug-in that you want to update.
This information can be found in Help>About Eclipse>Feature Details and by pressing "Plug-in details" at the bottom of the window.

2. Be careful with setting the host feature version.
Make sure that host feature version is general enough to work for all your clients. For example, setting version to 4.4.2.v123 won't work for users with feature 4.4.2.v125. Altough feature patch will install without single warning, plug-ins will not be updated. Setting 4.4 instead will work for both 4.4.2.v123 and 4.4.2.v123 as well as any other 4.4.x.x versions.

Does anyone know if feature patches support version ranges?

Bonus: now user can easily install/uninstall the update in p2 UI without messing with files. Yuppi!

Couple more questions: what happens if there's more than one patch for a single feature? What if after applying a patch, feature is updated to version that still matches the patch?

ps. for those who know I don't read Eclipse tips - yes this is Eclipse tip, but while I do at least 1 patch per month, figuring out everything from scratch gets boring after some time :-P

Thursday, March 12, 2009

Do I want too much?

Ubuntu 9.04 turned out to be a proof of concept. Some kind of joke that should not be called OS. Sorry.

Will they finish it before April? Yes.
Will Ubuntu be something that I'd like to use further? I doubt.

Saying that something is finished does not mean that it is really complete. It means that there is no more time left. So Ubuntu 9.04 will be released even if it will be considerably slower than Idle Ibex.

I know exactly what is new in particular Eclipse release, but to gain this knowledge I do need to read new and noteworthy. I do work in Eclipse support.

API is finished when there is no more time left, too. What are the consequences? A lot of compatibility layers. Tons of compatibility code. More API, because we have to maintain old code.

I believe that current division into API and internal code is not sufficient. We need the third kind - the provisional API. But it should be supported by process, not just by commens in the internal code.

Turning provisional API into the real one should not require any refactoring. Provisional API should turn into the real one when it remains unchanged for one Eclipse release and no further work on this is planned (making bug as helpwanted *counts*).

The justification is quite simple - code is adopted after the release, and then no changes can be made. I do not believe that any self-respecting architect is using Eclipse 3.5 for serious development (and replaces necessary libraries every 6 weeks).

So, Eclipse 3.4 is a base for 3.5, and 3.5 feedback will be used for 3.6... But if something is wrong in 3.5 and was not discovered yet there is no chances to remove it. Real adoption of Galileo will show its shortcomings. Some of them will live forever. For sure.

Many people contribute to Eclipse. Would you be able to withdraw the result of your employee 1 year work? Would you?

Eclipse is built from contributions. You cannot require contributors and commiters to be more loyal to Eclipse than for their employees.

But you should do everything what possible to guarantee Eclipse quality and do not allow for becoming yet another "proof of concept".


Eclipse Debugger, part VIII

While everyone is waiting for Eclipse 3.5 M6 let's have a look at one of nice features introduces to the debug area in M5 - breadcrumb for the Debug View. Breadcrumb gets activated when Debug view is too small to display its content in the normal way:

Try it out and check how it can help you in your daily debugging.