SyntaxLanguageExtensions Class
Contains extension methods that make it easier to work with ISyntaxLanguage objects.
public static class SyntaxLanguageExtensions
- Inheritance:
- object object
Methods
GetAutoCorrector(ISyntaxLanguage)
Returns the IAutoCorrector that can perform auto-correction.
public static IAutoCorrector? GetAutoCorrector(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetCodeBlockFinder(ISyntaxLanguage)
Returns the ICodeBlockFinder that can find the containing code block for a text range.
public static ICodeBlockFinder? GetCodeBlockFinder(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetDelimiterAutoCompleter(ISyntaxLanguage)
Returns the IDelimiterAutoCompleter that can auto-complete delimiters, such as brace pairs.
public static IDelimiterAutoCompleter? GetDelimiterAutoCompleter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetExampleTextProvider(ISyntaxLanguage)
Returns the IExampleTextProvider that can generate example text for the language.
public static IExampleTextProvider? GetExampleTextProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetIndentProvider(ISyntaxLanguage)
Returns the IIndentProvider that can indent text for the language when the Enter key pressed.
public static IIndentProvider? GetIndentProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetLexer(ISyntaxLanguage)
Returns the ILexer that can be used for lexing of the language.
public static ILexer? GetLexer(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetLineCommenter(ISyntaxLanguage)
Returns the ILineCommenter that can comment and uncomment lines for the language.
public static ILineCommenter? GetLineCommenter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetNavigableSymbolProvider(ISyntaxLanguage)
Returns the INavigableSymbolProvider that can be used to return navigable symbols for a language.
public static INavigableSymbolProvider? GetNavigableSymbolProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetOutliner(ISyntaxLanguage)
Returns the IOutliner that can be used to generate an IOutliningSource for a language, which is used to drive automatic code outlining (folding) features.
public static IOutliner? GetOutliner(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetParser(ISyntaxLanguage)
Returns the IParser that can be used for parsing of the language.
public static IParser? GetParser(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetStructureMatcher(ISyntaxLanguage)
Returns the IStructureMatcher that can locate matching structural text ranges for an offset, such as finding matching brackets.
public static IStructureMatcher? GetStructureMatcher(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetTextFormatter(ISyntaxLanguage)
Returns the ITextFormatter that can improve the readability of code for the language.
public static ITextFormatter? GetTextFormatter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetTextStatisticsFactory(ISyntaxLanguage)
Returns the ITextStatisticsFactory that can generate customized text statistics for the language.
public static ITextStatisticsFactory? GetTextStatisticsFactory(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetTextViewLineNumberProvider(ISyntaxLanguage)
Returns the ITextViewLineNumberProvider that determines the number text to display in a text view's line number margin.
public static ITextViewLineNumberProvider? GetTextViewLineNumberProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
GetWordBreakFinder(ISyntaxLanguage)
Returns the IWordBreakFinder that is capable of locating word breaks for the language.
public static IWordBreakFinder? GetWordBreakFinder(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
Returns
- IWordBreakFinder:
The IWordBreakFinder instance.
RegisterAutoCorrector(ISyntaxLanguage, IAutoCorrector)
Registers the IAutoCorrector that can perform auto-correction.
public static void RegisterAutoCorrector(this ISyntaxLanguage language, IAutoCorrector value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IAutoCorrector | The IAutoCorrector instance. |
RegisterCodeBlockFinder(ISyntaxLanguage, ICodeBlockFinder)
Registers the ICodeBlockFinder that can find the containing code block for a text range.
public static void RegisterCodeBlockFinder(this ISyntaxLanguage language, ICodeBlockFinder value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ICodeBlockFinder | The ICodeBlockFinder instance. |
RegisterDelimiterAutoCompleter(ISyntaxLanguage, IDelimiterAutoCompleter)
Registers the IDelimiterAutoCompleter that can auto-complete delimiters, such as brace pairs.
public static void RegisterDelimiterAutoCompleter(this ISyntaxLanguage language, IDelimiterAutoCompleter value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IDelimiterAutoCompleter | The IDelimiterAutoCompleter instance. |
RegisterExampleTextProvider(ISyntaxLanguage, IExampleTextProvider)
Registers the IExampleTextProvider that can generate example text for the language.
public static void RegisterExampleTextProvider(this ISyntaxLanguage language, IExampleTextProvider value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IExampleTextProvider | The IExampleTextProvider instance. |
RegisterIndentProvider(ISyntaxLanguage, IIndentProvider)
Registers the IIndentProvider that can indent text for the language when the Enter key pressed.
public static void RegisterIndentProvider(this ISyntaxLanguage language, IIndentProvider value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IIndentProvider | The IIndentProvider instance. |
RegisterLexer(ISyntaxLanguage, ILexer)
Registers the ILexer that can be used for lexing of the language.
public static void RegisterLexer(this ISyntaxLanguage language, ILexer value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ILexer | The ILexer instance. |
RegisterLineCommenter(ISyntaxLanguage, ILineCommenter)
Registers the ILineCommenter that can comment and uncomment lines for the language.
public static void RegisterLineCommenter(this ISyntaxLanguage language, ILineCommenter value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ILineCommenter | The ILineCommenter instance. |
RegisterNavigableSymbolProvider(ISyntaxLanguage, INavigableSymbolProvider)
Registers the INavigableSymbolProvider that can be used to return navigable symbols for a language.
public static void RegisterNavigableSymbolProvider(this ISyntaxLanguage language, INavigableSymbolProvider value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | INavigableSymbolProvider | The INavigableSymbolProvider instance. |
RegisterOutliner(ISyntaxLanguage, IOutliner)
Registers the IOutliner that can be used to generate an IOutliningSource for a language, which is used to drive automatic code outlining (folding) features.
public static void RegisterOutliner(this ISyntaxLanguage language, IOutliner value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IOutliner | The IOutliner instance. |
RegisterParser(ISyntaxLanguage, IParser)
Registers the IParser that can be used for parsing of the language.
public static void RegisterParser(this ISyntaxLanguage language, IParser value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IParser | The IParser instance. |
RegisterStructureMatcher(ISyntaxLanguage, IStructureMatcher)
Registers the IStructureMatcher that can locate matching structural text ranges for an offset, such as finding matching brackets.
public static void RegisterStructureMatcher(this ISyntaxLanguage language, IStructureMatcher value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IStructureMatcher | The IStructureMatcher instance. |
RegisterTextFormatter(ISyntaxLanguage, ITextFormatter)
Registers the ITextFormatter that can improve the readability of code for the language.
public static void RegisterTextFormatter(this ISyntaxLanguage language, ITextFormatter value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ITextFormatter | The ITextFormatter instance. |
RegisterTextStatisticsFactory(ISyntaxLanguage, ITextStatisticsFactory)
Registers the ITextStatisticsFactory that can generate customized text statistics for the language.
public static void RegisterTextStatisticsFactory(this ISyntaxLanguage language, ITextStatisticsFactory value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ITextStatisticsFactory | The ITextStatisticsFactory instance. |
RegisterTextViewLineNumberProvider(ISyntaxLanguage, ITextViewLineNumberProvider)
Registers the ITextViewLineNumberProvider that determines the number text to display in a text view's line number margin.
public static void RegisterTextViewLineNumberProvider(this ISyntaxLanguage language, ITextViewLineNumberProvider value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | ITextViewLineNumberProvider | The ITextViewLineNumberProvider instance. |
RegisterWordBreakFinder(ISyntaxLanguage, IWordBreakFinder)
Registers the IWordBreakFinder that is capable of locating word breaks for the language.
public static void RegisterWordBreakFinder(this ISyntaxLanguage language, IWordBreakFinder value)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
| value | IWordBreakFinder | The IWordBreakFinder instance. |
UnregisterAutoCorrector(ISyntaxLanguage)
Unregisters the IAutoCorrector that can perform auto-correction.
public static void UnregisterAutoCorrector(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterCodeBlockFinder(ISyntaxLanguage)
Unregisters the ICodeBlockFinder that can find the containing code block for a text range.
public static void UnregisterCodeBlockFinder(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterDelimiterAutoCompleter(ISyntaxLanguage)
Unregisters the IDelimiterAutoCompleter that can auto-complete delimiters, such as brace pairs.
public static void UnregisterDelimiterAutoCompleter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterExampleTextProvider(ISyntaxLanguage)
Unregisters the IExampleTextProvider that can generate example text for the language.
public static void UnregisterExampleTextProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterIndentProvider(ISyntaxLanguage)
Unregisters the IIndentProvider that can indent text for the language when the Enter key pressed.
public static void UnregisterIndentProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterLexer(ISyntaxLanguage)
Unregisters the ILexer that can be used for lexing of the language.
public static void UnregisterLexer(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterLineCommenter(ISyntaxLanguage)
Unregisters the ILineCommenter that can comment and uncomment lines for the language.
public static void UnregisterLineCommenter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterNavigableSymbolProvider(ISyntaxLanguage)
Unregisters the INavigableSymbolProvider that can be used to return navigable symbols for a language.
public static void UnregisterNavigableSymbolProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterOutliner(ISyntaxLanguage)
Unregisters the IOutliner that can be used to generate an IOutliningSource for a language, which is used to drive automatic code outlining (folding) features.
public static void UnregisterOutliner(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterParser(ISyntaxLanguage)
Unregisters the IParser that can be used for parsing of the language.
public static void UnregisterParser(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterStructureMatcher(ISyntaxLanguage)
Unregisters the IStructureMatcher that can locate matching structural text ranges for an offset, such as finding matching brackets.
public static void UnregisterStructureMatcher(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterTextFormatter(ISyntaxLanguage)
Unregisters the ITextFormatter that can improve the readability of code for the language.
public static void UnregisterTextFormatter(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterTextStatisticsFactory(ISyntaxLanguage)
Unregisters the ITextStatisticsFactory that can generate customized text statistics for the language.
public static void UnregisterTextStatisticsFactory(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterTextViewLineNumberProvider(ISyntaxLanguage)
Unregisters the ITextViewLineNumberProvider that determines the number text to display in a text view's line number margin.
public static void UnregisterTextViewLineNumberProvider(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |
UnregisterWordBreakFinder(ISyntaxLanguage)
Unregisters the IWordBreakFinder that is capable of locating word breaks for the language.
public static void UnregisterWordBreakFinder(this ISyntaxLanguage language)
| Parameter | Type | Description |
|---|---|---|
| language | ISyntaxLanguage | The ISyntaxLanguage to update. |