0

I'm working on an Eclipse (editor) plugin and trying to change its ID. Whenever I do that, I get lots of ClassNotFoundExceptions, e.g. for my TextEditor subclass.

I did replace the PLUGIN_ID string literal in the Activator (the AbstractUIPlugin subclass), but that didn't help.

What do I have to do to change the plugin ID of an Eclipse plugin?

1 Answer 1

0

The plugin ID seems to be not only stored in the project, but also (temporarily) in the workspace you're developing it in, e.g. in the file ${workspace_loc}\.metadata\.plugins\org.eclipse.pde.core\Eclipse Application\dev.properties, which seems to store the path to the bin folder for each plugin you're working on. You can see that by opening your run configuration and looking at the configuration location shown on the 'Configuration' tab.

The easiest way to update this is apparently to just restart Eclipse (the one you're developing in, not the target platform). That will update these files and the plugin should then work with the new ID. You might also get away with selecting the 'Clear the configuration area before launching' on your run configuration.

So the steps are:

  1. Open the plugin.xml editor and change the ID field on the Overview tab.
  2. Update the string PLUGIN_ID in your Activator to the same value.
  3. Restart Eclipse.

PS: I can no longer easily reproduce this problem. Updating the ID of my plugin now also seems to update the references in my workspace. I'll keep this around though, maybe it helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.