问题描述
我为Helios开发了一个可以正常工作的Eclipse插件。我安装了Juno,将插件jar放在dropins文件夹中,并启动了Eclipse,但是插入在Juno不起作用(我的额外菜单项不显示)。
当我查看插件时,我看到我的插件,在列表中。我认为它必须是某种版本问题(),但是当我创建插件时,我没有指定最大版本,只是最小版本。我确实注意到它没有像其他插件一样签名,但我不认为应该阻止它的工作。
所以我打开了插件,在Juno的开发项目中,尝试通过测试下的启动Eclipse应用程序运行它。相同的结果(没有菜单项)。我甚至删除了最小版本(使用属性...按钮)。还没有喜悦当我使用Helios进行上述操作时,它会工作(菜单项显示)。
在我的必需插件中,我有org.eclipse.ui,org。 eclipse.core.runtime,org.eclipse.jdt.core,org.eclipse.core.resources,org.eclipse.ui.console,org.eclipse.jface.text,所有没有最小或最大版本。当我点击显示插件依赖关系层次时,显示相同的条目。一切似乎都是顺序的,但我的应用程序似乎没有运行。
插件注册表> (右键点击我的插件)>显示高级
插件注册表> (右键点击我的插件)>诊断
导致未检测到问题。
插件注册表> (右键点击我的插件)>开始
导致绿色三角形,但仍然没有菜单项。
在扩展> org.ecliipse.ui.menus> menuContribution
我在那里看到我的菜单项, locationURI = popup:org.eclipse.jdt.ui.PackageExplorer
。 Helios和Juno之间有什么变化吗?
更新:在空的工作区中, 。我安装了Juno的单独副本,并将其指向一个空的工作区,然后从本地功能更新站点安装。结果是应用程序像往常一样。虽然这可能提供了一个线索,但这不是一个解决方案,因为我有太多的项目需要很多的时间,而且不值得去这条路线。
Update2: 1)全新安装Juno,打开一个空的工作空间,关闭Juno,然后列出 eclipse\configuration\org.eclipse的内容。在
。两者之间的唯一区别是以 eclipse\plugins
中的文件系统的列出的内容,可以使用equinox.simpleconfigurator\bundles.info .source
结尾的条目,这是预期的。 2)启动Juno,指向我的Helios工作区的副本。 帮助>安装新软件...>添加...>本地...> (选择本地功能更新站点)> (按类别取消选中组项目)
,其余的完成安装成功。 3)关闭Juno,并注意到只有我的插件被添加到 bundles.info
中,并注意到只有我的插件被添加到 eclipse中的文件系统\plugins
。换句话说,每个都有一个额外的项目是我的插件。 4)开始Juno,但从我的插件菜单项没有显示,但所有的迹象(插件诊断)表明它应该工作。 5)将插件jar复制到dropins文件夹,但没有改进。
有关下一步尝试的任何更多指南将不胜感激。
首先,您应该检查是否找到插件。
那么你应该检查插件是否被解决,即满足所有的要求。
如果您有Eclipse的插件开发版本,那么可以打开插件注册表视图。看看你的插件是否在列表中,如果是这样,那么至少它已经被发现了。然后右键单击它,启用高级操作,之后选择诊断。一些要求可能还没有实现。
如果没有Eclipse的插件版本,可以使用osgi控制台。转到控制台视图,并在视图菜单中选择OSGI控制台。
运行命令 ss
列出所有插件,而$ code> diag 123 其中号码是您的插件的ID诊断它。
此外,
我已经有一些获取放置在dropins目录中的插件有时工作...您可以尝试将其直接复制到 eclipse / plugins
目录中。或者像它应该处理的一样;创建一个功能和更新站点,并从更新站点安装插件。
编辑:
工作区安装,它工作
哦,对。您正在遇到 bundles.info
文件的问题。请参阅:
现在检查您的工作空间位于 .metadata\.plugins\org.eclipse.pde.core\org.eclipse.equinox.simpleconfigurator
中。比较两个工作区的文件,区别应该是你的文件。编辑您的第一个工作区中的文件,从您的第二个工作区的bundles.info中包含列出您的插件的行。
bundles.info文件可以提前更新,但手动编辑更简单。
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.
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:
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.
这篇关于在Helios下开发的Eclipse插件不会在Juno中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!