|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.resources.FileChangeManager
The file change manager handles changes made to file resources within the Eclipse workspace. Files in the workspace are affected by change events on the files themselves as well as change events on the project and folder that contains these files.
| Method Summary | |
void |
addFileObserver(IFileObserver fileObserver)
Add a file observer without a filter. |
void |
addFileObserver(IFileObserver fileObserver,
IContentType[] contentTypeFilter)
Add a file observer with a content type filter. |
void |
addFileObserver(IFileObserver fileObserver,
IFile fileFilter)
Add a file observer with a file filter. |
void |
addFileObserver(IFileObserver fileObserver,
IFolder folderFilter)
Add a file observer with a folder filter. |
void |
addFileObserver(IFileObserver fileObserver,
java.lang.String[] extensionFilter)
Add a file observer with a file extension filter. |
static FileChangeManager |
getInstance()
get the singleton instance of this class |
static IResource |
getMovedFromResource(IResourceDelta delta)
Retrieve the moved from resource from the resource delta. |
boolean |
okToEdit(IFile[] files,
java.lang.String modificationReason)
Validates that the given files can be modified using the Team validateEdit support. |
boolean |
okToSave(IFile file)
Validates that the given file can be saved using the Team validateSave support. |
void |
refreshLocal(IFile file)
Refresh changes made to the file directly on disk with the workspace. |
void |
removeFileObserver(IFileObserver fileObserver)
Remove a file observer. |
void |
resourceChanged(IResourceChangeEvent event)
|
boolean |
visit(IResourceDelta delta)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static FileChangeManager getInstance()
public final void resourceChanged(IResourceChangeEvent event)
resourceChanged in interface IResourceChangeListenerpublic final boolean visit(IResourceDelta delta)
visit in interface IResourceDeltaVisitor
public boolean okToEdit(IFile[] files,
java.lang.String modificationReason)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
okToEdit in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfiles - files that are to be modified; these files must all exist in
the workspace.modificationReason - a String describing the reason for modifying the file, usually
the command text.
IFileModificationValidator.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)public boolean okToSave(IFile file)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
okToSave in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfile - the file that is to be saved; this file must exist in the
workspace.
IFileModificationValidator.validateSave(org.eclipse.core.resources.IFile)public void removeFileObserver(IFileObserver fileObserver)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
removeFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.
public void addFileObserver(IFileObserver fileObserver,
IFile fileFilter)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
addFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.fileFilter - the file filter.
public void addFileObserver(IFileObserver fileObserver,
IContentType[] contentTypeFilter)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
addFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.contentTypeFilter - the content type array filter.
public void addFileObserver(IFileObserver fileObserver,
IFolder folderFilter)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
addFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.folderFilter - the folder filter.
public void addFileObserver(IFileObserver fileObserver,
java.lang.String[] extensionFilter)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
addFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.extensionFilter - the file extension array filter.public void addFileObserver(IFileObserver fileObserver)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
addFileObserver in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfileObserver - the file observer.public void refreshLocal(IFile file)
org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManager
refreshLocal in interface org.eclipse.gmf.runtime.common.ui.internal.resources.IFileChangeManagerfile - the file to refresh.public static IResource getMovedFromResource(IResourceDelta delta)
delta - the resource change containing the moved from path.
|
Runtime | ||||||||||
| 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., Borland Software Corp., and others 2005,2006. All rights reserved.