use of org.yakindu.base.xtext.utils.jface.viewers.FilteringMenuManager in project statecharts by Yakindu.
the class StatechartDefinitionSection method initContextMenu.
protected void initContextMenu(Control control) {
MenuManager menuManager = new FilteringMenuManager();
Menu contextMenu = menuManager.createContextMenu(control);
control.setMenu(contextMenu);
IWorkbenchPartSite site = editorPart.getSite();
if (site != null)
site.registerContextMenu("org.yakindu.base.xtext.utils.jface.viewers.StyledTextXtextAdapterContextMenu", menuManager, site.getSelectionProvider());
}
use of org.yakindu.base.xtext.utils.jface.viewers.FilteringMenuManager in project statecharts by Yakindu.
the class AbstractEditorPropertySection method initContextMenu.
protected void initContextMenu(Control control) {
MenuManager menuManager = new FilteringMenuManager();
Menu contextMenu = menuManager.createContextMenu(control);
control.setMenu(contextMenu);
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPartSite site = window.getActivePage().getActiveEditor().getSite();
site.registerContextMenu(CONTEXTMENUID, menuManager, site.getSelectionProvider());
}
Aggregations