public class XtextDocument extends org.eclipse.jface.text.Document implements IXtextDocument
Modifier and Type | Class and Description |
---|---|
protected class |
XtextDocument.XtextDocumentLocker |
Constructor and Description |
---|
XtextDocument(DocumentTokenSource tokenSource,
ITextEditComposer composer) |
Modifier and Type | Method and Description |
---|---|
void |
addModelListener(IXtextModelListener listener) |
void |
addPosition(org.eclipse.jface.text.Position position) |
void |
addPosition(java.lang.String category,
org.eclipse.jface.text.Position position) |
void |
addXtextDocumentContentObserver(IXtextDocumentContentObserver observer) |
void |
checkAndUpdateAnnotations() |
protected XtextDocument.XtextDocumentLocker |
createDocumentLocker() |
void |
disposeInput() |
protected void |
ensureThatStateIsNotReturned(java.lang.Object exec,
IUnitOfWork<?,XtextResource> uow) |
protected void |
fireDocumentChanged(org.eclipse.jface.text.DocumentEvent event) |
<T> T |
getAdapter(java.lang.Class<T> adapterType) |
org.eclipse.jface.text.IRegion |
getLastDamage() |
org.eclipse.jface.text.Position[] |
getPositions(java.lang.String category) |
org.eclipse.jface.text.Position[] |
getPositions(java.lang.String category,
int offset,
int length,
boolean canStartBefore,
boolean canEndAfter) |
org.eclipse.emf.common.util.URI |
getResourceURI()
Returns the
uri of the associated emf resource . |
java.lang.Iterable<ILexerTokenRegion> |
getTokens() |
org.eclipse.core.runtime.jobs.Job |
getValidationJob() |
<T> T |
internalModify(IUnitOfWork<T,XtextResource> work)
Modifies the document's semantic model without reconciling the text nor the node model.
|
<T> T |
modify(IUnitOfWork<T,XtextResource> work) |
protected void |
notifyModelListeners(XtextResource res) |
<T> T |
readOnly(IUnitOfWork<T,XtextResource> work) |
void |
removeModelListener(IXtextModelListener listener) |
void |
removePosition(org.eclipse.jface.text.Position position) |
void |
removePosition(java.lang.String category,
org.eclipse.jface.text.Position position) |
void |
removeXtextDocumentContentObserver(IXtextDocumentContentObserver observer) |
void |
setInput(XtextResource resource) |
void |
setValidationJob(org.eclipse.core.runtime.jobs.Job validationJob) |
protected <T> void |
updateContentBeforeRead() |
acceptPostNotificationReplaces, addDocumentListener, addDocumentPartitioningListener, addDocumentRewriteSessionListener, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, checkStateOfPartitioner, completeInitialization, computeIndexInCategory, computeIndexInPositionList, computeIndexInPositionList, computeNumberOfLines, computePartitioning, computePartitioning, containsPosition, containsPositionCategory, doFireDocumentChanged, doFireDocumentChanged, doFireDocumentChanged2, fireDocumentAboutToBeChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireRewriteSessionChanged, get, get, getActiveRewriteSession, getChar, getContentType, getContentType, getDefaultLineDelimiter, getDocumentListeners, getDocumentManagedPositions, getDocumentPartitioner, getDocumentPartitioner, getDocumentPartitioningListeners, getLegalContentTypes, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getModificationStamp, getNumberOfLines, getNumberOfLines, getPartition, getPartition, getPartitionings, getPositionCategories, getPositionUpdaters, getStore, getTracker, ignorePostNotificationReplaces, insertPositionUpdater, registerPostNotificationReplace, removeDocumentListener, removeDocumentPartitioningListener, removeDocumentRewriteSessionListener, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, repairLineInformation, replace, replace, resumeListenerNotification, resumePostNotificationProcessing, search, set, set, setDocumentPartitioner, setDocumentPartitioner, setInitialLineDelimiter, setLineTracker, setTextStore, startRewriteSession, startRewriteSessionOnPartitioners, startSequentialRewrite, stopListenerNotification, stopPostNotificationProcessing, stopRewriteSession, stopRewriteSessionOnPartitioners, stopSequentialRewrite, updateDocumentStructures, updatePositions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDocumentListener, addDocumentPartitioningListener, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, computeIndexInCategory, computeNumberOfLines, computePartitioning, containsPosition, containsPositionCategory, get, get, getChar, getContentType, getDocumentPartitioner, getLegalContentTypes, getLegalLineDelimiters, getLength, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineOffset, getLineOfOffset, getNumberOfLines, getNumberOfLines, getPartition, getPositionCategories, getPositionUpdaters, insertPositionUpdater, removeDocumentListener, removeDocumentPartitioningListener, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, replace, search, set, setDocumentPartitioner
@Inject public XtextDocument(DocumentTokenSource tokenSource, ITextEditComposer composer)
public void setInput(XtextResource resource)
public void disposeInput()
protected XtextDocument.XtextDocumentLocker createDocumentLocker()
public <T> T readOnly(IUnitOfWork<T,XtextResource> work)
readOnly
in interface IReadAccess<XtextResource>
public <T> T modify(IUnitOfWork<T,XtextResource> work)
modify
in interface IWriteAccess<XtextResource>
public <T> T internalModify(IUnitOfWork<T,XtextResource> work)
protected void ensureThatStateIsNotReturned(java.lang.Object exec, IUnitOfWork<?,XtextResource> uow)
public void addModelListener(IXtextModelListener listener)
addModelListener
in interface IXtextDocument
public void removeModelListener(IXtextModelListener listener)
removeModelListener
in interface IXtextDocument
protected void notifyModelListeners(XtextResource res)
public void addXtextDocumentContentObserver(IXtextDocumentContentObserver observer)
addXtextDocumentContentObserver
in interface IXtextDocument
public void removeXtextDocumentContentObserver(IXtextDocumentContentObserver observer)
removeXtextDocumentContentObserver
in interface IXtextDocument
protected <T> void updateContentBeforeRead()
public void setValidationJob(org.eclipse.core.runtime.jobs.Job validationJob)
public org.eclipse.core.runtime.jobs.Job getValidationJob()
public void checkAndUpdateAnnotations()
public org.eclipse.emf.common.util.URI getResourceURI()
uri
of the associated emf resource
.
May be null if no resource is available or its uri is null
.public <T> T getAdapter(java.lang.Class<T> adapterType)
getAdapter
in interface IXtextDocument
public org.eclipse.jface.text.Position[] getPositions(java.lang.String category, int offset, int length, boolean canStartBefore, boolean canEndAfter) throws org.eclipse.jface.text.BadPositionCategoryException
getPositions
in class org.eclipse.jface.text.AbstractDocument
org.eclipse.jface.text.BadPositionCategoryException
public org.eclipse.jface.text.Position[] getPositions(java.lang.String category) throws org.eclipse.jface.text.BadPositionCategoryException
getPositions
in interface org.eclipse.jface.text.IDocument
getPositions
in class org.eclipse.jface.text.AbstractDocument
org.eclipse.jface.text.BadPositionCategoryException
public void addPosition(org.eclipse.jface.text.Position position) throws org.eclipse.jface.text.BadLocationException
addPosition
in interface org.eclipse.jface.text.IDocument
addPosition
in class org.eclipse.jface.text.AbstractDocument
org.eclipse.jface.text.BadLocationException
public void addPosition(java.lang.String category, org.eclipse.jface.text.Position position) throws org.eclipse.jface.text.BadLocationException, org.eclipse.jface.text.BadPositionCategoryException
addPosition
in interface org.eclipse.jface.text.IDocument
addPosition
in class org.eclipse.jface.text.AbstractDocument
org.eclipse.jface.text.BadLocationException
org.eclipse.jface.text.BadPositionCategoryException
public void removePosition(org.eclipse.jface.text.Position position)
removePosition
in interface org.eclipse.jface.text.IDocument
removePosition
in class org.eclipse.jface.text.AbstractDocument
public void removePosition(java.lang.String category, org.eclipse.jface.text.Position position) throws org.eclipse.jface.text.BadPositionCategoryException
removePosition
in interface org.eclipse.jface.text.IDocument
removePosition
in class org.eclipse.jface.text.AbstractDocument
org.eclipse.jface.text.BadPositionCategoryException
protected void fireDocumentChanged(org.eclipse.jface.text.DocumentEvent event)
fireDocumentChanged
in class org.eclipse.jface.text.AbstractDocument
public org.eclipse.jface.text.IRegion getLastDamage()
public java.lang.Iterable<ILexerTokenRegion> getTokens()