Class AbstractBslBracketSearchHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Map<org.eclipse.emf.ecore.EClass,​String[]> CLOSE_BRACKETS
      Keywords in lower case for close logical brackets
      static Map<org.eclipse.emf.ecore.EClass,​String[]> MIDDLE_BRACKETS
      Keywords in lower case for middle logical brackets
      static Map<org.eclipse.emf.ecore.EClass,​String[]> OPEN_BRACKETS
      Keywords in lower case for open logical brackets
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeBracketSearch​(org.eclipse.core.commands.ExecutionEvent event, boolean searchForward)
      Executes bracket search in Bsl module (brackets: "(,)"; "[,]"; "if, elseIf, endIf"; "function, endFunction"; "procedure, endProcedure"; "For, While, EndDo"; "Try, Except, EndTry")
      void executeBracketSearchWithSelection​(org.eclipse.core.commands.ExecutionEvent event, boolean searchForward)
      Executes bracket search with selection in Bsl module (brackets: "(,)"; "[,]"; "if, elseIf, endIf"; "function, endFunction"; "procedure, endProcedure"; "For, While, EndDo"; "Try, Except, EndTry")
      static Collection<org.eclipse.jface.text.ITextSelection> getAllLogicalBrackets​(org.eclipse.xtext.ui.editor.model.IXtextDocument document, int offset, org.eclipse.core.runtime.IProgressMonitor monitor)
      Gets all ITextSelection corresponding to the logical brackets in Bsl language by offset
      • Methods inherited from class org.eclipse.core.commands.AbstractHandler

        addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from interface org.eclipse.core.commands.IHandler

        execute
    • Field Detail

      • OPEN_BRACKETS

        public static final Map<org.eclipse.emf.ecore.EClass,​String[]> OPEN_BRACKETS
        Keywords in lower case for open logical brackets
      • MIDDLE_BRACKETS

        public static final Map<org.eclipse.emf.ecore.EClass,​String[]> MIDDLE_BRACKETS
        Keywords in lower case for middle logical brackets
      • CLOSE_BRACKETS

        public static final Map<org.eclipse.emf.ecore.EClass,​String[]> CLOSE_BRACKETS
        Keywords in lower case for close logical brackets
    • Constructor Detail

      • AbstractBslBracketSearchHandler

        public AbstractBslBracketSearchHandler()
    • Method Detail

      • getAllLogicalBrackets

        public static Collection<org.eclipse.jface.text.ITextSelection> getAllLogicalBrackets​(org.eclipse.xtext.ui.editor.model.IXtextDocument document,
                                                                                              int offset,
                                                                                              org.eclipse.core.runtime.IProgressMonitor monitor)
        Gets all ITextSelection corresponding to the logical brackets in Bsl language by offset
        Parameters:
        document - actual IXtextDocument for getting logical brackets, cannot be null
        offset - offset for getting logical brackets
        monitor - actual IProgressMonitor for skipping process, cannot be null
        Returns:
        all ITextSelection corresponding to the logical brackets in Bsl language by offset, never null
      • executeBracketSearch

        public void executeBracketSearch​(org.eclipse.core.commands.ExecutionEvent event,
                                         boolean searchForward)
        Executes bracket search in Bsl module (brackets: "(,)"; "[,]"; "if, elseIf, endIf"; "function, endFunction"; "procedure, endProcedure"; "For, While, EndDo"; "Try, Except, EndTry")
        Parameters:
        event - current ExecutionEvent, can't be null
        searchForward - true if forward fast search, false if back fast search
      • executeBracketSearchWithSelection

        public void executeBracketSearchWithSelection​(org.eclipse.core.commands.ExecutionEvent event,
                                                      boolean searchForward)
        Executes bracket search with selection in Bsl module (brackets: "(,)"; "[,]"; "if, elseIf, endIf"; "function, endFunction"; "procedure, endProcedure"; "For, While, EndDo"; "Try, Except, EndTry")
        Parameters:
        event - current ExecutionEvent, can't be null
        searchForward - true if forward fast search, false if back fast search