在 Helios 下开发的 Eclipse 插件在 Juno 中不显示 [英] Eclipse plugin developed under Helios doesn't show in Juno

查看:23
本文介绍了在 Helios 下开发的 Eclipse 插件在 Juno 中不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为 Eclipse 开发了一个插件,在 Helios 中运行良好.我安装了 Juno,将插件 jar 放在 dropins 文件夹中,然后启动了 Eclipse,但是 插件在 Juno 中不起作用(我的额外菜单项不显示).

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.

所以我用 Juno 打开了插件开发项目,并尝试通过测试"下的启动 Eclipse 应用程序"来运行它.结果相同(无菜单项).我什至删除了最低版本(使用属性..."按钮).仍然没有喜悦.当我使用 Helios 执行上述操作时,它可以工作(菜单项显示).

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).

在我的必需插件"中,我有 org.eclipse.ui、org.eclipse.core.runtime、org.eclipse.jdt.core、org.eclipse.core.resources、org.eclipse.ui.控制台、org.eclipse.jface.text、都没有任何最小或最大版本.当我单击显示插件依赖关系层次结构"时,会显示这些相同的条目.一切似乎都井然有序,但我的应用似乎没有运行.

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.

插件注册表>(右键单击我的插件)>显示高级

插件注册表>(右键单击我的插件)>诊断

导致未检测到问题.

插件注册表>(右键单击我的插件)>开始

生成一个绿色三角形,但仍然没有菜单项.

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

我什至建立了一个功能更新站点;完全在 Helios 下,我创建了一个本地功能更新站点,从 Helios 插件目录中删除了 jar 文件,并从该站点安装了该应用程序.工作完美.但是当我以同样的方式从 Juno 安装时,它显示在插件注册表中,但同样没有菜单条目.它似乎正在被发现,只是没有明显运行(如预期位置缺少菜单项所示).

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).

Extensions >org.ecliipse.ui.menus >menuContribution 我在那里看到了我的菜单项,带有 locationURI=popup:org.eclipse.jdt.ui.PackageExplorer.Helios 和 Juno 之间是否因此而发生了一些变化?

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?

更新:空工作区安装中,它可以工作.我安装了一个单独的 Juno 副本并将其指向一个空的工作区,然后从本地功能更新站点安装.结果是应用程序正常运行.虽然这可能会提供一个线索,但这并不是一个解决方案",因为我有太多需要大量操作的项目,而且不值得走这条路.

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) 全新安装 Juno,打开一个空工作区,关闭 Juno,然后列出 eclipseconfigurationorg.eclipse.equinox.simpleconfiguratorundles 的内容.info 并在 eclipseplugins 中列出文件系统的内容.两者之间的唯一区别是以 .source 结尾的条目,这是预期的.2) 启动 Juno,指向我的 Helios 工作区的副本.帮助 >安装新软件...>添加...>本地...>(选择本地功能更新站点)>(取消选中按类别分组项目) 和其余部分以成功完成安装.3) 关闭Juno并注意到bundles.info中只有我的插件被添加,并注意到eclipseplugins中的文件系统中只有我的插件被添加.换句话说,它们中的每一个都有一个附加项目,即我的插件.4) 启动了 Juno,但我的插件中的菜单项没有显示,但所有指示(插件诊断)都表明它应该可以工作.5) 将插件 jar 复制到 dropins 文件夹,但没有改善.

Update2: 1) Did a fresh install of Juno, opened an empty workspace, closed Juno, then listed contents of eclipseconfigurationorg.eclipse.equinox.simpleconfiguratorundles.info and listed contents of the file system in eclipseplugins. 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 eclipseplugins. 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.

如果你有Eclipse的插件开发版本,那么你可以打开插件注册表视图.查看您的插件是否在列表中,如果是,则至少找到它.然后右键单击它,启用高级操作,然后选择诊断.有些要求可能没有得到满足.如果你没有 Eclipse 的 Plugin 版本,你可以使用 osgi 控制台.转到控制台视图,然后在视图菜单中选择 OSGI 控制台.运行命令 ss 列出所有插件,并运行 diag 123 ,其中数字是插件的 id 来诊断它.

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.

另外,查看之前对类似问题的回答

我在安装插件时遇到了一些​​严重问题dropins 目录有时可以工作...您可以尝试将其直接复制到 eclipse/plugins 目录中.或者像它应该处理的那样去做;为其创建功能和更新站点,然后从更新站点安装插件.

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.

在空的工作区安装中,它可以工作"

"In an empty workspace install, it worked"

哦,对了.您遇到了 bundles.info 文件的问题.请参阅此页面:

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

文件 bundles.info 包含当前系统中安装的所有插件的列表.启动时,此文件中列出的所有插件都将作为要运行的确切插件集提供给 OSGi.插件目录或其他地方的任何额外插件都会被忽略.

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.

现在检查您在 .metadata.pluginsorg.eclipse.pde.coreorg.eclipse.equinox.simpleconfigurator 中的工作区的文件.比较两个工作区中的文件,差异应该是您的文件.在您的第一个工作区中编辑该文件,以包含从您的第二个工作区的 bundles.info 中列出您的插件的行.

Now check your workspaces in .metadata.pluginsorg.eclipse.pde.coreorg.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.

bundles.info 文件可以强制更新,但手动编辑更简单.

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

这篇关于在 Helios 下开发的 Eclipse 插件在 Juno 中不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆