org.eparapher.rcp.editors
Class SimpleDocumentProvider

java.lang.Object
  extended by org.eclipse.ui.texteditor.AbstractDocumentProvider
      extended by org.eparapher.rcp.editors.SimpleDocumentProvider
All Implemented Interfaces:
org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.texteditor.IDocumentProviderExtension, org.eclipse.ui.texteditor.IDocumentProviderExtension2, org.eclipse.ui.texteditor.IDocumentProviderExtension3, org.eclipse.ui.texteditor.IDocumentProviderExtension4, org.eclipse.ui.texteditor.IDocumentProviderExtension5
Direct Known Subclasses:
XMLDocumentProvider

public class SimpleDocumentProvider
extends org.eclipse.ui.texteditor.AbstractDocumentProvider

A document provider that reads can handle IPathEditorInput editor inputs. Documents are created by reading them in from the file that the IPath contained in the editor input points to.

Since:
3.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider
org.eclipse.ui.texteditor.AbstractDocumentProvider.DocumentProviderOperation, org.eclipse.ui.texteditor.AbstractDocumentProvider.ElementInfo
 
Field Summary
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider
PR10806_UC5_ENABLED, PR14469_ENABLED, STATUS_ERROR, STATUS_OK
 
Constructor Summary
SimpleDocumentProvider()
           
 
Method Summary
protected  org.eclipse.jface.text.source.IAnnotationModel createAnnotationModel(Object element)
           
protected  org.eclipse.jface.text.IDocument createDocument(Object element)
           
protected  void doSaveDocument(org.eclipse.core.runtime.IProgressMonitor monitor, Object element, org.eclipse.jface.text.IDocument document, boolean overwrite)
           
protected  org.eclipse.jface.operation.IRunnableContext getOperationRunner(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 boolean isModifiable(Object element)
           
 boolean isReadOnly(Object element)
           
 boolean isStateValidated(Object element)
           
protected  void setupDocument(org.eclipse.jface.text.IDocument document)
          Set up the document - default implementation does nothing.
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider
aboutToChange, addElementStateListener, addUnchangedElementListeners, canSaveDocument, changed, connect, connected, createElementInfo, disconnect, disconnected, disposeElementInfo, doResetDocument, doSynchronize, doUpdateStateCache, doValidateState, executeOperation, fireElementContentAboutToBeReplaced, fireElementContentReplaced, fireElementDeleted, fireElementDirtyStateChanged, fireElementMoved, fireElementStateChangeFailed, fireElementStateChanging, fireElementStateValidationChanged, getAnnotationModel, getConnectedElements, getContentType, getDocument, getElementInfo, getModificationStamp, getProgressMonitor, getResetRule, getSaveRule, getStatus, getSynchronizationStamp, getSynchronizeRule, getValidateStateRule, invalidatesState, isDeleted, isNotSynchronizedException, isSynchronized, 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
 

Constructor Detail

SimpleDocumentProvider

public SimpleDocumentProvider()
Method Detail

createDocument

protected org.eclipse.jface.text.IDocument createDocument(Object element)
                                                   throws org.eclipse.core.runtime.CoreException
Specified by:
createDocument in class org.eclipse.ui.texteditor.AbstractDocumentProvider
Throws:
org.eclipse.core.runtime.CoreException

setupDocument

protected void setupDocument(org.eclipse.jface.text.IDocument document)
Set up the document - default implementation does nothing.

Parameters:
document - the new document

createAnnotationModel

protected org.eclipse.jface.text.source.IAnnotationModel createAnnotationModel(Object element)
                                                                        throws org.eclipse.core.runtime.CoreException
Specified by:
createAnnotationModel in class org.eclipse.ui.texteditor.AbstractDocumentProvider
Throws:
org.eclipse.core.runtime.CoreException

doSaveDocument

protected void doSaveDocument(org.eclipse.core.runtime.IProgressMonitor monitor,
                              Object element,
                              org.eclipse.jface.text.IDocument document,
                              boolean overwrite)
                       throws org.eclipse.core.runtime.CoreException
Specified by:
doSaveDocument in class org.eclipse.ui.texteditor.AbstractDocumentProvider
Throws:
org.eclipse.core.runtime.CoreException

getOperationRunner

protected org.eclipse.jface.operation.IRunnableContext getOperationRunner(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
getOperationRunner in class org.eclipse.ui.texteditor.AbstractDocumentProvider

isModifiable

public boolean isModifiable(Object element)
Specified by:
isModifiable in interface org.eclipse.ui.texteditor.IDocumentProviderExtension
Overrides:
isModifiable in class org.eclipse.ui.texteditor.AbstractDocumentProvider

isReadOnly

public boolean isReadOnly(Object element)
Specified by:
isReadOnly in interface org.eclipse.ui.texteditor.IDocumentProviderExtension
Overrides:
isReadOnly in class org.eclipse.ui.texteditor.AbstractDocumentProvider

isStateValidated

public boolean isStateValidated(Object element)
Specified by:
isStateValidated in interface org.eclipse.ui.texteditor.IDocumentProviderExtension
Overrides:
isStateValidated in class org.eclipse.ui.texteditor.AbstractDocumentProvider


Copyright © 2009 eParapher Software Foundation. All Rights Reserved.