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.
See Also
LanguageData
Gets or sets an object that specifies document-specific data for the Language that is loaded.
object LanguageData { get; set; }
Property Value
See Also
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.
See Also
Properties
Gets the dictionary containing custom properties for this object.
PropertyDictionary Properties { get; }
Property Value
- PropertyDictionary:
The dictionary containing custom properties for this object.
See Also
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 | EventHandler<SyntaxLanguageChangedEventArgs> | The delegate handler. |
priority | EventHandlerPriority | A EventHandlerPriority specifying the priority level. |
See Also
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.
See Also
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
- IList<TService>:
The list of available services of the specified type.
See Also
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.
See Also
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 | EventHandler<SyntaxLanguageChangedEventArgs> | The delegate handler. |
priority | EventHandlerPriority | A EventHandlerPriority specifying the priority level. |
See Also
Events
LanguageChanged
Occurs after the value of the Language property has changed.
event EventHandler<SyntaxLanguageChangedEventArgs> LanguageChanged
Event Type
See Also
ParseDataChanged
Occurs after the value of the ParseData property has changed.
event EventHandler<ParseDataPropertyChangedEventArgs> ParseDataChanged
Event Type
See Also
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, int, int)
- ITextDocument.DeleteText(ITextChangeType, int, int, ITextChangeOptions)
- ITextDocument.InsertText(ITextChangeType, int, string)
- ITextDocument.InsertText(ITextChangeType, int, 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, params TextRange[])
- ITextDocument.ReplaceNext(ISearchOptions, int, bool)
- ITextDocument.ReplaceNext(ISearchOptions, int, bool, TextRange)
- ITextDocument.ReplaceText(ITextChangeType, TextRange, string)
- ITextDocument.ReplaceText(ITextChangeType, TextRange, string, ITextChangeOptions)
- ITextDocument.ReplaceText(ITextChangeType, int, int, string)
- ITextDocument.ReplaceText(ITextChangeType, int, int, 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