Eclipse RCP: What to do when things don’t work on your colleague’s machine

I have compiled a list of potential pitfalls, that one might step in when executing code on another system:

  • Check your IDs
  • Check them again
  • Does your product contain all nessesary Plugins/Features
  • Does your run-configuration (the one generated by selecting Run on your product) contain all your plugins? Did you press Add required plugins
  • If you use features, check them! Are all plugins present?
  • Help system: If your help system does not show: Double check that the Plugin-Editor did not swallow your context definitions. They are often gone if I simply open the editor. Topics do not disappear…
  • Check if all help system dependencies are present in your run-configuration. Start by adding all *help*-plugins, continue with *jetty* and *servlet*. Then press Add required plugins. That should do the trick.
  • If you know of any other helpful tricks, please let me know!

Eclipse RCP: The dreaded Plugin ID

Hi all!

Apologies for not updating this blog lately.

As I want to talk a little bit about my experiences with Eclipse RCP, I think it is suitable if I tried to write in english. Perhaps this can be helpful for non-german speakers aswell, as information/documentation about E-RCP is a little sparse.

So… lately I had the chance to be a part of a Eclipse RCP project, which I greatly looked forward to! As I took a deep-dive into the concepts, I noticed that things work very differently compared to web-applications or even Swing applications.

In case you are interested, I mostly refered to 2 books, namely

Additionally there is one blog by a guy called Lars Vogel, which I appreciate very much! Thanks for the great effort Lars!

By now, our project has produced a niffty little prototype of the soon-to-be greatest RCP-application. Though none of our design decisions are written in stone yet (e.g. I am not sure whether we should use editors for our inputs or just views), I think/hope I have more or less understood the framework.

But there is at least one thing, that bothers me time and time again:

The ubiquitous Plugin ID. I cannot complain much about the basic concept: Of course a plugin has to have an unique identifier, and when you refer to a specific plugin, you have to use this Plugin ID. But again and again I have spent ages looking for some error/non-functional bits while finally noticing that I used the wrong ID.

So I could just end up blaming me. What I am missing though is some kind of assistance from the framework itself, saying „Man! You are looking for a plugin named, but I only know the following plugins:“ I think that would save us a lot of time.

Lately I was implementing context-sensitive help. But I could not figure out, why hitting f1 on a text field did not do anything. This blog then showed me, where to place a proper breakpoint to take a peek into the help-listener. It showed that the context-arrays where simply empty. So no context help could be seen. At least I saw that the keybinding worked. After debugging a few hours I was basically stuck. I made a few steps back and made a small sample project. At first I experienced the same issues… is Ganymede broken? I then realized that I did not provide the Plugin ID but the package name (which had a different case). I changed cases and voila it worked. Again I debugged to the help-listener and behold: The context array had one element.

What I am asking myself right now is: Why doesn’t Eclipse tell me that it does not register my context (or puts it somewhere only it knows). Life would be easier! :) It is seldom obvious to me what happens internally, when Eclipse executes a specific functionallity. At least I need an easier way to find places to debug to.

Perhaps I’m just missing some point…

Until then I only can repeat what the aforementioned books told me before:

BE  VERY CAREFULL WHEN YOU USE PLUGIN-IDS as there is no safety net!

Warum sind checked exceptions so schlimm?

Momentan sieht man auf jedem dritten Blog bei Dzone, die Überschrift "Checked Exceptions are bad". Aber ich habe bisher noch nicht ganz verstanden warum!

In einem Fehlerfall (bspw. bei einer klassischen IOException) ist diese Art Exception-Handling doch eigentlich ganz sinnvoll. Selbstverständlich haben Exceptions nichts im Kontrollfluss verloren. Ich habe vielleicht den Punkt auch noch nicht verstanden.

Sollte ich irgendwann verstehen warum (oder warum nicht), versuche ich daran zu denken, hier nochmal was zu schreiben.

Ein Eclipse Webprojekt migrieren

Ich vergesse hin und wieder folgende Schritte durchzuführen, von daher eine kleine "Note-to-self":
Falls man ein bestehendes Eclipse (Web-)Projekt migriert, muss man

  • folgenden Artikel lesen


  • die Datei [code]org.eclipse.wst.common.component[/code]anpassen, um Context-Root und den Anzeigenamen einzustellen.
    Hierfür sieht besagte Datei zwei Schlüssel vor [xml][/xml] und
    [xml] [/xml]vor.

Mein erstes jQuery Plugin.

Ich mag jQuery! In vielen Software-Projekten, findet man einen Wildwuchs an selbstgestrickten JavaScript „Lösungen“. Wenn man Probleme im Browser sauberer lösen möchte, so bietet sich jQuery, als einfaches aber auch mächtiges Werkzeug an. Ich habe es in einigen Projekten einsetzen können und es hat sich bisher immer bewährt. Continue…

Eclipse 3.2.1 Out of Memory Error

Heute habe ich mich den ganzen Tag mit einem "PermGem" Out of Memory Error in Eclipse herumgeärgert. An durchgehendes Entwickeln war nicht zu denken, da Eclipse in relativ kurzen Abständen abgestürzt ist, besonders beim Aufrufen von jsps (bzw. der entsprechenden Editoren). Im Taskmanager selber habe ich kaum nennenswertes entdecken können, sprich Speicherauslastung von ~250MB. Eigentlich sollte das kein Problem bei 2GB Hauptspeicher sein. Googlen ergab dann den Tipp mit den Argumenten in der eclipse.ini herumzuspielen. Folgenden Parameter waren eingestellt:

Bei vielen Leuten hat die letzte Zeile Abhilfe geschaffen (so auch bei einem Kollegen):

Dieses beschreibt den "Objekt-Speicher" der JVM. Dieser läuft laut der Fehlermeldung über.

Allerdings half dieses bei mir nicht. Wichtig an dieser Stelle soll (laut vieler Postings) das Platzieren der Parameter nach dem Eintrag

Fürs Erste geholfen hat das Deaktivieren des Exadel-Plugins, so daß ich zumindest weiterarbeiten konnte.

Die schönen Web-Editoren vermisse ich trotzdem.