Package com._1c.g5.v8.dt.qw.ui
Class QueryWizard
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- com._1c.g5.v8.dt.qw.ui.dialogs.AbstractQueryWizardDialog
-
- com._1c.g5.v8.dt.qw.ui.QueryWizard
-
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
public class QueryWizard extends AbstractQueryWizardDialog
Query wizard dialog
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryWizard.QueryWizardMode
Query wizard run mode
-
Field Summary
-
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
-
-
Constructor Summary
Constructors Constructor Description QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, QueryWizardControl parentQueryWizardControl, boolean editable, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
QueryWizard(org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
close()
protected void
configureShell(org.eclipse.swt.widgets.Shell newShell)
protected org.eclipse.swt.widgets.Control
createButtonBar(org.eclipse.swt.widgets.Composite parent)
protected org.eclipse.swt.widgets.Control
createDialogArea(org.eclipse.swt.widgets.Composite parent)
Create contents of the dialog.QlEditor
getActiveQlEditor()
Get active QL editororg.eclipse.emf.ecore.EObject
getContextObject()
Get context objectprotected org.eclipse.swt.graphics.Point
getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
protected org.eclipse.swt.graphics.Point
getInitialSize()
int
getMode()
Get current query wizard modeQuerySchema
getQuerySchema()
Get current query schemaString
getQueryText()
Get query textString
getQueryTextForTextModule(String lineFormatter)
Get query text ready for insert to text moduleprotected void
handleShellCloseEvent()
int
open()
void
pressCancel()
Cancel pressedvoid
pressOk()
Ok pressedvoid
setCloseAction(org.eclipse.jface.action.Action queryWizardCloseAction)
Set action on close.void
setContextObject(org.eclipse.emf.ecore.EObject contextObject)
Set MdObject for generating template for output resultvoid
setHotKeyListener(org.eclipse.swt.widgets.Listener listener)
Set key listenervoid
setResultProcessingParams(QueryTextResultProcessing.ResultProcessingParams params)
Set parameters for result processing-
Methods inherited from class com._1c.g5.v8.dt.qw.ui.dialogs.AbstractQueryWizardDialog
getDialogLocation, getDialogSize, getInitialSize, saveState
-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Constructor Detail
-
QueryWizard
public QueryWizard(org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
- Parameters:
parentShell
- - parent shellcontextProject
- - projectqueryText
- - query textstyle
- the shell stylebmNavigatorOrderIndexManager
- - service to getIBmNavigatorOrderIndexProvider
. Cannot benull
.configurationProvider
- - service to get configuration using eObject. Cannot benull
.
-
QueryWizard
public QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
- Parameters:
mode
- - query wizard mode type (QueryWizardMode)parentShell
- - parent shellcontextProject
- - projectqueryText
- - query textbmNavigatorOrderIndexManager
- - service to getIBmNavigatorOrderIndexProvider
. Cannot benull
.configurationProvider
- - service to get configuration using eObject. Cannot benull
.
-
QueryWizard
public QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, QueryWizardControl parentQueryWizardControl, boolean editable, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
- Parameters:
mode
- - query wizard mode type (QueryWizardMode)parentShell
- - parent shellcontextProject
- - projectqueryText
- - query textparentQueryWizardControl
- - parent query wizard for nested queryeditable
- the editable state,true
if this dialog is editable,false
otherwisebmNavigatorOrderIndexManager
- - service to getIBmNavigatorOrderIndexProvider
. Cannot benull
.configurationProvider
- - service to get configuration using eObject. Cannot benull
.
-
-
Method Detail
-
open
public int open()
- Overrides:
open
in classorg.eclipse.jface.window.Window
-
getQueryText
public String getQueryText()
Get query text- Returns:
- query text
-
getQueryTextForTextModule
public String getQueryTextForTextModule(String lineFormatter)
Get query text ready for insert to text module- Parameters:
lineFormatter
- - line formatter- Returns:
- query text
-
setContextObject
public void setContextObject(org.eclipse.emf.ecore.EObject contextObject)
Set MdObject for generating template for output result- Parameters:
contextObject
- - context object with reference 'templates'
-
getContextObject
public org.eclipse.emf.ecore.EObject getContextObject()
Get context object- Returns:
- context object
-
setCloseAction
public void setCloseAction(org.eclipse.jface.action.Action queryWizardCloseAction)
Set action on close. Need for not modal style.- Parameters:
queryWizardCloseAction
- - close action
-
getQuerySchema
public QuerySchema getQuerySchema()
Get current query schema- Returns:
- query schema
-
pressOk
public void pressOk()
Ok pressed
-
pressCancel
public void pressCancel()
Cancel pressed
-
close
public boolean close()
- Overrides:
close
in classAbstractQueryWizardDialog
-
setHotKeyListener
public void setHotKeyListener(org.eclipse.swt.widgets.Listener listener)
Set key listener- Parameters:
listener
- - listener
-
getMode
public int getMode()
Get current query wizard mode- Returns:
- combination of QueryWizardMode flags
-
getActiveQlEditor
public QlEditor getActiveQlEditor()
Get active QL editor- Returns:
- active QL editor
-
setResultProcessingParams
public void setResultProcessingParams(QueryTextResultProcessing.ResultProcessingParams params)
Set parameters for result processing- Parameters:
params
- - result processing parameters
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
- Overrides:
configureShell
in classorg.eclipse.jface.window.Window
-
handleShellCloseEvent
protected void handleShellCloseEvent()
- Overrides:
handleShellCloseEvent
in classorg.eclipse.jface.window.Window
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Create contents of the dialog.- Overrides:
createDialogArea
in classorg.eclipse.jface.dialogs.Dialog
- Parameters:
parent
-
-
createButtonBar
protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
- Overrides:
createButtonBar
in classorg.eclipse.jface.dialogs.Dialog
-
getInitialSize
protected org.eclipse.swt.graphics.Point getInitialSize()
- Overrides:
getInitialSize
in classAbstractQueryWizardDialog
-
getInitialLocation
protected org.eclipse.swt.graphics.Point getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
- Overrides:
getInitialLocation
in classAbstractQueryWizardDialog
-
-