## org.eclipse.emf.ecoretools.diagram.part
Class EcoreDocumentProvider

    java.lang.Object
      org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
          org.eclipse.emf.ecoretools.diagram.part.EcoreDocumentProvider

All Implemented Interfaces:
  org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider

    public class EcoreDocumentProvider

extends org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
implements org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider

Nested Class Summary
`protected class` `EcoreDocumentProvider.ResourceSetInfo`
`protected class` `EcoreDocumentProvider.SynchronizerManager`

Nested classes/interfaces inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
`org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.DocumentProviderOperation, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.ElementInfo`

Field Summary
`static java.lang.String` `editingDomainBaseID`
`static java.lang.String` `id_separator`
`protected EcoreDocumentProvider.SynchronizerManager` `synchronizerManager`

Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
`PR10806_UC5_ENABLED, PR14469_ENABLED, STATUS_ERROR, STATUS_OK`

Constructor Summary
`EcoreDocumentProvider()`

Method Summary
`protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument` `createDocument(java.lang.Object element)`
`protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.ElementInfo` `createElementInfo(java.lang.Object element)` Register one workspace synchronizer per editing domain
`protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument` `createEmptyDocument()`
`org.eclipse.ui.IEditorInput` `createInputWithEditingDomain(org.eclipse.ui.IEditorInput editorInput, org.eclipse.emf.transaction.TransactionalEditingDomain domain)`
`protected void` `disconnected()`
`protected void` `disposeElementInfo(java.lang.Object element, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.ElementInfo info)`
`protected void` `doSaveDocument(org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.Object element, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document, boolean overwrite)`
`protected void` `doSynchronize(java.lang.Object element, org.eclipse.core.runtime.IProgressMonitor monitor)`
`protected void` `doUpdateStateCache(java.lang.Object element)`
`protected void` `doValidateState(java.lang.Object element, java.lang.Object computationContext)`
`org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument` `getDiagramDocument(java.lang.Object element)`
`java.lang.String` `getEditingDomainID()`
`long` `getModificationStamp(java.lang.Object element)`
`protected org.eclipse.jface.operation.IRunnableContext` `getOperationRunner(org.eclipse.core.runtime.IProgressMonitor monitor)`
`protected org.eclipse.core.runtime.jobs.ISchedulingRule` `getResetRule(java.lang.Object element)`
`EcoreDocumentProvider.ResourceSetInfo` `getResourceSetInfo(java.lang.Object editorInput)`
`protected org.eclipse.core.runtime.jobs.ISchedulingRule` `getSaveRule(java.lang.Object element)`
`protected org.eclipse.core.runtime.jobs.ISchedulingRule` `getSynchronizeRule(java.lang.Object element)`
`protected org.eclipse.core.runtime.jobs.ISchedulingRule` `getValidateStateRule(java.lang.Object element)`
`protected void` `handleElementChanged(EcoreDocumentProvider.ResourceSetInfo info, org.eclipse.emf.ecore.resource.Resource changedResource, org.eclipse.core.runtime.IProgressMonitor monitor)`
`protected void` `handleElementMoved(org.eclipse.ui.IEditorInput input, org.eclipse.emf.common.util.URI uri)`
`boolean` `isDeleted(java.lang.Object element)`
`boolean` `isModifiable(java.lang.Object element)`
`boolean` `isReadOnly(java.lang.Object element)`
`boolean` `isSynchronized(java.lang.Object element)`
`protected void` `setDocumentContent(org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document, org.eclipse.ui.IEditorInput element)`
`protected void` `setupDocument(java.lang.Object element, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document)` Sets up the given document as it would be provided for the given element.
`protected void` `updateCache(java.lang.Object element)`

Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider

`aboutToChange, addElementStateListener, addUnchangedElementListeners, canSaveDocument, changed, connect, connected, disconnect, doResetDocument, executeOperation, fireElementContentAboutToBeReplaced, fireElementContentReplaced, fireElementDeleted, fireElementDirtyStateChanged, fireElementMoved, fireElementStateChangeFailed, fireElementStateChanging, fireElementStateValidationChanged, getConnectedElements, getDocument, getElementInfo, getProgressMonitor, getResetOperation, getSaveOperation, getStatus, getSynchronizationStamp, invalidatesState, isStateValidated, mustSaveDocument, removeElementStateListener, removeUnchangedElementListeners, resetDocument, saveDocument, setCanSaveDocument, setProgressMonitor, synchronize, updateStateCache, validateState`

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

Field Detail

### editingDomainBaseID

    public static java.lang.String editingDomainBaseID

### id_separator

    public static java.lang.String id_separator

### synchronizerManager

    protected EcoreDocumentProvider.SynchronizerManager synchronizerManager

Constructor Detail

### EcoreDocumentProvider

    public EcoreDocumentProvider()

Method Detail

### createElementInfo

    protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.ElementInfo createElementInfo(java.lang.Object element)
                                                                                                                           throws org.eclipse.core.runtime.CoreException

  Register one workspace synchronizer per editing domain

  Overrides:
    `createElementInfo` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### createDocument

    protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument createDocument(java.lang.Object element)
                                                                                             throws org.eclipse.core.runtime.CoreException

  Specified by:
    `createDocument` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### setupDocument

    protected void setupDocument(java.lang.Object element,
                                 org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document)

  Sets up the given document as it would be provided for the given element. The content of the document is not changed. This default implementation is empty. Subclasses may reimplement.

  Parameters:
    `element` - the blue-print element
    `document` - the document to set up

### createEmptyDocument

    protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument createEmptyDocument()

  Specified by:
    `createEmptyDocument` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### setDocumentContent

    protected void setDocumentContent(org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document,
                                      org.eclipse.ui.IEditorInput element)
                               throws org.eclipse.core.runtime.CoreException

  Throws:
    `org.eclipse.core.runtime.CoreException`

### getModificationStamp

    public long getModificationStamp(java.lang.Object element)

  Specified by:
    `getModificationStamp` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider`
  Overrides:
    `getModificationStamp` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### isDeleted

    public boolean isDeleted(java.lang.Object element)

  Specified by:
    `isDeleted` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider`
  Overrides:
    `isDeleted` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getResourceSetInfo

    public EcoreDocumentProvider.ResourceSetInfo getResourceSetInfo(java.lang.Object editorInput)

### disposeElementInfo

    protected void disposeElementInfo(java.lang.Object element,
                                      org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.ElementInfo info)

  Overrides:
    `disposeElementInfo` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### doValidateState

    protected void doValidateState(java.lang.Object element,
                                   java.lang.Object computationContext)
                            throws org.eclipse.core.runtime.CoreException

  Overrides:
    `doValidateState` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### isReadOnly

    public boolean isReadOnly(java.lang.Object element)

  Specified by:
    `isReadOnly` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider`
  Overrides:
    `isReadOnly` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### isModifiable

    public boolean isModifiable(java.lang.Object element)

  Specified by:
    `isModifiable` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider`
  Overrides:
    `isModifiable` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### updateCache

    protected void updateCache(java.lang.Object element)
                        throws org.eclipse.core.runtime.CoreException

  Throws:
    `org.eclipse.core.runtime.CoreException`

### doUpdateStateCache

    protected void doUpdateStateCache(java.lang.Object element)
                               throws org.eclipse.core.runtime.CoreException

  Overrides:
    `doUpdateStateCache` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### isSynchronized

    public boolean isSynchronized(java.lang.Object element)

  Specified by:
    `isSynchronized` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider`
  Overrides:
    `isSynchronized` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getResetRule

    protected org.eclipse.core.runtime.jobs.ISchedulingRule getResetRule(java.lang.Object element)

  Overrides:
    `getResetRule` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getSaveRule

    protected org.eclipse.core.runtime.jobs.ISchedulingRule getSaveRule(java.lang.Object element)

  Overrides:
    `getSaveRule` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getSynchronizeRule

    protected org.eclipse.core.runtime.jobs.ISchedulingRule getSynchronizeRule(java.lang.Object element)

  Overrides:
    `getSynchronizeRule` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getValidateStateRule

    protected org.eclipse.core.runtime.jobs.ISchedulingRule getValidateStateRule(java.lang.Object element)

  Overrides:
    `getValidateStateRule` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### doSynchronize

    protected void doSynchronize(java.lang.Object element,
                                 org.eclipse.core.runtime.IProgressMonitor monitor)
                          throws org.eclipse.core.runtime.CoreException

  Overrides:
    `doSynchronize` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### doSaveDocument

    protected void doSaveDocument(org.eclipse.core.runtime.IProgressMonitor monitor,
                                  java.lang.Object element,
                                  org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document,
                                  boolean overwrite)
                           throws org.eclipse.core.runtime.CoreException

  Specified by:
    `doSaveDocument` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### handleElementChanged

    protected void handleElementChanged(EcoreDocumentProvider.ResourceSetInfo info,
                                        org.eclipse.emf.ecore.resource.Resource changedResource,
                                        org.eclipse.core.runtime.IProgressMonitor monitor)

### handleElementMoved

    protected void handleElementMoved(org.eclipse.ui.IEditorInput input,
                                      org.eclipse.emf.common.util.URI uri)

### createInputWithEditingDomain

    public org.eclipse.ui.IEditorInput createInputWithEditingDomain(org.eclipse.ui.IEditorInput editorInput,
                                                                    org.eclipse.emf.transaction.TransactionalEditingDomain domain)

  Specified by:
    `createInputWithEditingDomain` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider`

### getDiagramDocument

    public org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument getDiagramDocument(java.lang.Object element)

  Specified by:
    `getDiagramDocument` in interface `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider`

### getOperationRunner

    protected org.eclipse.jface.operation.IRunnableContext getOperationRunner(org.eclipse.core.runtime.IProgressMonitor monitor)

  Specified by:
    `getOperationRunner` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

### getEditingDomainID

    public java.lang.String getEditingDomainID()

### disconnected

    protected void disconnected()

  Overrides:
    `disconnected` in class `org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider`

Copyright 2007 Anyware Technologies. All Rights Reserved.