views:

32

answers:

1

I'm developing an eclipse plugin for creating a plugin for another java platform.

I've managed to figure out the LaunchShortcut concept, LaunchDelegate, etc. The basic codepath of the plugin:

  1. I have a launchShortcut display if it detects the project right clicked is a "plugin" project.
  2. This is detected via a propertyTester
  3. Once successful, my launch shortcut runs, which finds an existing launch configuration, or creates a new one if non previously existed.
  4. This launch configuration is then launched via DebugUITools.launch(...)
  5. My LaunchDelegate is thus run, which sets up VMRunnerConfiguration for launching the "application" the plugin is to be loaded with. This is all done so we can easily use the debugger in eclipse against the launched application to test the plugin.

Up until this point, the world is happy and well. You can do this over and over and over again by right click project, go to run/debug, launch the plugin.

However, the SECOND you click the drop down in the Eclipse menu bar for run or debug (you know the list of apps previously run), from this point forward the right click on project no longer works.

The PropertyTester is not even invoked. Digging deep into the LaunchConfigurationManager shows that some how my launchShortcut no longer exists, which is especially strange since the list of shortcuts is only loaded once.

Anyways, I'm at a COMPLETE loss as to what Eclipse is doing here and what I need to do in order to make things happy again.

Any advice/help would be greatly appreciated. Thank you.

A: 

For those of you who may hit this problem later.

Apparently, your PropertyTester needs to be able to test java.lang.Object. If you do not do this and you try to test something like IJavaProject, your plugin will fail during the hover of the run drop down as it will not be able to use your property tester on certain objects (duh).

Whats not duh is when this happens, that your shortcut is removed from all possible places it can be used.

Eric Anderson