在“项目”上方添加项目在Eclipse Project Explorer的上下文菜单中 [英] Add item above "Project" in eclipse project explorer contextmenu

查看:156
本文介绍了在“项目”上方添加项目在Eclipse Project Explorer的上下文菜单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我们的开发环境开发基于eclipse的自定义IDE。

在我的新视角中,我包括了 Project Explorer,并且能够在上下文菜单中添加命令,但是当我在新类型中包含新向导(项目向导)时,该向导显示在项目向导下方

I am working on an eclipse based customized IDE for our development environment.
In my new perspective I have included a "Project Explorer" and in that I am able to add commands in the context menu, but when I include a new Wizard (A project Wizard) in the "new" type it is shown beneath the "Project" wizard

d希望它高于它。

>

此代码段的plugin.xml已附加

The plugin.xml for this snippet is attached

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

当我访问 New 时显示从工具栏或菜单栏(在我将其添加为布局的快捷方式之后,在 IPerspectiveFactory

It is being shown when I access New from Toolbar or MenuBar (after I added it as a shortcut in layout, in an implementation of IPerspectiveFactory

但由于某些原因,它未显示在 Project Explorer下。但是在导航器视图下工作正常

but for some reason it is not showing up under "Project Explorer". But its working fine under "Navigator View"

推荐答案

使用 org.eclipse.ui.perspectiveExtensions

Use the org.eclipse.ui.perspectiveExtensions extension point to define a newWizardShortcut entry for your new project wizard.

$ c>扩展点为您的新项目向导定义 newWizardShortcut 条目。 >

Something like:

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

您可能需要做一个重置角度来获取更改。

You might have to do a 'reset perspective' to get the change picked up.

您也可以在快捷方式标签的窗口>自定义透视图对话框中设置这些快捷方式。

You can also set up these shortcuts in the 'Window > Customize Perspective' dialog in the 'Shortcuts' tab.

这篇关于在“项目”上方添加项目在Eclipse Project Explorer的上下文菜单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆