Package com._1c.g5.v8.dt.bsl.qw.utils
Class BslQueryWizardUtils
java.lang.Object
com._1c.g5.v8.dt.bsl.qw.utils.BslQueryWizardUtils
Services methods for query wizard handlers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass contains information about query text openning in query editor and query wizard -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringeditQueryText(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 textstatic StringformatForBsl(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator) Format query text for BslgetCurrentStringLiteral(Module module, int offset, int mode, QueryTextResultProcessing.ResultProcessingParams params) GetBslQueryWizardUtils.QueryTextInfoby offset in the modulestatic voidopenQueryEditor(org.eclipse.core.commands.ExecutionEvent event) Open query editor from bsl modulestatic voidopenQueryWizard(org.eclipse.core.commands.ExecutionEvent event, int mode) Open query wizard from bsl module
-
Constructor Details
-
BslQueryWizardUtils
public BslQueryWizardUtils()
-
-
Method Details
-
openQueryWizard
public static void openQueryWizard(org.eclipse.core.commands.ExecutionEvent event, int mode) Open query wizard from bsl module- Parameters:
event- - ExecutionEvent, cannot benullmode- - 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 benull
-
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 asStringLiteralof Built-in language, cannot benullshell- actualShellfor openning query wizard or query editor, cannot benullproject- actualIProjectfor editing query text, cannot benulldocument- actualIDocumentfor editing query text, needs for formatting queryStringLiteralafter editing, cannot benulloffsetInDocument- actual offset in document of editing query text, needs for formatting queryStringLiteralafter editinginEditor-trueif editing in query editor,falseif editing in query wizard- Returns:
- edited query text as
StringLiteralof Built-in language, can benullif 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 benulloffset- - query text offset from document begindoc- - document with query, cannot benulllineSeparator- - line separator, cannot benull- Returns:
- formated query
-
getCurrentStringLiteral
public static BslQueryWizardUtils.QueryTextInfo getCurrentStringLiteral(Module module, int offset, int mode, QueryTextResultProcessing.ResultProcessingParams params) GetBslQueryWizardUtils.QueryTextInfoby offset in the module- Parameters:
module- actual module for getting query text information, cannot benulloffset- actual offswt in the Bsl module for getting information about query textmode- current mode, seeQueryWizard.QueryWizardModeparams- parameter for query text result processing seeQueryTextResultProcessing.ResultProcessingParams, cannot benull- Returns:
BslQueryWizardUtils.QueryTextInfowith information aboutStringLiteralwith query text, nevernull
-