Called after the declaration has been committed to the source file. When implemented in a derived class, it provides a completion character which may itself be a trigger for another round of IntelliSense.
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
'Declaration Public Overridable Function OnAutoComplete ( _ textView As IVsTextView, _ committedText As String, _ commitCharacter As Char, _ index As Integer _ ) As Char
public virtual char OnAutoComplete( IVsTextView textView, string committedText, char commitCharacter, int index )
public: virtual wchar_t OnAutoComplete( IVsTextView^ textView, String^ committedText, wchar_t commitCharacter, int index )
abstract OnAutoComplete : textView:IVsTextView * committedText:string * commitCharacter:char * index:int -> char override OnAutoComplete : textView:IVsTextView * committedText:string * commitCharacter:char * index:int -> char
public function OnAutoComplete( textView : IVsTextView, committedText : String, commitCharacter : char, index : int ) : char
[in] An IVsTextView object representing the view that displays the source file.
[in] A string containing the text that was inserted as part of the completion process.
[in] The character that was used to commit the text to the source file.
[in] The index of the item that was committed to the source file.
Returns a character to be inserted after the committed text. If nothing is to be inserted, returns 0.
After text has been committed to the source file, this method is called to complete the characters already committed. For example, in the XML editor, if the user selects a start tag ("<tag"), this method is used to insert the end tag automatically ("></tag>"). The framework makes sure this method is called after Visual Studio has actually inserted the result from OnCommit, in this case "<tag".
This method can also be used to start another commitment based on the character that is returned. For example, if a method name is committed to the source file and the OnAutoComplete method returns an open parenthesis ("("), the "(" could then trigger the IntelliSense method tip operation.
The base method does nothing and returns 0.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.