Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.files.ui.resources
Class SystemTempFileListener


java.lang.Object
  extended by 
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.


Nested Class Summary
 class SystemTempFileListener.RefreshResourcesJob
           
 class SystemTempFileListener.RefreshResourcesUIJob
          Deprecated. don't use this class, it's only here because to remove it would be an API change, and we can't do that until 3.0. Instead of using this, SynchResourcesJob should be used.
 
Constructor Summary
SystemTempFileListener ()
           
 
Method Summary
 void addIgnoreFile ( IFile toIgnore)
           
protected  void checkLocalChanges ( IResourceDelta delta, List changes)
           
protected abstract  boolean doesHandle ( ISubSystem subsystem)
          Indicate whether this tempfile listener handles the specified
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.
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.
protected  void refreshRemoteResource ( Object parent)
           
 void removeIgnoreFile ( IFile toNotIgnore)
           
 void resourceChanged ( IResourceChangeEvent event)
           
 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
 

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)
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


RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire