Class AbstractBslWrapInRegionHandler

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
    Direct Known Subclasses:
    BslWrapInRegionHandler

    public abstract class AbstractBslWrapInRegionHandler
    extends org.eclipse.core.commands.AbstractHandler
    Handler listener for Surround With region preprocessor
    • Constructor Detail

      • AbstractBslWrapInRegionHandler

        public AbstractBslWrapInRegionHandler()
    • Method Detail

      • execute

        public Object execute​(org.eclipse.core.commands.ExecutionEvent event)
                       throws org.eclipse.core.commands.ExecutionException
        Throws:
        org.eclipse.core.commands.ExecutionException
      • validateSelectRegion

        protected abstract org.eclipse.xtext.util.Pair<Boolean,​String> validateSelectRegion​(Module module,
                                                                                                  int startPos,
                                                                                                  int endPos)
        Check for valid selection area of the module
        Parameters:
        module - current Module
        startPos - start position of selection
        endPos - end position of selection
        Returns:
        pair of value -
        1) flag - true if selection is valid
        2) error message, can be null