|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.internal.refresh.InternalRefreshProvider
org.eclipse.core.resources.refresh.RefreshProvider
The abstract base class for all auto-refresh providers. This class provides
the infrastructure for defining an auto-refresh provider and fulfills the
contract specified by the org.eclipse.core.resources.refreshProviders
standard extension point.
All auto-refresh providers must subclass this class. A
RefreshProvider
is responsible for creating
IRefreshMonitor
objects. The provider must decide if
it is capable of monitoring the file, or folder and subtree under the path that is provided.
Constructor Summary | |
---|---|
RefreshProvider()
|
Method Summary | |
---|---|
protected IRefreshMonitor |
createPollingMonitor(IResource resource)
Creates a new refresh monitor that performs naive polling of the resource in the file system to detect changes. |
abstract IRefreshMonitor |
installMonitor(IResource resource,
IRefreshResult result)
Returns an IRefreshMonitor that will monitor a resource. |
void |
resetMonitors(IResource resource)
Resets the installed monitors for the given resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RefreshProvider()
Method Detail |
protected IRefreshMonitor createPollingMonitor(IResource resource)
This default monitor can be returned by subclasses when
installMonitor
is called.
If the returned monitor is not immediately returned from the installMonitor
method, then clients are responsible for telling the returned monitor to
stop polling when it is no longer needed. The returned monitor can be told to
stop working by invoking IRefreshMonitor.unmonitor(IResource)
.
resource
- The resource to begin monitoring
installMonitor(IResource, IRefreshResult)
public abstract IRefreshMonitor installMonitor(IResource resource, IRefreshResult result)
IRefreshMonitor
that will monitor a resource. If
the resource is an IContainer
the monitor will also
monitor the subtree under the container. Returns null
if
this provider cannot create a monitor for the given resource. The
provider may return the same monitor instance that has been provided for
other resources.
The monitor should send results and failures to the provided refresh result.
resource
- the resource to monitorresult
- the result callback for notifying of failure or of resources that need
refreshing
null
if the resource cannot be monitoredcreatePollingMonitor(IResource)
public void resetMonitors(IResource resource)
This method is intended to be used by refresh providers that need to change the refresh monitor that they previously used to monitor a resource.
resource
- The resource to reset the monitors for
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.