Search code examples
javaeclipse-plugineclipse-pde

There is no handler to execute for command


I've been trying to build my first eclipse plugin where I can select a bit of text and then move it to the left or right with alt+left and alt+right. If I launch my plugin as an eclipse application, everything works fine and my plugin works. However, when I export my plugin as a deployable plugin with the destination as "Install into host" and run the command, sometimes I'll get There is no handler to execute for command sirolf2009-eclipse-tools.commands.MoveSelectionLeft. Other times I'll get

Exception occured when loading the handler
Plug-in sirolf2009-eclipse-tools was unable to load class com.sirolf2009.eclipsetools.handlers.MoveSelectionLeft.
com.sirolf2009.eclipsetools.handlers.MoveSelectionLeft cannot be found by sirolf2009-eclipse-tools_0.0.1.SNAPSHOT

I tried checking the jar that was generated during the export and it contains a class at the right location. I've uploaded the jar here


Solution

  • Be sure to increment the version number (Bundle-Version) in the MANIFEST.MF each time you install in to Eclipse so that it knows the plug-in is new.

    You can change any of the first 3 parts of the number, the 4th part is not checked.