Source Members

Include Protected Members
Include Inherited Members

Represents a source file in the language service and controls parsing operations on that source.

The Source type exposes the following members.

Constructors

 

Name

Description

Public method

Source

Initializes a new instance of the Source class.

Top

Methods

 

Name

Description

Public method

BeginParse

Overloaded. Begins a parsing operation.

Public method

Close

Determines whether the source file can be closed.

Public method

ColumnToVisiblePosition

Gets the screen column position corresponding to the specified character offset, taking into account tab size.

Public method

CommentBlock

Comments out a span of source using block comments.

Public method

CommentLines

Comments out a span of source using line comments.

Public method

CommentSpan

Comments out the specified span of source.

Public method

Completion

Starts an IntelliSense member completion operation.

Public method

CreateAuthoringSink

Creates an instance of an AuthoringSink object for use in parsing operations.

Public method

CreateCompletionSet

Creates a new instance of a CompletionSet class.

Public method

CreateErrorTaskItem

Overloaded. Creates an instance of a DocumentTask object representing a parsing error.

Public method

CreateMethodData

Creates a new instance of a MethodData object that handles the IntelliSense method tip mode.

Public method

DismissCompletor

Removes the IntelliSense method tip or completion list from view, whichever was active.

Public method

Dispose

Called in preparation of destroying this Source object.

Public method

Equals

Determines whether the specified Object is equal to the current Object. (Inherited from Object.)

Public method

ExecMarkerCommand

Executes the specified command on the specified region.

Protected method

Finalize

The class destructor, called just before the object is destroyed. (Overrides Object.Finalize().)

Public method

GetColorizer

Gets the colorizer associated with this Source object.

Public method

GetCommentFormat

Gets information on what defines a comment in the language.

Public method

GetDocumentSpan

Gets the span occupied by the entire source file.

Public method

GetExpansionProvider

Gets an expansion provider in support of code snippets.

Public method

GetFilePath

Gets the file name of the source file.

Public method

GetHashCode

Serves as a hash function for a particular type. (Inherited from Object.)

Public method

GetHiddenTextSession

Gets the hidden region manager if available.

Public method

GetLine

Gets the text on the specified line.

Public method

GetLineCount

Gets the number of lines in the source file.

Public method

GetLineIndexOfPosition

Gets the line and column for the specified position.

Public method

GetLineLength

Gets the length of the specified line.

Public method

GetMarkerCommandInfo

Determines which marker commands can be shown on a context menu for the specified hidden region.

Public method

GetNewLine

Gets the newline character used at the end of the specified line.

Public method

GetPairExtents

Overloaded. Gets the text span between a matching pair (or triplet) of language elements.

Public method

GetPositionOfLineIndex

Gets the position corresponding to the given line and character offset location.

Public method

GetTaskProvider

Gets the task provider that manages the error tasks.

Public method

GetText

Overloaded. Gets text from the source file.

Public method

GetTextLines

Gets the IVsTextLines object associated with this Source object.

Public method

GetTextUpToLine

Gets the text from the source up to and including the given line number.

Public method

GetTipText

Gets the text in the given hidden region to be used in a tool tip.

Public method

GetTokenInfo

Gets information about the token at the specified position.

Public method

GetTokenInfoAt

Gets the index of the TokenInfo object that includes the supplied column number.

Public method

GetType

Gets the type of the current instance. (Inherited from Object.)

Public method

GetUserData

Gets the user data associated with the specified GUID.

Public method

GetWordExtent

Gets the span occupied by the word at the specified location.

Public method

MakeBaseSpanVisible

Ensures that the given span in the given hidden region is visible.

Public method

MatchBraces

Highlights the spans of a pair of language elements, given the position of one of the elements.

Protected method

MemberwiseClone

Creates a shallow copy of the current Object. (Inherited from Object.)

Public method

MethodTip

Displays an IntelliSense method tip showing a method's signature as it is entered.

Public method

NormalizeNewlines

Converts the newlines in the specified text to the specified newline.

Public method

OnBeforeSessionEnd

Called just before a hidden region session is closed.

Public method

OnChangeLineAttributes

Called when one or more lines' attributes (font, color) have changed.

Public method

OnChangeLineText

Called when a line's text has changed.

Public method

OnChangesCommitted

Called when a code snippet is committed to the source file.

Public method

OnCommand

Handles IntelliSense-oriented commands.

Public method

OnHiddenRegionChange

Called when a hidden region has changed.

Public method

OnIdle

Called when no other events are being handled.

Public method

OnUserDataChange

Called when user data has been changed in a text buffer.

Public method

Open

Marks the Source object as being open.

Public method

ProcessHiddenRegions

Updates all hidden regions based on the given list of hidden regions.

Public method

Recolorize

Updates the syntax highlighting on the specified range of lines.

Public method

ReformatSpan

Format the specified span of source.

Public method

RemoveHiddenRegions

Removes all hidden regions from the current view.

Public method

RemoveTask

Removes the specified error task from the error Task window.

Public method

ScanToNonWhitespaceChar

Returns the offset of the first non-whitespace character on the given line.

Public method

SetText

Overloaded. Puts the specified text into the source file.

Public method

SetUserData

Sets the given user data property to the given value.

Public method

ToString

Returns a string that represents the current object. (Inherited from Object.)

Public method

TrimSpan

Adjusts the given span to skip leading and trailing whitespace.

Public method

UncommentBlock

Removes comment characters from around the specified span.

Public method

UncommentLines

Removes line comment characters from the beginning of each line in the given span.

Public method

UncommentSpan

Removes any comment characters from the beginning and end of the given span.

Public method

VisiblePositionToColumn

Gets the character offset on the given line corresponding to the specified screen column position.

Top

Properties

 

Name

Description

Public property

ChangeCount

Gets the number of changes made to the source file since it was opened.

Public property

ColorState

Gets or sets the IVsTextColorState object that is used in various parsing tasks.

Public property

CompletedFirstParse

Gets whether the parser has completed at least once.

Public property

CompletionSet

Gets the CompletionSet collection used for this instance of the Source class.

Public property

DirtySpan

Gets a range that identifies the changed lines in the source.

Public property

IsClosed

Gets the current state of the source file.

Public property

IsCompletorActive

Gets whether the IntelliSense member completion or method tip modes are active.

Public property

IsDirty

Gets or sets whether any of the lines of source have changed.

Public property

LanguageService

Gets the language service associated with the source file.

Public property

LastParseTime

Gets the duration of the last parse operation.

Public property

OutliningEnabled

Gets or sets whether outlining is currently enabled.

Top

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace