Remote Systems
v6.4.1

com.ibm.etools.systems.core
Class SystemTempFileListener

java.lang.Object
  extended bycom.ibm.etools.systems.core.SystemTempFileListener
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
SystemUniversalTempFileListener

public abstract class SystemTempFileListener
extends Object
implements Runnable

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.


Field Summary
static String copyright
           
 
Constructor Summary
SystemTempFileListener()
           
 
Method Summary
 void addIgnoreFile(IFile toIgnore)
           
protected abstract  boolean doesHandle(SubSystem subsystem)
          Indicate whether this tempfile listener handles the specified
protected abstract  void doResourceSynchronization(SubSystem subsystem, IFile tempFile, String resourceId, IProgressMonitor monitor)
          Synchronize the specified remote file with the temporary local file using the specified remote file subsystem.
protected  IRunnableContext getRunnableContext(Shell shell)
           
 boolean isIgnorable(IFile file)
           
protected  boolean preScanForTempFiles(IResourceDelta delta)
          Prescan for changes that correspond the temp files project
protected  void processDelta(IResourceDelta delta)
          Check the delta for changed temporary files.
 void removeIgnoreFile(IFile toNotIgnore)
           
 void resourceChanged(IResourceChangeEvent event)
           
 void run()
           
 void run(IProgressMonitor monitor)
          Synchronize the list of temp files
 void setEnabled(boolean flag)
           
protected  void synchronizeTempWithRemote(IFile file, IProgressMonitor monitor)
          Synchronize a temporary file with it's corresponding remote file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemTempFileListener

public SystemTempFileListener()
Method Detail

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)
See Also:
IResourceChangeListener#resourceChanged(IResourceChangeEvent)

run

public void run()
Specified by:
run in interface Runnable
See Also:
Runnable.run()

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

run

public void run(IProgressMonitor monitor)
Synchronize the list of temp files


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

doResourceSynchronization

protected abstract void doResourceSynchronization(SubSystem subsystem,
                                                  IFile tempFile,
                                                  String resourceId,
                                                  IProgressMonitor monitor)
Synchronize the specified remote file with the temporary local file using the specified remote file subsystem.

Parameters:
tempFile - the temporary file
monitor - the progress monitor

doesHandle

protected abstract boolean doesHandle(SubSystem 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


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.