Class BslQueryWizardUtils


  • public class BslQueryWizardUtils
    extends Object
    Services methods for query wizard handlers
    • Constructor Detail

      • BslQueryWizardUtils

        public BslQueryWizardUtils()
    • Method Detail

      • openQueryWizard

        public static void openQueryWizard​(org.eclipse.core.commands.ExecutionEvent event,
                                           int mode)
        Open query wizard from bsl module
        Parameters:
        event - - ExecutionEvent, cannot be null
        mode - - open mode from QueryWizardMode
      • openQueryEditor

        public static void openQueryEditor​(org.eclipse.core.commands.ExecutionEvent event)
        Open query editor from bsl module
        Parameters:
        event - - ExecutionEvent, cannot be null
      • editQueryText

        public static String editQueryText​(String oldQueryText,
                                           org.eclipse.swt.widgets.Shell shell,
                                           org.eclipse.core.resources.IProject project,
                                           org.eclipse.jface.text.IDocument document,
                                           int offsetInDocument,
                                           boolean inEditor)
        Opens query wizard or query editor for editing existing query text
        Parameters:
        oldQueryText - exiting query text as StringLiteral of Built-in language, cannot be null
        shell - actual Shell for openning query wizard or query editor, cannot be null
        project - actual IProject for editing query text, cannot be null
        document - actual IDocument for editing query text, needs for formatting query StringLiteral after editing, cannot be null
        offsetInDocument - actual offset in document of editing query text, needs for formatting query StringLiteral after editing
        inEditor - true if editing in query editor, false if editing in query wizard
        Returns:
        edited query text as StringLiteral of Built-in language, can be null if query text wasnot edited
      • formatForBsl

        public static String formatForBsl​(String content,
                                          int offset,
                                          org.eclipse.jface.text.IDocument doc,
                                          String lineSeparator)
        Format query text for Bsl
        Parameters:
        content - - query text, cannot be null
        offset - - query text offset from document begin
        doc - - document with query, cannot be null
        lineSeparator - - line separator, cannot be null
        Returns:
        formated query