eclipse - 在 eclipse project explorer 上下文菜单中添加 "Project"以上的项目

标签 eclipse eclipse-plugin ide contextmenu project-explorer

我正在为我们的开发环境开发基于 eclipse 的定制 IDE。
在我的新视角中,我包含了一个“Project Explorer”,因为我能够在上下文菜单中添加命令,但是当我在“new”类型中包含一个新向导(A project Wizard)时,它显示在“项目”向导

The CARD file should be above "Project..."

我希望它高于它。

"Plugin-in Project" comes before "Project..."

已附加此代码段的 plugin.xml

<extension point="org.eclipse.ui.navigator.navigatorContent">
      <commonWizard
              type="new"
              wizardId="dev.xxx.wizard.XXXProject">
              <enablement></enablement>
      </commonWizard>
</extension>

当我从 Toolbar 或 MenuBar 访问 New 时显示(在我将它添加为布局中的快捷方式之后,在 IPerspectiveFactory

的实现中)

enter image description here

但出于某种原因,它没有出现在“Project Explorer”下。但它在“导航器 View ”下工作正常

enter image description here

最佳答案

使用 org.eclipse.ui.perspectiveExtensions 扩展点为您的新项目向导定义一个 newWizardShortcut 条目。

类似于:

<extension
     point="org.eclipse.ui.perspectiveExtensions">
  <perspectiveExtension
        targetID="org.eclipse.jdt.ui.JavaPerspective">
     <newWizardShortcut
           id="org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard">
     </newWizardShortcut>
  </perspectiveExtension>

您可能必须进行“重置透视”才能使更改生效。

您还可以在“快捷方式”选项卡的“窗口 > 自定义透视”对话框中设置这些快捷方式。

关于eclipse - 在 eclipse project explorer 上下文菜单中添加 "Project"以上的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30910813/

相关文章:

ide - 理性软件架构师(RSA)与理性应用开发者(RAD)IBM产品对比

c++ - 为 C++ 设置窗口

java - 使用 JFace 渲染表中重复元素的索引

java - Eclipse Oxygen 项目链接到类文件而不是源文件

eclipse-plugin - 分发带有依赖项的 Eclipse 插件

java - 尝试安装 Eclipse w/ADT 插件

visual-studio - Visual Studio(或 resharper)变量和方法着色

eclipse - IntelliJ IDEA中如何跳出括号

Android 从 Eclipse 构建中排除文件

java - 在 RCP 插件中哪里可以找到notes.exe