blob: 5968fdb6e1bc52ad35f6f0201d9c64f8673a0dfb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!--
/******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
****************************************************************************/
-->
</head>
<body>
<P>Provides a framework to support Eclipse resource change events, such as those that relate to
{@link org.eclipse.core.resources.IFile IFile} and {@link
org.eclipse.core.resources.IMarker IMarker}.</P>
<h2>Listening to file resource changes</h2>
<P>To listen to changes in files, add an {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileObserver IFileObserver} to the
{@link
org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager#getInstance()
singleton instance} of the {@link
org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager
FileChangeManager}, which implements {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager
IFileChangeManager}. Depending on the {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager#addFileObserver(org.eclipse.gmf.runtime.common.ui.resources.IFileObserver)
addFileObserver} method used, the {@link
org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager FileChangeManager}
also supports filtering based on the actual {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager#addFileObserver(org.eclipse.gmf.runtime.common.ui.resources.IFileObserver,
org.eclipse.core.resources.IFile) IFile}, {@link org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager#addFileObserver(org.eclipse.gmf.runtime.common.ui.resources.IFileObserver,
org.eclipse.core.resources.IFolder) IFolder}, or {@link org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager#addFileObserver(org.eclipse.gmf.runtime.common.ui.resources.IFileObserver,
java.lang.String[]) the file's extension}.</P>
<P>When finished listening, the {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileChangeManager#removeFileObserver(org.eclipse.gmf.runtime.common.ui.resources.IFileObserver)
removeFileObserver} method should be called.
<P>Internally, the {@link
org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager FileChangeManager}
notifies the {@link
org.eclipse.gmf.runtime.common.ui.resources.FileObserverManager
FileObserverManager} with {@link
org.eclipse.gmf.runtime.common.ui.resources.FileChangeEvent FileChangeEvent}
and {@link org.eclipse.gmf.runtime.common.ui.resources.MarkerChangeEvent
MarkerChangeEvent} objects. The FileObserverManager is responsible
for managing the {@link
org.eclipse.gmf.runtime.common.ui.resources.IFileObserver IFileObserver} objects
that were added to the FileChangeManager and instantiating the appropriate
{@link org.eclipse.gmf.runtime.common.ui.resources.FileObserverFilter
FileObserverFilter} objects for them.
</P>
<h2>The FileModificationValidator</h2>
<P>The {@link
org.eclipse.gmf.runtime.common.ui.resources.FileModificationValidator
FileModificationValidator} is used to determine whether a file may be edited or
saved. After obtaining the {@link
org.eclipse.gmf.runtime.common.ui.resources.FileModificationValidator#getInstance()
singleton instance} of the class, the methods {@link
org.eclipse.gmf.runtime.common.ui.resources.FileModificationValidator#okToEdit(org.eclipse.core.resources.IFile[], java.lang.String)
okToEdit} and {@link
org.eclipse.gmf.runtime.common.ui.resources.FileModificationValidator#okToSave(org.eclipse.core.resources.IFile)
okToSave} may be called, respectively. More information is availabe from the
documentation of Eclipse's {@link
org.eclipse.core.resources.IFileModificationValidator
IFileModificationValidator}.</P>
<h2>Package Specification</h2>
<P>For more information, please see
{@link org.eclipse.core.resources.IResource
org.eclipse.core.resources.IResource}</P>
@canBeSeenBy %partners
</body>
</html>