Runtime

## org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document
Class FileDocumentProvider.FileSynchronizer

    java.lang.Object
      org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.FileDocumentProvider.FileSynchronizer

All Implemented Interfaces:
  java.util.EventListener, IResourceChangeListener, IResourceDeltaVisitor

Enclosing class:
  FileDocumentProvider

    protected class FileDocumentProvider.FileSynchronizer

extends java.lang.Object
implements IResourceChangeListener, IResourceDeltaVisitor

Synchronizes the document with external resource changes.

Field Summary
`protected IFileEditorInput` `fFileEditorInput` The file editor input.
`protected boolean` `fIsInstalled` A flag indicating whether this synchronizer is installed or not.

Constructor Summary
`FileDocumentProvider.FileSynchronizer(IFileEditorInput fileEditorInput)` Creates a new file synchronizer.

Method Summary
`protected IFile` `getFile()` Returns the file wrapped by the file editor input.
`void` `install()` Installs the synchronizer on the input's file.
`void` `resourceChanged(IResourceChangeEvent e)`
`void` `uninstall()` Uninstalls the synchronizer from the input's file.
`protected void` `update(java.lang.Runnable runnable)` Posts the update code "behind" the running operation.
`boolean` `visit(IResourceDelta delta)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fFileEditorInput

    protected IFileEditorInput fFileEditorInput

  The file editor input.

### fIsInstalled

    protected boolean fIsInstalled

  A flag indicating whether this synchronizer is installed or not.

Constructor Detail

### FileDocumentProvider.FileSynchronizer

    public FileDocumentProvider.FileSynchronizer(IFileEditorInput fileEditorInput)

  Creates a new file synchronizer. Is not yet installed on a resource.

  Parameters:
    `fileEditorInput` - the editor input to be synchronized

Method Detail

### getFile

    protected IFile getFile()

  Returns the file wrapped by the file editor input.

  Returns:
    the file wrapped by the editor input associated with that synchronizer

### install

    public void install()

  Installs the synchronizer on the input's file.

### uninstall

    public void uninstall()

  Uninstalls the synchronizer from the input's file.

### resourceChanged

    public void resourceChanged(IResourceChangeEvent e)

  Specified by:
    `resourceChanged` in interface `IResourceChangeListener`

### visit

    public boolean visit(IResourceDelta delta)
                  throws CoreException

  Specified by:
    `visit` in interface `IResourceDeltaVisitor`
  Throws:
    `CoreException`

### update

    protected void update(java.lang.Runnable runnable)

  Posts the update code "behind" the running operation.

  Parameters:
    `runnable` - the update code

Runtime

Guidelines for using Eclipse APIs.

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