添加导出向导到 eclipse RCP 独立应用程序
你好 我正在尝试添加一个导出向导,类似于 Eclipse 中向独立 RCP 应用程序提供的导出向导。 我将以下代码放入plugin.xml中:
<extension
id="exportScript"
point="org.eclipse.ui.exportWizards">
<wizard
class="com.myApplication.scriptGenerator.ExportWizard"
id="com.myApplication.scriptGenerator.exid"
name="Export as Script">
</wizard>
但在“文件”菜单项中看不到向导。 我缺少什么?
谢谢 :)
Hi
I'm trying to add an export wizard, similar to the export wizard available in Eclipse to a standalone RCP Application.
I put the following code in plugin.xml:
<extension
id="exportScript"
point="org.eclipse.ui.exportWizards">
<wizard
class="com.myApplication.scriptGenerator.ExportWizard"
id="com.myApplication.scriptGenerator.exid"
name="Export as Script">
</wizard>
But no wizard can be seen in the File menu entry..
What am I missing?
thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您必须做两件事:
使用
org.eclipse.ui.exportWizards
扩展点(您已经这样做了)在您的应用程序
操作栏顾问
类中,首先创建用于导出的标准工作台操作,然后将其添加到任何菜单中。代码片段
>>完整代码 - ApplicationActionBarAdvisor
>>菜单条目
>>导出向导
You have to do two things:
Use
org.eclipse.ui.exportWizards
extension point (which you already did)In your Applications
action bar advisor
class first create the standard workbench action for export and then add it in any of your menu.Code Snippet
>>Full Code - ApplicationActionBarAdvisor
>>Menu Entry
>>Export Wizard
您应该在向导中实现此接口 INewWizard,例如:
并添加此扩展:
到你的plugin.xml
You should implement in your Wizard this interface INewWizard, like:
and add this extension:
to your plugin.xml
() 您尚未在plugin.xml 中指定文件的类别
() 如果您没有看到 File->New 项目本身,则需要通过 ActionFactory.NEW 或 ActionFactory.NEW_WIZARD_DROP_DOWN 操作或通过命令贡献它们来创建它们
() You have not specified the category of the File in your plugin.xml
() If you are not seeing the File->New item itself, you need create them by the ActionFactory.NEW or ActionFactory.NEW_WIZARD_DROP_DOWN actions or by contributing them by commands
1.创建菜单
2.在菜单上添加监听器
示例:-
1.Create a menu
2.add a listener on the menu
Example :-