Package com._1c.g5.v8.dt.qw.ui.controls
Class QueryWizardControl
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- com._1c.g5.v8.dt.qw.ui.controls.QueryWizardControl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryWizardControl.DropEventFromType
Drag&Drop event typesstatic class
QueryWizardControl.TabsType
Tab type
-
Constructor Summary
Constructors Constructor Description QueryWizardControl(int mode, org.eclipse.core.resources.IProject project, org.eclipse.swt.widgets.Composite parent, int style, String queryText, QueryWizard parentQueryWizardDlg, QueryWizardControl parentQueryWizardControl, QueryTextResultProcessing.ResultProcessingParams processingParams, boolean editable, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.eclipse.swt.custom.CTabItem
addTab(org.eclipse.swt.custom.CTabFolder tabFolder, String text)
Add new tabvoid
addTreeForSort(TreeViewer treeViewer)
Add tree for sortstatic org.eclipse.swt.widgets.Composite
createTreeChangingButtons(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter[] selectionAdapters)
Create tree changing buttons (< << > >>)static org.eclipse.swt.widgets.Composite
createTreeChangingButtons(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter[] selectionAdapters, boolean withToolBar)
Create tree changing buttons (< << > >>)void
dispose()
static void
enableMouseDoubleClickEdit(TreeViewer viewer)
Enable mouse double click editQlEditor
getActiveQlEditor()
Get active QL editororg.eclipse.core.resources.IProject
getContextProject()
String
getDefultTemplateName()
Get default template nameint
getMode()
Get current query wizard modeQueryWizardSource
getQuerySchemaSource()
String
getQuerySchemaTextAndErrors(StringBuilder errors)
Get formatted query text and existing errorsString
getQueryText()
Return query textQueryTextResultProcessing.ResultProcessingParams
getResultProcessingParams()
Get result processing parametersorg.eclipse.emf.transaction.TransactionalEditingDomain
getTransactionDomain()
Get transaction domainorg.eclipse.core.commands.operations.UndoContext
getUndoContext()
Get undo context for query schemavoid
hideQueriesAndOperatorsCombo(boolean showQueries, boolean showOperators)
Hide query and operators comboboolean
isSourcesSorted()
Returnstrue
if items is sorted in sources tree.void
notifyClose()
Call after use controlvoid
refreshModel()
Refresh query schema after changesvoid
refreshWizard()
Refreshing changed controlsvoid
setActiveQlEditor(QlEditor qlEditor)
Set active QL editorvoid
setSortedSources(boolean isSourcesSorted)
Sort items in treesstatic void
setTabFolderCurrentTab(org.eclipse.swt.custom.CTabFolder tabFolder, QueryWizardControl.TabsType tabType)
Set current tabvoid
update(Observable observable, Object type)
void
updateUndoRedoButtons()
Update undo and redo buttons after model changesboolean
validate()
Validate query and show message with error to user, if exist-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
-
-
-
Constructor Detail
-
QueryWizardControl
public QueryWizardControl(int mode, org.eclipse.core.resources.IProject project, org.eclipse.swt.widgets.Composite parent, int style, String queryText, QueryWizard parentQueryWizardDlg, QueryWizardControl parentQueryWizardControl, QueryTextResultProcessing.ResultProcessingParams processingParams, boolean editable, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider)
- Parameters:
mode
- - query wizard mode type (QueryWizardMode)project
- projectparent
- parent compositestyle
- stylequeryText
- query textparentQueryWizardDlg
- parent dialogparentQueryWizardControl
- - parent query wizard for nested queryprocessingParams
- - parameters for result processing. Can be null.editable
- the editable state,true
if this control is editable,false
otherwisebmNavigatorOrderIndexManager
- - service to getIBmNavigatorOrderIndexProvider
. Cannot benull
.configurationProvider
- - service to get configuration using eObject. Cannot benull
.
-
-
Method Detail
-
addTab
public static org.eclipse.swt.custom.CTabItem addTab(org.eclipse.swt.custom.CTabFolder tabFolder, String text)
Add new tab- Parameters:
tabFolder
- - parent tab folder control tab foldertext
- header tab text- Returns:
- new tab
-
enableMouseDoubleClickEdit
public static void enableMouseDoubleClickEdit(TreeViewer viewer)
Enable mouse double click edit- Parameters:
viewer
- tree
-
createTreeChangingButtons
public static org.eclipse.swt.widgets.Composite createTreeChangingButtons(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter[] selectionAdapters)
Create tree changing buttons (< << > >>)- Parameters:
parent
- compositeselectionAdapters
-- Returns:
- new buttons panel
-
createTreeChangingButtons
public static org.eclipse.swt.widgets.Composite createTreeChangingButtons(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.events.SelectionAdapter[] selectionAdapters, boolean withToolBar)
Create tree changing buttons (< << > >>)- Parameters:
parent
- compositeselectionAdapters
-withToolBar
- create empty tool bar- Returns:
- new buttons panel
-
setTabFolderCurrentTab
public static void setTabFolderCurrentTab(org.eclipse.swt.custom.CTabFolder tabFolder, QueryWizardControl.TabsType tabType)
Set current tab- Parameters:
tabFolder
- - parent tab folder controlindex
-
-
update
public void update(Observable observable, Object type)
-
notifyClose
public void notifyClose()
Call after use control
-
refreshWizard
public void refreshWizard()
Refreshing changed controls
-
refreshModel
public void refreshModel()
Refresh query schema after changes
-
getQueryText
public String getQueryText()
Return query text- Returns:
- query text
-
getQuerySchemaSource
public QueryWizardSource getQuerySchemaSource()
- Returns:
- query schema source
-
getContextProject
public org.eclipse.core.resources.IProject getContextProject()
- Returns:
- current IProject
-
updateUndoRedoButtons
public void updateUndoRedoButtons()
Update undo and redo buttons after model changes
-
getMode
public int getMode()
Get current query wizard mode- Returns:
- combination of QueryWizardMode flags
-
validate
public boolean validate()
Validate query and show message with error to user, if exist- Returns:
- true if query is valid
-
getQuerySchemaTextAndErrors
public String getQuerySchemaTextAndErrors(StringBuilder errors)
Get formatted query text and existing errors- Parameters:
errors
- - errors in query schema- Returns:
- formatted query text
-
hideQueriesAndOperatorsCombo
public void hideQueriesAndOperatorsCombo(boolean showQueries, boolean showOperators)
Hide query and operators combo- Parameters:
showQueries
- - show queries comboshowOperators
- - show operators combo
-
getActiveQlEditor
public QlEditor getActiveQlEditor()
Get active QL editor- Returns:
- active QL editor. Can be null.
-
setActiveQlEditor
public void setActiveQlEditor(QlEditor qlEditor)
Set active QL editor- Parameters:
qlEditor
- - QL editor
-
addTreeForSort
public void addTreeForSort(TreeViewer treeViewer)
Add tree for sort- Parameters:
treeViewer
- - tree viewer to add comparator to. Cannot benull
.
-
setSortedSources
public void setSortedSources(boolean isSourcesSorted)
Sort items in trees- Parameters:
isSourcesSorted
- - is sorted sources
-
isSourcesSorted
public boolean isSourcesSorted()
Returnstrue
if items is sorted in sources tree.- Returns:
true
if items is sorted in sources tree.
-
getResultProcessingParams
public QueryTextResultProcessing.ResultProcessingParams getResultProcessingParams()
Get result processing parameters- Returns:
- result processing parameters. Return null, if query wizard is running not in result processing mode.
-
getDefultTemplateName
public String getDefultTemplateName()
Get default template name- Returns:
-
getUndoContext
public org.eclipse.core.commands.operations.UndoContext getUndoContext()
Get undo context for query schema- Returns:
- - undo context for current query schema
-
getTransactionDomain
public org.eclipse.emf.transaction.TransactionalEditingDomain getTransactionDomain()
Get transaction domain- Returns:
- transaction domain
-
dispose
public void dispose()
- Overrides:
dispose
in classorg.eclipse.swt.widgets.Widget
-
-