use of org.eclipse.xtext.ui.editor.XtextEditorInfo in project xtext-eclipse by eclipse.
the class OriginalEditorSelector method getXtextEditor.
protected IEditorDescriptor getXtextEditor(URI uri) {
IResourceServiceProvider serviceProvider = resourceServiceProviderRegistry.getResourceServiceProvider(uri);
if (serviceProvider != null) {
XtextEditorInfo editorInfo = serviceProvider.get(XtextEditorInfo.class);
if (editorInfo != null) {
IEditorRegistry editorRegistry = workbench.getEditorRegistry();
IEditorDescriptor result = editorRegistry.findEditor(editorInfo.getEditorId());
// null is ok
return result;
}
}
return null;
}
Aggregations