Package com._1c.g5.v8.dt.bsl.ui.editor
Class BslXtextDocument
- java.lang.Object
-
- org.eclipse.jface.text.AbstractDocument
-
- org.eclipse.jface.text.Document
-
- org.eclipse.xtext.ui.editor.model.XtextDocument
-
- org.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
-
- com._1c.g5.v8.dt.bsl.ui.editor.BslXtextDocument
-
- All Implemented Interfaces:
org.eclipse.handly.xtext.ui.editor.IHandlyXtextDocument
,org.eclipse.jface.text.IDocument
,org.eclipse.jface.text.IDocumentExtension
,org.eclipse.jface.text.IDocumentExtension2
,org.eclipse.jface.text.IDocumentExtension3
,org.eclipse.jface.text.IDocumentExtension4
,org.eclipse.jface.text.IRepairableDocument
,org.eclipse.jface.text.IRepairableDocumentExtension
,org.eclipse.xtext.ui.editor.model.IXtextDocument
,org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource>
,org.eclipse.xtext.util.concurrent.IReadAccess.Priority<org.eclipse.xtext.resource.XtextResource>
,org.eclipse.xtext.util.concurrent.IWriteAccess<org.eclipse.xtext.resource.XtextResource>
public class BslXtextDocument extends org.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
Special implementation ofHandlyXtextDocument
for Bsl language
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.model.XtextDocument
org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker
-
Nested classes/interfaces inherited from interface org.eclipse.jface.text.IDocumentExtension
org.eclipse.jface.text.IDocumentExtension.IReplace
-
Nested classes/interfaces inherited from interface org.eclipse.handly.xtext.ui.editor.IHandlyXtextDocument
org.eclipse.handly.xtext.ui.editor.IHandlyXtextDocument.IUndoableUnitOfWork<R extends Object,P extends Object>
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.util.concurrent.IReadAccess
org.eclipse.xtext.util.concurrent.IReadAccess.Priority<State extends Object>
-
-
Constructor Summary
Constructors Constructor Description BslXtextDocument(org.eclipse.xtext.ui.editor.model.DocumentTokenSource tokenSource, org.eclipse.xtext.ui.editor.model.edit.ITextEditComposer composer)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSpellingListener(DocumentSpellingListener spellingListener)
AddsDocumentSpellingListener
for this documentvoid
checkAndUpdateAnnotations()
protected org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker
createDocumentLocker()
void
disposeInput()
org.eclipse.emf.common.util.URI
getURI()
GetsURI
of the resource link with this document<T> T
readOnlyDataModel(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document.<T> T
readOnlyDataModelWithoutSync(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document.<T> T
readOnlyForContentAssist(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document.void
setInput(org.eclipse.xtext.resource.XtextResource resource)
void
setOutdated(boolean outdated)
-
Methods inherited from class org.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
applyChange, getReconciledSnapshot, modify, needsReconciling, reconcile
-
Methods inherited from class org.eclipse.xtext.ui.editor.model.XtextDocument
addModelListener, addPosition, addPosition, addXtextDocumentContentObserver, ensureThatStateIsNotReturned, fireDocumentChanged, fireRewriteSessionChanged, getAdapter, getCancelIndicator, getLastDamage, getPositions, getPositions, getResourceLock, getResourceURI, getTokens, getValidationJob, hasPendingUpdates, internalModify, notifyModelListeners, priorityReadOnly, readOnly, removeModelListener, removePosition, removePosition, removeXtextDocumentContentObserver, setValidationJob, updateContentBeforeRead
-
Methods inherited from class org.eclipse.jface.text.AbstractDocument
acceptPostNotificationReplaces, addDocumentListener, addDocumentPartitioningListener, addDocumentRewriteSessionListener, addPositionCategory, addPositionUpdater, addPrenotifiedDocumentListener, checkStateOfPartitioner, completeInitialization, computeIndexInCategory, computeIndexInPositionList, computeIndexInPositionList, computeNumberOfLines, computePartitioning, computePartitioning, containsPosition, containsPositionCategory, doFireDocumentChanged, doFireDocumentChanged, doFireDocumentChanged2, fireDocumentAboutToBeChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, fireDocumentPartitioningChanged, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jface.text.IDocument
addDocumentListener, addDocumentPartitioningListener, addPosition, addPosition, 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, getPositions, getPositionUpdaters, insertPositionUpdater, removeDocumentListener, removeDocumentPartitioningListener, removePosition, removePosition, removePositionCategory, removePositionUpdater, removePrenotifiedDocumentListener, replace, search, set, setDocumentPartitioner
-
Methods inherited from interface org.eclipse.jface.text.IDocumentExtension3
computePartitioning, getContentType, getDocumentPartitioner, getLegalContentTypes, getPartition, getPartitionings, setDocumentPartitioner
-
Methods inherited from interface org.eclipse.xtext.util.concurrent.IReadAccess
tryReadOnly, tryReadOnly, tryReadOnly
-
Methods inherited from interface org.eclipse.xtext.util.concurrent.IReadAccess.Priority
priorityReadOnly, tryPriorityReadOnly, tryPriorityReadOnly, tryPriorityReadOnly
-
-
-
-
Constructor Detail
-
BslXtextDocument
@Inject public BslXtextDocument(org.eclipse.xtext.ui.editor.model.DocumentTokenSource tokenSource, org.eclipse.xtext.ui.editor.model.edit.ITextEditComposer composer)
Constructor- Parameters:
tokenSource
- actualDocumentTokenSource
, can't benull
composer
- actualDocumentTokenSource
, can't benull
-
-
Method Detail
-
setInput
public void setInput(org.eclipse.xtext.resource.XtextResource resource)
- Overrides:
setInput
in classorg.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
-
disposeInput
public void disposeInput()
- Overrides:
disposeInput
in classorg.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
-
setOutdated
public void setOutdated(boolean outdated)
- Overrides:
setOutdated
in classorg.eclipse.xtext.ui.editor.model.XtextDocument
-
addSpellingListener
public void addSpellingListener(DocumentSpellingListener spellingListener)
AddsDocumentSpellingListener
for this document- Parameters:
spellingListener
- addingDocumentSpellingListener
, ca't benull
-
checkAndUpdateAnnotations
public void checkAndUpdateAnnotations()
- Overrides:
checkAndUpdateAnnotations
in classorg.eclipse.xtext.ui.editor.model.XtextDocument
-
getURI
public org.eclipse.emf.common.util.URI getURI()
GetsURI
of the resource link with this document- Returns:
URI
of the actual document resource, ornull
if input was disposed
-
readOnlyDataModel
public <T> T readOnlyDataModel(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document. Operation is similar toXtextDocument.readOnly(IUnitOfWork)
but there is no transaction locking, only possible waiting ofBslResource.update(int, int, String)
- Type Parameters:
T
- type of returning value- Parameters:
work
- unit of work with parse model ofBslResource
linked with document, cannot benull
- Returns:
- result of unit of work, can be
null
-
readOnlyDataModelWithoutSync
public <T> T readOnlyDataModelWithoutSync(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document. Operation is similar toXtextDocument.readOnly(IUnitOfWork)
but there is no transaction locking and there is no waiting ofBslResource.update(int, int, String)
.Important that
XtextResource
got inIUnitOfWork
can be outdated- Type Parameters:
T
- type of returning value- Parameters:
work
- unit of work with parse model ofBslResource
linked with document, cannot benull
- Returns:
- result of unit of work, can be
null
-
readOnlyForContentAssist
public <T> T readOnlyForContentAssist(org.eclipse.xtext.util.concurrent.IUnitOfWork<T,org.eclipse.xtext.resource.XtextResource> work)
Special read only operation for reading data model fromBslResource
linked with this document. Method should be called from content assist, this method similar to call methodXtextDocument.priorityReadOnly(IUnitOfWork)
but before it all reconciler jobs were canceled- Type Parameters:
T
- type of returning value- Parameters:
work
- unit of work with parse model ofBslResource
linked with document, cannot benull
- Returns:
- result of unit of work, can be
null
-
createDocumentLocker
protected org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker createDocumentLocker()
- Overrides:
createDocumentLocker
in classorg.eclipse.xtext.ui.editor.model.XtextDocument
-
-