Showing posts with label EModelService. Show all posts
Showing posts with label EModelService. Show all posts

Monday, September 15, 2014

How to get Eclipse EModelService from workbench ?


WorkbenchWindow activeWorkbenchWindow = (WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (activeWorkbenchWindow != null) {
MWindow window = activeWorkbenchWindow.getModel();
if (window != null) {
EModelService modelService = window.getContext().get(EModelService.class);

//your calls
}
}