Interface IWorkbenchSiteProgressService

  • All Superinterfaces:
    IProgressService, IRunnableContext

    public interface IWorkbenchSiteProgressService
    extends IProgressService
    IWorkbenchPartProgressService is an IProgressService that adds API for jobs that change the state in a IWorkbenchPartSite while they are being run.

    This service can be acquired from your service locator (IWorkbenchPartSite):

     
            IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
     
     
    • This service is not available globally, only at the part site level.

    WorkbenchParts may access an instance of IWorkbenchSiteProgressService by calling getSite().getAdapter(IWorkbenchSiteProgressService.class); , although getSite().getService(IWorkbenchSiteProgressService.class) is preferred.

    Since:
    3.0
    See Also:
    IAdaptable.getAdapter(Class), IServiceLocator.getService(Class)
    Restriction:
    This interface is not intended to be implemented by clients.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String BUSY_PROPERTY
      Deprecated.
      this property is no longer in use in the Eclipse SDK
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void decrementBusy()
      Decrements the busy counter for this workbench site.
      void incrementBusy()
      Increments the busy counter for this workbench site.
      void schedule​(Job job)
      Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes.
      void schedule​(Job job, long delay)
      Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes.
      void schedule​(Job job, long delay, boolean useHalfBusyCursor)
      Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes.
      void showBusyForFamily​(Object family)
      Show busy state if any job of the specified family is running.
      void warnOfContentChange()
      Warn that the content of the part has changed.
    • Field Detail

      • BUSY_PROPERTY

        @Deprecated
        static final String BUSY_PROPERTY
        Deprecated.
        this property is no longer in use in the Eclipse SDK
        The property that is sent with busy notifications.
        See Also:
        Constant Field Values
    • Method Detail

      • schedule

        void schedule​(Job job,
                      long delay,
                      boolean useHalfBusyCursor)
        Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes. Parts can also add customized busy indication by overriding WorkbenchPart.showBusy(). If useHalfBusyCursor is true then the cursor will change to the half busy cursor for the duration of the job.
        Parameters:
        job - The job to schedule
        delay - The delay in scheduling.
        useHalfBusyCursor - A boolean to indicate if the half busy cursor should be used while this job is running.
        See Also:
        Job.schedule(long)
      • schedule

        void schedule​(Job job,
                      long delay)
        Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes. Parts can also add customized busy indication by overriding WorkbenchPart.showBusy.
        Parameters:
        job - The job to schedule
        delay - The delay in scheduling.
        See Also:
        Job.schedule(long)
      • schedule

        void schedule​(Job job)
        Jobs scheduled with this method will cause the part's presentation to be changed to indicate that the part is busy and in a transient state until the job completes. Parts can also add customized busy indication by overriding WorkbenchPart.showBusy.
        Parameters:
        job - The job to schedule
        See Also:
        Job.schedule()
      • showBusyForFamily

        void showBusyForFamily​(Object family)
        Show busy state if any job of the specified family is running.
        Parameters:
        family - Object
        See Also:
        Job.belongsTo(Object)
      • warnOfContentChange

        void warnOfContentChange()
        Warn that the content of the part has changed. How this change is displayed to the end user is left up to the workbench renderer.
      • incrementBusy

        void incrementBusy()
        Increments the busy counter for this workbench site. This API should only be used for background work that does not use jobs. As long as there have been more calls to incrementBusy() than to decrementBusy(), the part will show a busy affordance. Each call to incrementBusy must be followed by a call to decrementBusy once the caller no longer needs the part to show the busy affordance.

        Note that the job-related methods on this class are another way to let the part show a busy affordance. A part will only appear non-busy if no jobs have been scheduled through this service, and the internal busy counter is not positive.

        Since:
        3.3
      • decrementBusy

        void decrementBusy()
        Decrements the busy counter for this workbench site. This API should only be used for background work that does not use jobs. It is an error to call this method without first making a matching call to incrementBusy().
        Since:
        3.3