简体   繁体   English

Eclipse DLTK:向ScriptExplorerPart的“新建”菜单添加向导

[英]Eclipse DLTK: Adding wizards to the 'New' menu of ScriptExplorerPart

I'm trying to add a wizard entry to a ScriptExplorerPart of the Dynamic Languages ToolKit for Eclipse. 我正在尝试向Eclipse的Dynamic Languages ToolKit的ScriptExplorerPart添加向导条目。

The wizards are accessible from File->New->Other... , so at least I know they work. 可以从File->New->Other...访问向导,所以至少我知道它们有效。 They are added using the extension point org.eclipse.ui.newWizards . 它们是使用扩展点org.eclipse.ui.newWizards添加的。 What I would like is to have them added as indicated on this screenshot . 我想要的是按照此屏幕截图所示添加它们。

To start with I figured it should probably be done using the extension point org.eclipse.ui.navigator.navigatorContent , as suggested in this eclipse newslist . 首先,我认为它可能应该使用扩展点org.eclipse.ui.navigator.navigatorContent ,如本eclipse新闻列表中所建议的那样 This does not work however, as it seems like DLTK does not honor that extension point. 然而,这不起作用,因为似乎DLTK不尊重该扩展点。

So, if anyone could point me in the right direction with regards to the correct extension point to use, or if there is another (better) way to add wizard shortcuts, I would much appreciate it. 所以,如果任何人都可以指出我正确的方向使用正确的扩展点,或者如果有另一种(更好的)方法来添加向导快捷方式,我将非常感激。

although this question is a bit old: perspectives control the shortcuts in the menus. 虽然这个问题有点旧:透视控制菜单中的快捷方式。 you can use the extension point org.eclipse.ui.perspectiveExtensions to add your wizard to new. 您可以使用扩展点org.eclipse.ui.perspectiveExtensions将向导添加到new。 it should look something like this: 它应该看起来像这样:

<extension
     point="org.eclipse.ui.perspectiveExtensions">
  <perspectiveExtension targetID="yourPerspective">
    ....
     <newWizardShortcut
           id="idOfYourNewWizard">
     </newWizardShortcut>
  </perspectiveExtension>
</extension>

your wizard will then show up under File > New . 然后,您的向导将显示在“ File > New
for more information, consult those two links: 有关更多信息,请参阅以下两个链接:

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_advext_perspectiveExtension.htm http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_advext_perspectiveExtension.htm
and
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_perspectiveExtensions.html http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_perspectiveExtensions.html

Found this answer but it no longer works in the new eclipse plugin. 找到了这个答案,但它不再适用于新的eclipse插件。 Just want to provide a working solution for the current version: 只想为当前版本提供有效的解决方案:

go to plugin.xml –> Extensions –> org.eclipse.ui.navigator.navigatorContent (create if not existing) –> New –> commonWizard 转到plugin.xml - > Extensions - > org.eclipse.ui.navigator.navigatorContent(如果不存在则创建) - > New - > commonWizard

and then 接着

type: new for the New submenu and import for Import submenu type:new用于New子菜单,import用于Import子菜单

wizardId: the id of your wizard for new/import wizardId:新建/导入向导的ID

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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