JetBrains.Platform.dotCover.DocumentModel Type disambig for . Represents zero-based column indices in the document stream. This does not correspond directly to the text control view lines and columns because of the collapsed regions and other view transformations. Type disambig for . Represents zero-based line indices in the document stream. This does not correspond directly to the text control view lines and columns because of the collapsed regions and other view transformations. Ranges two . Initializes a new instance of the class. Creates a zero-length range at the given position. Indicates whether this instance and a specified object are equal. true if and this instance are the same type and represent the same value; otherwise, false. Another object to compare to. 2 Returns the hash code for this instance. A 32-bit signed integer that is the hash code for this instance. 2 Indicates whether the current object is equal to another object of the same type. true if the current object is equal to the parameter; otherwise, false. An object to compare with this object. Denotes a change to the document text. Possible changes are: characters inserted, characters deleted, characters replaced. All these are represented as replacements, eg deletion is replacing a range with an empty string, and insertion is replacing an empty range with some text. This constructor is used for delta-changes Gets the document affected by the change. Offset at which the replacement operation is performed. The range being removed by the replacement is [, + ). The range of the new text after the replacement is performed is [, + ). The replacement text. It is characters long and occupies the [, + ) range after the replacement is performed. Length of the affected text before the replacement is performed. The range being removed by the replacement is [, + ). The range of the new text after the replacement is performed is [, + ). The range of the replacement text. The range being removed by the replacement is [, + ). The range of the new text after the replacement is performed is [, + ). Length of the affected text after the replacement is performed. Essentialy equal to the 's The range being removed by the replacement is [, + ). The range of the new text after the replacement is performed is [, + ). The affected text range, before the replacement is performed. The range being removed by the replacement is [, + ). The range of the new text after the replacement is performed is [, + ). Try parse string representation of coordinates. Try parse string representation of coordinates. Parse string representation of coordinates. Indicates whether the current object is equal to another object of the same type. true if the current object is equal to the parameter; otherwise, false. An object to compare with this object. Indicates whether this instance and a specified object are equal. true if and this instance are the same type and represent the same value; otherwise, false. Another object to compare to. 2 Returns the hash code for this instance. A 32-bit signed integer that is the hash code for this instance. 2 Zero-based line of the document. VS displays one-based line numbers, so add 1 to get consistent result. Zero-based column of the document. VS displays one-based column numbers, so add 1 to get consistent result. Creates an from the given text. The document implementation is specific to the Shell. In tests, this is the same as . In Visual Studio, this is a VS Text Buffer. Document text. Document moniker that uniquely identifies this document. Queries whether the document is allowed to be written. Creates an from the text if the given file. The file encoding is retained so that it could be re-applied when the file is saved. This is always the simple implementation of the standalone string-based document. The file path is used as the document moniker. Creates an from the given text. This is always the simple implementation of the standalone string-based document. Document text. Document moniker that uniquely identifies this document. Creates an from the given text. This is always the simple implementation of the standalone string-based document. Document text. Document moniker that uniquely identifies this document. Queries whether the document is allowed to be written. Text range in document Returns the fully qualified type name of this instance. A containing a fully qualified type name. 2 Gets document coordinates (line and column) by flat document offset. The column number is forced within line length limits (inclusive) in case the offset falls on the line-break characters. In this case the offset/line-col might not roundtrip. Offset in document, must be non-negative and less than or equal to document text length. DocumentCoords. Gets offset in document by document coordinates (line and column) Coordinates in document offset in document, or -1 if coordinates are not within the document Gets the start offset of the given line. Line number. Gets the end offset of the given line. The possible line-break characters at the end of the line are not included by this method. Line number. Gets the number of lines in the document. This is the maximum possible line number (non-inclusive) for methods that take a line number. A document has at least one line. An empty document has exactly one zero-length line. Gets the number of characters in the document. This is the maximum possible offset (inclusive) for methods that take an offset, including text ranges. Use wherever possible. Get clearance for write access to the docment, for example, at the Source Code Control. You MUST scope document modifications with the return value of this method (dispose of the return value when done). The cookie that must be disposed of immediately after you're done with writing to the document. You're only allowed to write while it's alive and if its is . Checks whether portions of the document are locked from being edited. Locks a document range temporarily to prevent it from being edited. To unlock, dispose of the return value. Gets the length of the document line. Gets the document moniker (an arbitrary string that helps with identifying this document). Gets the whole range of the document, from 0 to . 'real' document is changed. This event is raised at the end of transaction. Before 'real' document is changed. This event is raised at the end of transaction. Base class for document implementations Non-thread-safe init, changes are primary-thread-related only. Lazy: this field n/a when document is used from PSI for readonly background access. Lazy: this field n/a when document is used from PSI for readonly background access. Thread-safe init required: even though changes would only fire on the Write-Lock Thread, sometimes PSi would sink this event from secondary threads, eg on Generated Documents. Lazy: this field n/a when document is used from PSI for readonly background access. Thread-safe init required: even though changes would only fire on the Write-Lock Thread, sometimes PSi would sink this event from secondary threads, eg on Generated Documents. Lazy: this field n/a when document is used from PSI for readonly background access. Thread-safe init required: even though changes would only fire on the Write-Lock Thread, sometimes PSi would sink this event from secondary threads, eg on Generated Documents. Maps lines to their flat offsets. Lazy-inited when first requested. Free-threaded access, must be init-protected. For documents that are wrapping some underlying store (eg Visual Studio documents over Text Buffers), marks a state when we expect modification callbacks from the underlying store. This relaxes some limitations on document modifications, as those are actual changes to the underlying store we MUST apply to be in sync. The limitations include eg Modification Cookies that must be taken for all file-based documents on the Solution so that they could be cleared with SCC. These do not apply when the changes are coming from the underlying store. Apply change caused by operation on the document (e.g. ) Apply external change Returns a that represents the current . A that represents the current . 2 Locks a document range temporarily to prevent it from being edited. To unlock, dispose of the return value. Called by document implementations when they'd like to modify the document to assert that modification is allowed at the moment. For documents that are wrapping some underlying store (eg Visual Studio documents over Text Buffers), marks a state when we expect modification callbacks from the underlying store. This relaxes some limitations on document modifications, as those are actual changes to the underlying store we MUST apply to be in sync. The limitations include eg Modification Cookies that must be taken for all file-based documents on the Solution so that they could be cleared with SCC. These do not apply when the changes are coming from the underlying store. Gets the document moniker (an arbitrary string that helps with identifying this document). Gets the whole range of the document, from 0 to . Reads text from a file on disk. The file to read. Whether to throw on failures (eg missing file), otherwise, an empty string will be returned. Reads text from a file on disk. The file to read. Whether to throw on failures (eg missing file), otherwise, an empty string will be returned. Detected file encoding May throw IOException, SecurityException etc IEditableBuffer implementation Point where we expect text to be inserted Buffer to hold the subsequent characters being inserted The rest of the text except for the insert point Array-based implementation of line index. Mapping between one-dimensional (offsets) to two-dimensional (lines and columns) coordinate systems. This class is not thread-safe, the caller should take care of locking the read and write operations apart. This class has no implicit writes on reads. Maps line number to TextRange containing start and end offsets of the line. Gets line-col by the flat document offset. The column number is forced within line length limits (inclusive) in case the offset falls on the line-break characters. In this case the offset/line-col might not roundtrip. Gets the text of the line, not including any line break characters. Accomodates a document change incrementally Binary-searches the line segments. Static because it cannot rely on object state (eg myBuffer) because the state could be inconsistent due to a text change being accomodated (when buffer is already changed and segments array is not yet). Rebuilds a part of the index (or the whole index). The part to rebuild. Range ends must be at start offsets of some lines (or end-offset-with-line-break, which is the same). The number of lines in the index. There's always at least one line. Returns the fully qualified type name of this instance. A containing a fully qualified type name. 2 Index after the last non-line-break character of the line. This denotes the line length. Index after the last character of the line, including any line break characters it has. Gets the line extent, not including the line break characters. Gets the line extent, including the line break characters. Gets the number of non-line-break characters in the line. Gets the number of characters in the line, including the line break characters. Index of the first character in the line. This implementation of document performs operations using 'document transactions'. Initiates change that can be made in some external storage (like VS doc) This method handles internal changes (psi, document write operations, etc.) Handle modification, raise events This key is used to store range markers collection in document or project file... This key is used to store dicument timestamp for which range markers are updated Represents a common interface for range markers Gets the current text range corresponding to the range marker Gets the associated document Gets or set a value indicating whether the range marker is valid Setting works only for invalidating marker Indicates whether the range market is greedy to left Indicates whether the range market is greedy to right Provider for tool-tips appearing when the mouse cursor hovers over the area covered by a range marker Converts series of sequential document changes to optimized final document change map Try to find the right segment in the modified document Returns true if the point is inside modified segment, and contains the segment index Returns false if the point is outside modified segment, and contains the previous segment index Try to find the right segment in the modified document Returns true if the point is inside modified segment, and contains the segment index Returns false if the point is outside modified segment, and contains the next segment index If the replaced text is the same at the beginning/ending, then do not modify that portion of text