【发布时间】:2017-08-29 08:27:02
【问题描述】:
我想在 Eclipse Che 中进行如下定制。 请分享样品等参考资料。
添加原始菜单 想在项目的右键菜单和Eclipse Che的头菜单中添加项目。
从添加的菜单调用扩展插件处理 从1.中添加的菜单中,想调用原来创建的插件的处理。
想在 Eclipse Che 中应用 2. 中扩展的插件。
【问题讨论】:
-
使它更具可读性,但仍然在 SO 上偏离主题
标签: eclipse-che
我想在 Eclipse Che 中进行如下定制。 请分享样品等参考资料。
添加原始菜单 想在项目的右键菜单和Eclipse Che的头菜单中添加项目。
从添加的菜单调用扩展插件处理 从1.中添加的菜单中,想调用原来创建的插件的处理。
想在 Eclipse Che 中应用 2. 中扩展的插件。
【问题讨论】:
标签: eclipse-che
这是添加工具栏的示例,您可以使用相同的示例添加菜单。 请查看此页面https://www.eclipse.org/che/docs/assemblies/sdk-actions/index.html
@Extension(title = "Sample Actions Extension", version = "1.0.0")
public class SampleActionsExtensions {
@Inject
public SampleActionsExtensions(HelloWorldAction helloWorldAction, ActionManager actionManager) {
actionManager.registerAction("helloWorldAction", helloWorldAction);
actionManager.registerAction("helloWorldActionWithIcon", helloWorldActionWithIcon);
/...
DefaultActionGroup sampleGroup = new DefaultActionGroup("Sample actions", true, actionManager);
sampleGroup.add(helloWorldAction);
// add sample group after help menu entry
DefaultActionGroup mainMenu = (DefaultActionGroup)actionManager.getAction(GROUP_MAIN_MENU);
mainMenu.add(sampleGroup);
// add the sample group to the beginning of the toolbar as well
DefaultActionGroup toolbar = (DefaultActionGroup)actionManager.getAction(IdeActions.GROUP_MAIN_TOOLBAR);
toolbar.add(helloWorldActionWithIcon);
/...
}
}
【讨论】: