简体   繁体   English

将自定义向导添加到eclipse插件中的新菜单

[英]Add custom wizards to new menu in eclipse plugin

I'm working on a plugin and I developed a custom wizard for creating new type of project in Eclipse Luna. 我正在开发一个插件,并且开发了一个自定义向导,用于在Eclipse Luna中创建新型项目。 By default it's added in other category. 默认情况下,它被添加到其他类别中。 My question is how to add it to File -> New menu, like on the picture, so users can access it easily? 我的问题是如何将其添加到“文件”->“新建”菜单中,就像在图片上一样,以便用户可以轻松访问它? I would like it to be positioned above Java Project. 我希望它位于Java Project之上。

在此处输入图片说明

This is a 'new wizard shortcut'. 这是“新向导快捷方式”。 You can use the org.eclipse.ui.perspectiveExtensions extension point to do this for a particular perspective. 您可以使用org.eclipse.ui.perspectiveExtensions扩展点针对特定的角度执行此操作。 Use the newWizardShortcut element. 使用newWizardShortcut元素。

For example: 例如:

<extension point="org.eclipse.ui.perspectiveExtensions"> 
    <perspectiveExtension 
        targetID="org.eclipse.ui.resourcePerspective"> 
        <newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/> 
    </perspectiveExtension> 
</extension> 

Adds a wizard to the resources perspective. 将向导添加到资源透视图。

Only wizards marked as Project wizard are put in the top section. 顶部只有标记为项目向导的向导。

You may need to do a 'Perspective > Reset Perspective' to get Eclipse to find the new extension. 您可能需要执行“透视>重置透视图”以使Eclipse找到新的扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM