Class SimpleTask

  • All Implemented Interfaces:
    ITask, org.eclipse.jface.dialogs.IDialogPage
    Direct Known Subclasses:
    CompoundTask

    public class SimpleTask
    extends java.lang.Object
    implements ITask
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleTask()  
      SimpleTask​(java.lang.String title)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void addError​(java.lang.String errorInfo)  
      void createControl​(org.eclipse.swt.widgets.Composite parent)  
      void dispose()  
      IWizardContext getContext()
      Called just before the UI for the task is disposed, it will be used by the wizard.
      org.eclipse.swt.widgets.Control getControl()  
      java.lang.String getDescription()  
      java.lang.String getErrorMessage()  
      java.lang.String[] getErrors()
      Called by the container wizard if it follows the 'pull' mechanism for error discovery.
      org.eclipse.swt.graphics.Image getImage()  
      java.lang.String getMessage()  
      java.lang.String getTitle()  
      void performHelp()
      Deprecated.
      For later use
      protected void removeError​(java.lang.String errorInfo)  
      void setContext​(IWizardContext context)
      Called just before the UI for this Task is shown.
      void setDescription​(java.lang.String description)  
      void setErrorHints​(java.lang.Object[] errorHints)
      Called just before the UI for this Task is shown...in case the task is being shown in response to a request to fix an error.
      void setImageDescriptor​(org.eclipse.jface.resource.ImageDescriptor image)
      Deprecated.
      For later use
      void setTitle​(java.lang.String title)  
      void setUIProvider​(WizardBase wizard)
      Called upon instantiation to allow a task to interact with the containing wizard.
      void setVisible​(boolean visible)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • topControl

        protected transient org.eclipse.swt.widgets.Composite topControl
      • container

        protected transient WizardBase container
    • Constructor Detail

      • SimpleTask

        public SimpleTask()
      • SimpleTask

        public SimpleTask​(java.lang.String title)
    • Method Detail

      • setContext

        public void setContext​(IWizardContext context)
        Description copied from interface: ITask
        Called just before the UI for this Task is shown. Intended for the UI to prepare itself by processing the context passed in. The context will depend on the wizard.
        Specified by:
        setContext in interface ITask
        Parameters:
        context - The context in which the Subtask UI will be shown. Its content depend on individual wizards.
      • getContext

        public IWizardContext getContext()
        Description copied from interface: ITask
        Called just before the UI for the task is disposed, it will be used by the wizard. The context returned should contain the complete updated context for the wizard. This context should be useable as is and should not require any additional processing before use.
        Specified by:
        getContext in interface ITask
        Returns:
        complete context for the wizard with all updates that result from operations performed as part of this task.
      • setUIProvider

        public void setUIProvider​(WizardBase wizard)
        Description copied from interface: ITask
        Called upon instantiation to allow a task to interact with the containing wizard. This instance should be used to perform operations like enabling or disabling other tasks in the current invocation as well as to display or hide linked popup windows.
        Specified by:
        setUIProvider in interface ITask
        Parameters:
        wizard - instance of WizardBase containing this task instance.
      • getErrors

        public java.lang.String[] getErrors()
        Description copied from interface: ITask
        Called by the container wizard if it follows the 'pull' mechanism for error discovery. A task is expected to provide a collection of error messages indicating the error conditions currently existing in the wizard context. If a wizard does not follow the 'pull' mechanism, the task needs to explicitly 'push' the error list to the wizard using the 'displayError()' method.
        Specified by:
        getErrors in interface ITask
        Returns:
        Array of strings representing any error conditions existing in the context
      • addError

        protected void addError​(java.lang.String errorInfo)
      • removeError

        protected void removeError​(java.lang.String errorInfo)
      • setErrorHints

        public void setErrorHints​(java.lang.Object[] errorHints)
        Description copied from interface: ITask
        Called just before the UI for this Task is shown...in case the task is being shown in response to a request to fix an error. The argument is supposed to be an object array that provides additional information as to the specific error condition in the current context.
        Specified by:
        setErrorHints in interface ITask
        Parameters:
        errorHints - Object array providing additional (task-specific) information provided by the source of the task redirection. It is expected to contain information that the target task can use to better guide the user to fix any error conditions.
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.jface.dialogs.IDialogPage
      • createControl

        public void createControl​(org.eclipse.swt.widgets.Composite parent)
        Specified by:
        createControl in interface org.eclipse.jface.dialogs.IDialogPage
      • getControl

        public org.eclipse.swt.widgets.Control getControl()
        Specified by:
        getControl in interface org.eclipse.jface.dialogs.IDialogPage
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface org.eclipse.jface.dialogs.IDialogPage
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Specified by:
        getErrorMessage in interface org.eclipse.jface.dialogs.IDialogPage
      • getImage

        public org.eclipse.swt.graphics.Image getImage()
        Specified by:
        getImage in interface org.eclipse.jface.dialogs.IDialogPage
      • getMessage

        public java.lang.String getMessage()
        Specified by:
        getMessage in interface org.eclipse.jface.dialogs.IDialogPage
      • getTitle

        public java.lang.String getTitle()
        Specified by:
        getTitle in interface org.eclipse.jface.dialogs.IDialogPage
      • performHelp

        @Deprecated
        public void performHelp()
        Deprecated.
        For later use
        Specified by:
        performHelp in interface org.eclipse.jface.dialogs.IDialogPage
      • setDescription

        public void setDescription​(java.lang.String description)
        Specified by:
        setDescription in interface org.eclipse.jface.dialogs.IDialogPage
      • setImageDescriptor

        @Deprecated
        public void setImageDescriptor​(org.eclipse.jface.resource.ImageDescriptor image)
        Deprecated.
        For later use
        Specified by:
        setImageDescriptor in interface org.eclipse.jface.dialogs.IDialogPage
      • setTitle

        public void setTitle​(java.lang.String title)
        Specified by:
        setTitle in interface org.eclipse.jface.dialogs.IDialogPage
      • setVisible

        public void setVisible​(boolean visible)
        Specified by:
        setVisible in interface org.eclipse.jface.dialogs.IDialogPage