Class XtextEditorUtil


  • public final class XtextEditorUtil
    extends Object
    Utility class for accessing active XtextEditor and EmbeddedEditor.
    • Method Detail

      • getActiveXtextEditor

        public static org.eclipse.xtext.ui.editor.XtextEditor getActiveXtextEditor()
        Get actual XtextEditor. Can return null.
        If active workbench part is adaptable to XtextEditor, then will extract this XtextEditor form part.
        Returns:
        active text editor if can obtain it or null otherwise.
      • getActiveEmbeddedEditor

        public static org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor getActiveEmbeddedEditor()
        Get actual EmbeddedEditor. Can return null.
        If active part is instance of IEmbeddedEditorSource then will return selected editor inside this form editor.
        Returns:
        active text editor if can obtain it or null otherwise.