org.eclipse.core.internal.refresh
Class RefreshJob

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.core.internal.jobs.InternalJob
          extended by org.eclipse.core.runtime.jobs.Job
              extended by org.eclipse.core.internal.resources.InternalWorkspaceJob
                  extended by org.eclipse.core.resources.WorkspaceJob
                      extended by org.eclipse.core.internal.refresh.RefreshJob
All Implemented Interfaces:
java.lang.Comparable, org.eclipse.core.runtime.IAdaptable

public class RefreshJob
extends WorkspaceJob

The RefreshJob class maintains a list of resources that need to be refreshed, and periodically schedules itself to perform the refreshes in the background.

Since:
3.0

Field Summary
 
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
 
Constructor Summary
RefreshJob()
           
 
Method Summary
 boolean belongsTo(java.lang.Object family)
           
 PrefixPool getPathPrefixHistory()
          Returns the path prefixes visited by this job so far.
 PrefixPool getRootPathHistory()
          Returns the root paths visited by this job so far.
 void refresh(IResource resource)
           
 org.eclipse.core.runtime.IStatus runInWorkspace(org.eclipse.core.runtime.IProgressMonitor monitor)
          Runs the operation, reporting progress to and accepting cancelation requests from the given progress monitor.
 boolean shouldRun()
           
 void start()
          Starts the refresh job
 void stop()
          Stops the refresh job
 
Methods inherited from class org.eclipse.core.internal.resources.InternalWorkspaceJob
run
 
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, cancel, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldSchedule, sleep, wakeUp, wakeUp
 
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo, toString
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

RefreshJob

public RefreshJob()
Method Detail

belongsTo

public boolean belongsTo(java.lang.Object family)
Overrides:
belongsTo in class org.eclipse.core.runtime.jobs.Job

getPathPrefixHistory

public PrefixPool getPathPrefixHistory()
Returns the path prefixes visited by this job so far.


getRootPathHistory

public PrefixPool getRootPathHistory()
Returns the root paths visited by this job so far.


refresh

public void refresh(IResource resource)

runInWorkspace

public org.eclipse.core.runtime.IStatus runInWorkspace(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from class: WorkspaceJob
Runs the operation, reporting progress to and accepting cancelation requests from the given progress monitor.

Implementors of this method should check the progress monitor for cancelation when it is safe and appropriate to do so. The cancelation request should be propagated to the caller by throwing OperationCanceledException.

Specified by:
runInWorkspace in class WorkspaceJob
Parameters:
monitor - a progress monitor, or null if progress reporting and cancelation are not desired
Returns:
the result of running the operation

shouldRun

public boolean shouldRun()
Overrides:
shouldRun in class org.eclipse.core.runtime.jobs.Job

start

public void start()
Starts the refresh job


stop

public void stop()
Stops the refresh job