Class 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 of HandlyXtextDocument 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>
    • Field Summary

      • Fields inherited from interface org.eclipse.jface.text.IDocument

        DEFAULT_CATEGORY, DEFAULT_CONTENT_TYPE
      • Fields inherited from interface org.eclipse.jface.text.IDocumentExtension3

        DEFAULT_PARTITIONING
      • Fields inherited from interface org.eclipse.jface.text.IDocumentExtension4

        UNKNOWN_MODIFICATION_STAMP
    • 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)
      Adds DocumentSpellingListener for this document
      void checkAndUpdateAnnotations()  
      protected org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker createDocumentLocker()  
      void disposeInput()  
      org.eclipse.emf.common.util.URI getURI()
      Gets URI 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 from BslResource 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 from BslResource 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 from BslResource 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.Document

        isLineInformationRepairNeeded
      • 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 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.handly.xtext.ui.editor.IHandlyXtextDocument

        readOnly
      • 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
      • Methods inherited from interface org.eclipse.xtext.util.concurrent.IWriteAccess

        tryModify, tryModify, tryModify
      • Methods inherited from interface org.eclipse.xtext.ui.editor.model.IXtextDocument

        addModelListener, addXtextDocumentContentObserver, getAdapter, getResourceURI, removeModelListener, removeXtextDocumentContentObserver
    • 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 - actual DocumentTokenSource, can't be null
        composer - actual DocumentTokenSource, can't be null
    • Method Detail

      • setInput

        public void setInput​(org.eclipse.xtext.resource.XtextResource resource)
        Overrides:
        setInput in class org.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
      • disposeInput

        public void disposeInput()
        Overrides:
        disposeInput in class org.eclipse.handly.xtext.ui.editor.HandlyXtextDocument
      • setOutdated

        public void setOutdated​(boolean outdated)
        Overrides:
        setOutdated in class org.eclipse.xtext.ui.editor.model.XtextDocument
      • checkAndUpdateAnnotations

        public void checkAndUpdateAnnotations()
        Overrides:
        checkAndUpdateAnnotations in class org.eclipse.xtext.ui.editor.model.XtextDocument
      • getURI

        public org.eclipse.emf.common.util.URI getURI()
        Gets URI of the resource link with this document
        Returns:
        URI of the actual document resource, or null 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 from BslResource linked with this document. Operation is similar to XtextDocument.readOnly(IUnitOfWork) but there is no transaction locking, only possible waiting of BslResource.update(int, int, String)
        Type Parameters:
        T - type of returning value
        Parameters:
        work - unit of work with parse model of BslResource linked with document, cannot be null
        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 from BslResource linked with this document. Operation is similar to XtextDocument.readOnly(IUnitOfWork) but there is no transaction locking and there is no waiting of BslResource.update(int, int, String).

        Important that XtextResource got in IUnitOfWork can be outdated

        Type Parameters:
        T - type of returning value
        Parameters:
        work - unit of work with parse model of BslResource linked with document, cannot be null
        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 from BslResource linked with this document. Method should be called from content assist, this method similar to call method XtextDocument.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 of BslResource linked with document, cannot be null
        Returns:
        result of unit of work, can be null
      • createDocumentLocker

        protected org.eclipse.xtext.ui.editor.model.XtextDocument.XtextDocumentLocker createDocumentLocker()
        Overrides:
        createDocumentLocker in class org.eclipse.xtext.ui.editor.model.XtextDocument