Class BslHandlerUtil


  • public final class BslHandlerUtil
    extends Object
    Contains common method for all menu command handler for Bsl Module
    • Method Detail

      • extractXtextEditor

        public static org.eclipse.xtext.ui.editor.XtextEditor extractXtextEditor​(org.eclipse.ui.IWorkbenchPart part)
        Extracts actual XtextEditor
        Parameters:
        part - current IWorkbenchPart
        Returns:
        found XtextEditor or null if actual IWorkbenchPart doesn't have XtextEditor adapter
      • getTextViewer

        public static org.eclipse.jface.text.ITextViewer getTextViewer​(org.eclipse.ui.texteditor.ITextEditor editor)
        Gets actual ITextViewer
        Parameters:
        editor - current ITextEditor
        Returns:
        found ITextViewer or null if ITextViewer wasn't found
      • createLinkedModel

        public static void createLinkedModel​(org.eclipse.jface.text.ITextViewer viewer,
                                             org.eclipse.jface.text.link.LinkedPosition[] linkedPos)
                                      throws org.eclipse.jface.text.BadLocationException
        Creates Linked Model in viewer
        Parameters:
        viewer - current viewer
        linkedPos - array of LinkedPosition
        Throws:
        org.eclipse.jface.text.BadLocationException - if linkedPos intersect