问题
I have an Eclipse plugin using RCP and Eclipse 4.5.2. This plugin is for developing a project of type "X". Right now, under File > New > Project... I have "X" within a category of "MyPlugin". I'd have to expand "MyPlugin" then double click on "X" to open the X version of the new project wizard.
Is it possible to pre-select "X" when clicking on File > New > Project...?
This would mean the category "MyPlugin" would have to be automatically expanded to show the pre-selected "X". Here's a snippet of my plugin.xml where the new project wizard for X is defined:
<extension point="org.eclipse.ui.newWizards">
<wizard
category="com.mycompany.myproduct.core.ui.newWizards"
class="com.mycompany.myproduct.newXProjectWizard"
finalPerspective="com.mycompany.myproduct.ui.XPerspective"
hasPages="true"
icon="icons/project_new.gif"
id="com.mycompany.myproduct.newXProjectWizard"
name="%Names.NewProject"
preferredPerspectives="com.mycompany.myproduct.XPerspective"
project="true">
<description>
Create a new X project
</description>
</wizard>
</extension>
来源:https://stackoverflow.com/questions/38963427/eclipse-rcp-how-to-pre-select-a-new-project-wizard