How to customize EclipseChe menus and plugins

248 views Asked by At

I would like to do customization as below in Eclipse Che. Please share the reference information such as sample etc.

  1. Addition of original menu Would like to add items in right-click menu of the project and header menu of Eclipse Che.

  2. Call of extended-plugin processing from added menu From the menu added in 1., would like to call the processing of plugin created originally.

  3. Would like to apply the plugin extended in 2. in Eclipse Che.

1

There are 1 answers

2
Abhishek2k6 On BEST ANSWER

Here is an example for adding toolbar, you can add your menu using the same example. Please look into this page 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);
  /...
}
}