Class 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
      • 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
    • 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 editor
      org.eclipse.emf.ecore.EObject getContextObject()
      Get context object
      protected 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 mode
      QuerySchema getQuerySchema()
      Get current query schema
      String getQueryText()
      Get query text
      String getQueryTextForTextModule​(String lineFormatter)
      Get query text ready for insert to text module
      protected void handleShellCloseEvent()  
      int open()  
      void pressCancel()
      Cancel pressed
      void pressOk()
      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 setResultProcessingParams​(QueryTextResultProcessing.ResultProcessingParams params)
      Set parameters for result processing
      • 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 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.
      • 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 shell
        contextProject - - project
        queryText - - query text
        bmNavigatorOrderIndexManager - - service to get IBmNavigatorOrderIndexProvider. Cannot be null.
        configurationProvider - - service to get configuration using eObject. 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)
        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.
    • Method Detail

      • open

        public int open()
        Overrides:
        open in class org.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
      • 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
      • 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