org.eclipse.rse.files.ui.resources
Class SystemTempFileListener
java.lang.Object
org.eclipse.rse.files.ui.resources.SystemTempFileListener
-
All Implemented Interfaces:
-
EventListener,
IResourceChangeListener
-
Direct Known Subclasses:
-
SystemUniversalTempFileListener
-
public abstract class SystemTempFileListener
- extends
Object
- implements
IResourceChangeListener
This class manages listening for resource changes within our temp file project
It is used for listening to saves made in the editor so that we can upload
changes to the remote files.
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
SystemTempFileListener
public SystemTempFileListener()
setEnabled
public void setEnabled(boolean flag)
-
-
addIgnoreFile
public void addIgnoreFile(
IFile toIgnore)
-
-
removeIgnoreFile
public void removeIgnoreFile(
IFile toNotIgnore)
-
-
isIgnorable
public boolean isIgnorable(
IFile file)
-
-
resourceChanged
public void resourceChanged(
IResourceChangeEvent event)
-
-
Specified by:
-
resourceChanged
in interface
IResourceChangeListener
-
-
See Also:
-
IResourceChangeListener.resourceChanged(IResourceChangeEvent)
checkLocalChanges
protected void checkLocalChanges(
IResourceDelta delta,
List changes)
-
-
getRunnableContext
protected
IRunnableContext getRunnableContext(
Shell shell)
-
-
processDelta
protected void processDelta(
IResourceDelta delta)
- Check the delta for changed temporary files. If
any are found, synchronize the temporary files with
the corresponding remote files.
-
-
-
Parameters:
-
delta
- the delta to compare
synchronizeTempWithRemote
protected void synchronizeTempWithRemote(
IFile file,
IProgressMonitor monitor)
- Synchronize a temporary file with it's corresponding remote file.
First we need to determine what the corresponding remote file is.
Then we need to compare timestamps to determine how to synchronize.
-
-
-
Parameters:
-
file
- the temporary file to synchronize
refreshRemoteResource
protected void refreshRemoteResource(
Object parent)
-
-
doResourceSynchronization
protected abstract void doResourceSynchronization(
ISubSystem subsystem,
IFile tempFile,
String resourceId,
IProgressMonitor monitor)
- Synchronize the specified remote file with the temporary local file using the
specified remote file subsystem.
-
-
-
Parameters:
-
subsystem
- the remote file subsystem of the remote file -
tempFile
- the temporary file -
resourceId
- the remote file -
monitor
- the progress monitor
doesHandle
protected abstract boolean doesHandle(
ISubSystem subsystem)
- Indicate whether this tempfile listener handles the specified
-
-
-
Parameters:
-
subsystem
- the subsystem to check
-
Returns:
- whether it handles this or not
preScanForTempFiles
protected boolean preScanForTempFiles(
IResourceDelta delta)
- Prescan for changes that correspond the temp files project
-
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.