Class ProgressMonitorWrapper

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beginTask​(String name, int totalWork)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      void clearBlocked()
      This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor.
      void done()
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      IProgressMonitor getWrappedProgressMonitor()
      Returns the wrapped progress monitor.
      void internalWorked​(double work)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      boolean isCanceled()
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      void setBlocked​(IStatus reason)
      This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor.
      void setCanceled​(boolean b)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      void setTaskName​(String name)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      void subTask​(String name)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
      void worked​(int work)
      This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
    • Constructor Detail

      • ProgressMonitorWrapper

        protected ProgressMonitorWrapper​(IProgressMonitor monitor)
        Creates a new wrapper around the given monitor.
        Parameters:
        monitor - the progress monitor to forward to
    • Method Detail

      • beginTask

        public void beginTask​(String name,
                              int totalWork)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        beginTask in interface IProgressMonitor
        Parameters:
        name - the name (or description) of the main task
        totalWork - the total number of work units into which the main task is been subdivided. If the value is UNKNOWN the implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.
        See Also:
        IProgressMonitor.beginTask(String, int)
      • clearBlocked

        public void clearBlocked()
        This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        clearBlocked in interface IProgressMonitor
        Since:
        3.0
        See Also:
        IProgressMonitor.clearBlocked()
      • done

        public void done()
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        done in interface IProgressMonitor
        See Also:
        IProgressMonitor.done()
      • getWrappedProgressMonitor

        public IProgressMonitor getWrappedProgressMonitor()
        Returns the wrapped progress monitor.
        Returns:
        the wrapped progress monitor
      • internalWorked

        public void internalWorked​(double work)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        internalWorked in interface IProgressMonitor
        Parameters:
        work - the amount of work done
        See Also:
        IProgressMonitor.internalWorked(double)
      • isCanceled

        public boolean isCanceled()
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        isCanceled in interface IProgressMonitor
        Returns:
        true if cancellation has been requested, and false otherwise
        See Also:
        IProgressMonitor.isCanceled()
      • setBlocked

        public void setBlocked​(IStatus reason)
        This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        setBlocked in interface IProgressMonitor
        Parameters:
        reason - an optional status object whose message describes the reason why this operation is blocked, or null if this information is not available.
        Since:
        3.0
        See Also:
        IProgressMonitor.setBlocked(IStatus)
      • setCanceled

        public void setCanceled​(boolean b)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        setCanceled in interface IProgressMonitor
        Parameters:
        b - true indicates that cancelation has been requested (but not necessarily acknowledged); false clears this flag
        See Also:
        IProgressMonitor.setCanceled(boolean)
      • setTaskName

        public void setTaskName​(String name)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        setTaskName in interface IProgressMonitor
        Parameters:
        name - the name (or description) of the main task
        See Also:
        IProgressMonitor.setTaskName(String)
      • subTask

        public void subTask​(String name)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        subTask in interface IProgressMonitor
        Parameters:
        name - the name (or description) of the subtask
        See Also:
        IProgressMonitor.subTask(String)
      • worked

        public void worked​(int work)
        This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.
        Specified by:
        worked in interface IProgressMonitor
        Parameters:
        work - a non-negative number of work units just completed
        See Also:
        IProgressMonitor.worked(int)