Class QueryWizard

java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
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 
    Query wizard run mode

    Nested classes/interfaces inherited from class org.eclipse.jface.window.Window

    org.eclipse.jface.window.Window.IExceptionHandler
  • 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

    Fields inherited from class org.eclipse.jface.window.Window

    CANCEL, OK, resizeHasOccurred
  • 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, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
     
    QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
     
    QueryWizard(org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    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.
    Get active QL editor
    org.eclipse.emf.ecore.EObject
    Get context object
    protected org.eclipse.swt.graphics.Point
    getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
     
    protected org.eclipse.swt.graphics.Point
     
    int
    Get current query wizard mode
    Get current query schema
    Get query text
    Get query text ready for insert to text module
    protected void
     
    boolean
    Checks if some objects were adopted as a result of this wizard functioning
    int
     
    void
    Cancel pressed
    void
    Ok pressed
    void
    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 result
    void
    setHotKeyListener(org.eclipse.swt.widgets.Listener listener)
    Set key listener
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QueryWizard

      public QueryWizard(org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, int style, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
      Parameters:
      parentShell - - parent shell
      contextProject - - project
      queryText - - query text
      style - the shell style
      bmNavigatorOrderIndexManager - - service to get IBmNavigatorOrderIndexProvider. Cannot be null.
      configurationProvider - - service to get configuration using eObject. Cannot be null.
      v8ProjectManager - - service to get IV8Project. Cannot be null.
      cachedScopeProvider - - Provides access to QL scope caches. Cannot be null.
      bmModelManager - IBmModelManager service reference. Cannot be null.
    • QueryWizard

      public QueryWizard(int mode, org.eclipse.swt.widgets.Shell parentShell, org.eclipse.core.resources.IProject contextProject, String queryText, IBmNavigatorOrderIndexManager bmNavigatorOrderIndexManager, IConfigurationProvider configurationProvider, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
      Parameters:
      mode - - query wizard mode type (QueryWizardMode)
      parentShell - - parent shell
      contextProject - - project
      queryText - - query text
      bmNavigatorOrderIndexManager - - service to get IBmNavigatorOrderIndexProvider. Cannot be null.
      configurationProvider - - service to get configuration using eObject. Cannot be null.
      v8ProjectManager - - service to get IV8Project. Cannot be null.
      cachedScopeProvider - - Provides access to QL scope caches. Cannot be null.
      bmModelManager - IBmModelManager service reference. Cannot be null.
    • 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, IV8ProjectManager v8ProjectManager, IQlCachedScopeProvider cachedScopeProvider, IBmModelManager bmModelManager)
      Parameters:
      mode - - query wizard mode type (QueryWizardMode)
      parentShell - - parent shell
      contextProject - - project
      queryText - - query text
      parentQueryWizardControl - - parent query wizard for nested query
      editable - the editable state, true if this dialog is editable, false otherwise
      bmNavigatorOrderIndexManager - - service to get IBmNavigatorOrderIndexProvider. Cannot be null.
      configurationProvider - - service to get configuration using eObject. Cannot be null.
      v8ProjectManager - - service to get IV8Project. Cannot be null.
      cachedScopeProvider - - Provides access to QL scope caches. Cannot be null.
      bmModelManager - IBmModelManager service reference. Cannot be null.
  • Method Details

    • open

      public int open()
      Overrides:
      open in class org.eclipse.jface.window.Window
    • getQueryText

      public String getQueryText()
      Get query text
      Returns:
      query text
    • isAdopted

      public boolean isAdopted()
      Checks if some objects were adopted as a result of this wizard functioning
      Returns:
      True if objects were adopted
    • 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 class AbstractQueryWizardDialog
    • 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 class org.eclipse.jface.window.Window
    • handleShellCloseEvent

      protected void handleShellCloseEvent()
      Overrides:
      handleShellCloseEvent in class org.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 class org.eclipse.jface.dialogs.Dialog
      Parameters:
      parent -
    • createButtonBar

      protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createButtonBar in class org.eclipse.jface.dialogs.Dialog
    • getInitialSize

      protected org.eclipse.swt.graphics.Point getInitialSize()
      Overrides:
      getInitialSize in class AbstractQueryWizardDialog
    • getInitialLocation

      protected org.eclipse.swt.graphics.Point getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
      Overrides:
      getInitialLocation in class AbstractQueryWizardDialog