Runtime

## Package org.eclipse.gmf.runtime.common.ui.resources

Provides a framework to support Eclipse resource change events, such as those that relate to `IFile` and `IMarker`.

See:
Description

Interface Summary
IBookmark: Convenience interface for the bookmark type and its attributes
IFileObserver: A file observer is notified of changes to files in the workspace.
IMarker: Convenience interface for the marker type and its attributes

Class Summary
FileChangeManager: The file change manager handles changes made to file resources within the Eclipse workspace.
FileModificationValidator: A wrapper around the Eclipse IFileModificationValidator.
FileObserverManager: Manage the list of file observers for the file change manager.

## Package org.eclipse.gmf.runtime.common.ui.resources Description

Provides a framework to support Eclipse resource change events, such as those that relate to `IFile` and `IMarker`.

## Listening to file resource changes

To listen to changes in files, add an `IFileObserver` to the `singleton instance` of the `FileChangeManager`, which implements `IFileChangeManager`. Depending on the `addFileObserver` method used, the `FileChangeManager` also supports filtering based on the actual `IFile`, `IFolder`, or `the file's extension`.

When finished listening, the `removeFileObserver` method should be called.

Internally, the `FileChangeManager` notifies the `FileObserverManager` with `FileChangeEvent` and `MarkerChangeEvent` objects. The FileObserverManager is responsible for managing the `IFileObserver` objects that were added to the FileChangeManager and instantiating the appropriate `FileObserverFilter` objects for them.

## The FileModificationValidator

The `FileModificationValidator` is used to determine whether a file may be edited or saved. After obtaining the `singleton instance` of the class, the methods `okToEdit` and `okToSave` may be called, respectively. More information is availabe from the documentation of Eclipse's `IFileModificationValidator`.

## Package Specification

For more information, please see `org.eclipse.core.resources.IResource`

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.