0

I am creating a custom editor via the extension point org.eclipse.ui.editors. This works all well. Let's say this is given the id=my.custom.editor.id

Now, I would like to define a popup menu for my editor within my fragment.e4xmi. I do not seem to get this to work. I tried creating a menuContribution with the Parent-ID:my.custom.editor.id, but when I try to activate the menu in my editor with menuService.registerContextMenu, I can see that no menu is associated to my editor part.

What is the correct way to create such a context menu?

user3726374
  • 583
  • 1
  • 4
  • 24
  • What sort of editor? What does it extend? Things like TextEditor have existing code to set up menus and you have to work with them. – greg-449 Feb 04 '22 at 13:05
  • @greg-449 I am extending `org.eclipse.ui.part.EditorPart` – user3726374 Feb 04 '22 at 13:09
  • 1
    I believe `EMenuService.registerContextMenu` only looks for menus defined in the current MPart. I don't know if there is a way to set that up for the legacy part used by old style editors. – greg-449 Feb 04 '22 at 13:21
  • @greg-449 Thanks for your assessment. I changed my editor to a native e4 part by using the `IEditorLauncher` interface. – user3726374 Feb 21 '22 at 08:41

0 Answers0