Eclipse/RCP: Overwrite a default handler in your view

Veröffentlicht von

In my RCP application CTRL + S is assigned to the save function of the current editor. Addional I wanted to have the same shortcut for a save function in a view.

This can be achieved very easy (as always, if you know the steps). 🙂

In the views plugin, add a handler to the org.eclipse.ui.handlers section of your plugin.xml:


This causes the command only to be active in our view. Next thing is to define the proper handler class which performs the operation:


In XML it looks like that:

<extension point="org.eclipse.ui.handlers">
  <handler class="" commandid="">
        <with variable="activePartId">
           <equals value="">

Thats it!

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert