简体   繁体   中英

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

在此处输入图片说明

This is a 'new wizard shortcut'. You can use the org.eclipse.ui.perspectiveExtensions extension point to do this for a particular perspective. Use the newWizardShortcut element.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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