de.cau.cs.kieler.krep.evalbench.application.editors
Class TextDocumentProvider

java.lang.Object
  extended by org.eclipse.ui.texteditor.AbstractDocumentProvider
      extended by de.cau.cs.kieler.krep.evalbench.application.editors.TextDocumentProvider
All Implemented Interfaces:
IDocumentProvider, IDocumentProviderExtension, IDocumentProviderExtension2, IDocumentProviderExtension3, IDocumentProviderExtension4, IDocumentProviderExtension5

public class TextDocumentProvider
extends AbstractDocumentProvider

A document provider that 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.

Copied from org.eclipse.ui.examples.rcp.texteditor.editors.SimpleDocumentProvider

Since:
3.0
Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider
AbstractDocumentProvider.DocumentProviderOperation, AbstractDocumentProvider.ElementInfo
 
Field Summary
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider
PR10806_UC5_ENABLED, PR14469_ENABLED, STATUS_ERROR, STATUS_OK
 
Constructor Summary
TextDocumentProvider()
           
 
Method Summary
protected  IAnnotationModel createAnnotationModel(Object element)
           
protected  IDocument createDocument(Object element)
           
protected  void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
           
protected  IRunnableContext getOperationRunner(IProgressMonitor monitor)
           
 boolean isModifiable(Object element)
           
 boolean isReadOnly(Object element)
           
 boolean isStateValidated(Object element)
           
protected  void setupDocument(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

TextDocumentProvider

public TextDocumentProvider()
Method Detail

createDocument

protected IDocument createDocument(Object element)
                            throws CoreException
Specified by:
createDocument in class AbstractDocumentProvider
Throws:
CoreException

setupDocument

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

Parameters:
document - the new document

createAnnotationModel

protected IAnnotationModel createAnnotationModel(Object element)
                                          throws CoreException
Specified by:
createAnnotationModel in class AbstractDocumentProvider
Throws:
CoreException

doSaveDocument

protected void doSaveDocument(IProgressMonitor monitor,
                              Object element,
                              IDocument document,
                              boolean overwrite)
                       throws CoreException
Specified by:
doSaveDocument in class AbstractDocumentProvider
Throws:
CoreException

getOperationRunner

protected IRunnableContext getOperationRunner(IProgressMonitor monitor)
Specified by:
getOperationRunner in class AbstractDocumentProvider

isModifiable

public boolean isModifiable(Object element)
Specified by:
isModifiable in interface IDocumentProviderExtension
Overrides:
isModifiable in class AbstractDocumentProvider

isReadOnly

public boolean isReadOnly(Object element)
Specified by:
isReadOnly in interface IDocumentProviderExtension
Overrides:
isReadOnly in class AbstractDocumentProvider

isStateValidated

public boolean isStateValidated(Object element)
Specified by:
isStateValidated in interface IDocumentProviderExtension
Overrides:
isStateValidated in class AbstractDocumentProvider