【问题标题】:Is there any way to add extension on Project Explorer to create new wizard project?有没有办法在 Project Explorer 上添加扩展来创建新的向导项目?
【发布时间】:2019-10-13 21:12:11
【问题描述】:
是否可以在“创建项目...”部分下添加我的特定项目向导?
我添加了这样的右键单击“新建”
<extension point="org.eclipse.ui.navigator.navigatorContent">
<commonWizard
type="new"
wizardId="com.XXX.projectWizard">
<enablement></enablement>
</commonWizard>
</extension>
【问题讨论】:
标签:
eclipse
configuration
eclipse-plugin
【解决方案1】:
视图将在此列表的开头为新项目向导添加“创建新 xxxx”行,这些向导使用 org.eclipse.ui.perspectiveExtensions 扩展点声明为当前透视图的 newWizardShortcut。
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/>
新向导必须是项目向导。
这还将向导添加到项目部分中“新建”菜单的顶层。