Partager via


Source.ColorState Property

Definition

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

public:
 property Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ ColorState { Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ get(); void set(Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ value); };
public:
 property Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ ColorState { Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ get(); void set(Microsoft::VisualStudio::TextManager::Interop::IVsTextColorState ^ value); };
public Microsoft.VisualStudio.TextManager.Interop.IVsTextColorState ColorState { get; set; }
member this.ColorState : Microsoft.VisualStudio.TextManager.Interop.IVsTextColorState with get, set
Public Property ColorState As IVsTextColorState

Property Value

The IVsTextColorState interface that is obtained from the IVsTextLines object passed to the constructor.

Remarks

The IVsTextColorState interface is used by the colorizer to remember the parse state at the end of every line. This allows parsing to continue from any line in the source.

Note

The colorizer parser is used not only for syntax highlighting but for retrieving information about tokens on a line. This is typically done through a call to the GetLineInfo method to tokenize the line; then the tokens are accessed one by one.

Applies to