ICodeDocument Interface
Provides the base requirements for a text document with some advanced features that relate to syntax highlighting and code parsing.
public interface ICodeDocument : IParseTarget, ITextDocument
Properties
Language
Gets or sets the ISyntaxLanguage that is currently loaded.
ISyntaxLanguage Language { get; set; }
Property Value
- ISyntaxLanguage:
The ISyntaxLanguage that is currently loaded.
Remarks
The default value is a plain text language.
LanguageData
Gets or sets an object that specifies document-specific data for the Language that is loaded.
object LanguageData { get; set; }
Property Value
- System.Object:
An object that specifies document-specific data for the Language that is loaded.
ParseData
Gets or sets the syntax/semantic parse data that has been assigned to this document as a result of a parsing operation.
IParseData ParseData { get; set; }
Property Value
- IParseData:
The syntax/semantic parse data that has been assigned to this document as a result of a parsing operation.
Properties
Gets the dictionary containing custom properties for this object.
PropertyDictionary Properties { get; }
Property Value
- PropertyDictionary:
The dictionary containing custom properties for this object.
Methods
AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
Adds an event handler for the LanguageChanged event using the specified priority level.
void AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs> handler, EventHandlerPriority priority)
Parameter | Type | Description |
---|---|---|
handler | System.EventHandler<SyntaxLanguageChangedEventArgs> | The delegate handler. |
priority | EventHandlerPriority | A EventHandlerPriority specifying the priority level. |
CreateTagAggregator<T>()
Creates a new ITagAggregator<T> that collects the tag results from all ITagger<T> instances associated with this document.
ITagAggregator<T> CreateTagAggregator<T>()
where T : ITag
- Type Parameters:
-
T
-The type of ITag associated with this aggregator.
Returns
- ITagAggregator<T>:
The ITagAggregator<T> that was created.
GetServices<TService>()
Returns a list of available services of the specified type.
IList<TService> GetServices<TService>()
where TService : class
- Type Parameters:
-
TService
-The type of service.
Returns
- System.Collections.Generic.IList<TService>:
The list of available services of the specified type.
QueueParseRequest()
Queues up a parse request for the document with the ambient dispatcher.
void QueueParseRequest()
Remarks
If AmbientParseRequestDispatcherProvider does not provide a dispatcher, the parsing operation is completed immediately in the calling thread.
RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
Removes an event handler for the LanguageChanged event using the specified priority level.
void RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs> handler, EventHandlerPriority priority)
Parameter | Type | Description |
---|---|---|
handler | System.EventHandler<SyntaxLanguageChangedEventArgs> | The delegate handler. |
priority | EventHandlerPriority | A EventHandlerPriority specifying the priority level. |
Events
LanguageChanged
Occurs after the value of the Language property has changed.
event EventHandler<SyntaxLanguageChangedEventArgs> LanguageChanged
Event Type
- System.EventHandler<SyntaxLanguageChangedEventArgs>
ParseDataChanged
Occurs after the value of the ParseData property has changed.
event EventHandler<ParseDataPropertyChangedEventArgs> ParseDataChanged
Event Type
- System.EventHandler<ParseDataPropertyChangedEventArgs>
Inherited Members
- IParseTarget.NotifyParseComplete(IParseRequest, IParseData)
- IParseTarget.UniqueId
- ITextDocument.AddTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- ITextDocument.AddTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- ITextDocument.AppendText(ITextChangeType, String)
- ITextDocument.AppendText(ITextChangeType, String, ITextChangeOptions)
- ITextDocument.CreateTextChange(ITextChangeType)
- ITextDocument.CreateTextChange(ITextChangeType, ITextChangeOptions)
- ITextDocument.DeleteText(ITextChangeType, TextRange)
- ITextDocument.DeleteText(ITextChangeType, TextRange, ITextChangeOptions)
- ITextDocument.DeleteText(ITextChangeType, Int32, Int32)
- ITextDocument.DeleteText(ITextChangeType, Int32, Int32, ITextChangeOptions)
- ITextDocument.InsertText(ITextChangeType, Int32, String)
- ITextDocument.InsertText(ITextChangeType, Int32, String, ITextChangeOptions)
- ITextDocument.LoadFile(String)
- ITextDocument.LoadFile(String, Encoding)
- ITextDocument.LoadFile(Stream, Encoding)
- ITextDocument.IsTextRangeReadOnly(TextRange)
- ITextDocument.RemoveTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- ITextDocument.RemoveTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- ITextDocument.ReplaceAll(ISearchOptions)
- ITextDocument.ReplaceAll(ISearchOptions, TextRange[])
- ITextDocument.ReplaceNext(ISearchOptions, Int32, Boolean)
- ITextDocument.ReplaceNext(ISearchOptions, Int32, Boolean, TextRange)
- ITextDocument.ReplaceText(ITextChangeType, TextRange, String)
- ITextDocument.ReplaceText(ITextChangeType, TextRange, String, ITextChangeOptions)
- ITextDocument.ReplaceText(ITextChangeType, Int32, Int32, String)
- ITextDocument.ReplaceText(ITextChangeType, Int32, Int32, String, ITextChangeOptions)
- ITextDocument.SaveFile(String, LineTerminator)
- ITextDocument.SaveFile(String, Encoding, LineTerminator)
- ITextDocument.SaveFile(Stream, Encoding, LineTerminator)
- ITextDocument.SetHeaderAndFooterText(String, String)
- ITextDocument.SetText(String)
- ITextDocument.SetText(ITextChangeType, String)
- ITextDocument.SetText(ITextChangeType, String, ITextChangeOptions)
- ITextDocument.AutoCharacterCasing
- ITextDocument.AutoConvertTabsToSpaces
- ITextDocument.CurrentSnapshot
- ITextDocument.FileName
- ITextDocument.IsModified
- ITextDocument.IsReadOnly
- ITextDocument.TabSize
- ITextDocument.UndoHistory
- ITextDocument.FileNameChanged
- ITextDocument.IsModifiedChanged
- ITextDocument.IsReadOnlyChanged
- ITextDocument.TabSizeChanged
- ITextDocument.TextChanged
- ITextDocument.TextChanging