To show a part anywhere you should define a command
in the application model and a handler
for the command. To show a part in the handler use:
@Execute
public void execute(EPartService partService)
{
MPart mpart = partService.showPart(part id, PartState.ACTIVATE);
}
In the application Part
definition for your part add a Popup Menu
to the Menus
section. In the popup menu define a HandledMenuItem
for your command.
To register the popup menu as the context menu for a control (tree, table etc) use:
@Inject
private EMenuService;
...
menuService.registerContextMenu(control, menu id);