C# Class Nexus.UI.Controls.XmlCompletionProvider

Provides the code completion selections for an XML base on a specified schema.
Inheritance: ICompletionDataProvider
ファイルを表示 Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
GenerateCompletionData ( string p_strFileName, TextArea p_txaTextArea, char p_chrCharTyped ) : ICompletionData[]

Generate the list of possible code copmletion values.

InsertAction ( ICompletionData p_cdtData, TextArea p_txaTextArea, int p_intInsertionOffset, char p_chrKey ) : bool

Inserts the selected completion value.

If we are closing a tag, we request a reformatting of the line.

ProcessKey ( char p_chrKey ) : CompletionDataProviderKeyResult

Determines if the given character should trigger selection of the current code completion item in the code completion window.

XmlCompletionProvider ( XmlEditor p_xedEditor ) : System

The default constructor.

Private Methods

Method Description
ContainsSiblings ( XmlSchemaParticle p_xspParticle, string>.List &p_lstChoices, List p_lstSiblings ) : bool

Determines if the given XML particle contains the given sibling elements, and populates the list of elements that are eligible to be the next element in the XML document.

A particle contains the siblings if the siblings are children of the given particle.

GetAutoCompleteList ( XmlSchemaElement p_xseElement, List p_lstSiblings, AutoCompleteType p_rtvReturnType ) : string>>.List

Gets the list of possible next values.

GetChildrenElements ( XmlSchemaParticle p_xspParticle ) : string>>.List

Gets the child elements of the given XML particle that are eligible to be the next element in the XML document.

GetDocumentation ( XmlSchemaAnnotated p_xsaAnnotatedElement ) : string

Gets the documentation associated with the given XML element.

ParseSchema ( Stack p_stkCode, List p_lstSiblings, AutoCompleteType p_rtvReturnType ) : string>>.List

Parse the current XML Schema to generate a list of autocomplete values.

findElement ( XmlSchemaParticle p_xspParticle, Stack p_stkCode ) : XmlSchemaElement

Finds the element specified in the given stack, starting from the given XML particle.

Method Details

GenerateCompletionData() public method

Generate the list of possible code copmletion values.
public GenerateCompletionData ( string p_strFileName, TextArea p_txaTextArea, char p_chrCharTyped ) : ICompletionData[]
p_strFileName string The name of the file being edited.
p_txaTextArea ICSharpCode.TextEditor.TextArea The area containing the document being edited.
p_chrCharTyped char The character that was typed that triggered the request for /// the code completion list.
return ICompletionData[]

InsertAction() public method

Inserts the selected completion value.
If we are closing a tag, we request a reformatting of the line.
public InsertAction ( ICompletionData p_cdtData, TextArea p_txaTextArea, int p_intInsertionOffset, char p_chrKey ) : bool
p_cdtData ICompletionData The code completion selection that was chosen.
p_txaTextArea ICSharpCode.TextEditor.TextArea The area containing the document being edited.
p_intInsertionOffset int Where the selection should be inserted into the document.
p_chrKey char The character that was used to choose this completion selection.
return bool

ProcessKey() public method

Determines if the given character should trigger selection of the current code completion item in the code completion window.
public ProcessKey ( char p_chrKey ) : CompletionDataProviderKeyResult
p_chrKey char The key for which it is to be determined if it should trigger selection of the current code completion /// item in the code completion window.
return CompletionDataProviderKeyResult

XmlCompletionProvider() public method

The default constructor.
public XmlCompletionProvider ( XmlEditor p_xedEditor ) : System
p_xedEditor XmlEditor
return System