3

I developed a plug-in for Eclipse that has been working fine in Helios. I installed Juno, put the plug-in jar in the dropins folder, and started Eclipse, but the plug in does not work in Juno (my extra menu item does not show-up).

When I view plug-ins, I see my plug-in in the list. I figure it must be some kind of version problem (something like this), but when I created the plug-in, I did not specify a max version, only minimum versions. I did notice it's not signed like the rest of the plug-ins, but I don't think that should stop it from working.

So I opened up the plug-in development project with Juno and tried to run it via "Launch an Eclipse application" under "Testing". Same result (no menu item). I even removed the min version (using the "Properties..." button). Still no joy. When I do the above with Helios, it works (menu item shows).

In my "Required Plug-ins", I have org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.jdt.core, org.eclipse.core.resources, org.eclipse.ui.console, org.eclipse.jface.text, all without any min or max versions. And those same entries show when I click "Show the plug-in dependency hierarchy". Everything seems to be in order, yet my app doesn't seem to run.

Plug-in Registry > (right click on my plugin) > Show Advanced

Plug-in Registry > (right click on my plugin) > Diagnose

results in a No problems detected.

Plug-in Registry > (right click on my plugin) > Start

results in a green triangle, but there is still no menu item.

I even set up a feature update site; completely under Helios, I created a local feature update site, removed the jar file from the Helios drop-ins directory, and installed the app from the site. Worked perfectly. But when I installed from Juno the same way, it showed in the plug-in registry, but again, no menu entry. It seems to be getting found, just not apparently running (as indicated by the lack of a menu item in the expected place).

Under Extensions > org.ecliipse.ui.menus > menuContribution I see my menu item there, with locationURI=popup:org.eclipse.jdt.ui.PackageExplorer. Did something change between Helios and Juno with this maybe?

Update: In an empty workspace install, it worked. I installed a separate copy of Juno and pointed it at an empty workspace, then installed from the local feature update site. The result was that the application behaved as usual. Although this might offer a clue, it's not a "solution" because I have too many projects that would need a lot of twiddling, and wouldn't be worth it to go this route.

Update2: 1) Did a fresh install of Juno, opened an empty workspace, closed Juno, then listed contents of eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info and listed contents of the file system in eclipse\plugins. The only difference between the two was the entries ending in .source, which is expected. 2) Started Juno, pointing to a copy of my Helios workspace. Help > Install new software... > Add... > Local... > (select local feature update site) > (uncheck Group items by category) and the rest to finish installation successfully. 3) Closed Juno and noted that only my plugin was added to bundles.info, and noted that only my plugin was added to the file system in eclipse\plugins. In other words, each of those had one additional item which was my plugin. 4) Started Juno but the menu item from my plugin did not show, yet all indications (plugin diagnose) indicated it should work. 5) Copied the plugin jar to dropins folder, but no improvement.

Any more guidance as to what to try next would be appreciated.

Community
  • 1
  • 1
Dale
  • 5,520
  • 4
  • 43
  • 79

1 Answers1

2

First you should check if the plugin is found. Then you should check if the plugin is resolved, i.e if all requirements are fulfilled.

If you have the plugin development version of Eclipse, then you can open the plugin registry view. See if your plugin is in the list, if so, then the atleast it has been found. Then right click on it, enable advanced operations, and after that choose diagnose. Some requirement has probably not been fulfilled. If you dont have the Plugin version of Eclipse, you can use the osgi console. Go to console view, and choose OSGI console in the view menu. Run command ss to list all plugins, and diag 123 where the number is the id of your plugin to diagnose it.

Also, see a previous answer to a similar question

I have been having some serious problems getting plugins placed in the dropins catalog to work at times... You could try to copy it to the eclipse/plugins catalog directly. Or do it like its supposed to be handled; Create a feature and an update site for it and install the plugin from the update site.

Edit: "In an empty workspace install, it worked"

Oh, right. You are running into issues with bundles.info file. See this page:

The file bundles.info contains a list of all the plug-ins installed in the current system. On startup, all the plug-ins listed in this file are given to OSGi as the exact set of plug-ins to run with. Any extra plug-ins in the plugins directory or elsewhere are ignored.

Now check your workspaces in .metadata\.plugins\org.eclipse.pde.core\org.eclipse.equinox.simpleconfigurator for the file. Compare the files from the two workspaces, the difference should be your file. Edit the file in your first workspace to contain the row listing your plugin from the bundles.info from your second workspace.

The bundles.info file can be foreced to be updated, but manual edits are simpler.

Community
  • 1
  • 1
Fredrik
  • 10,626
  • 6
  • 45
  • 81
  • Thanks @Fredrik. I merged your suggestions into the question. Still no joy, but I'm learning. – Dale Mar 27 '12 at 16:09
  • @Dale Have you tried running the source on Juno? If you open the project and choose to run it as an Eclipse application then you could put breakpoints in the activator class and the class that handles the menu, that might give you some ideas on whats going on. – Fredrik Mar 27 '12 at 21:32
  • Yes I have tried that. I didn't see anything different, but I'll try it again. – Dale Mar 27 '12 at 22:35
  • 1
    I found a work-around. I removed the plug-in development project from my workspace folder, then created a new plug-in project (File > New > Plug-n Project). I just copied over the components from the Helios version (it's not a big project). So in other words, I re-created the plug-in under Juno, and it works fine now. – Dale Mar 28 '12 at 15:01