org.eclipse.xtext.ui.editor.XtextEditorInfo Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.XtextEditorInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OriginalEditorSelector.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
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()); return result; // null is ok } } return null; }