CompletionSet.OnAutoComplete Method
Called after completion text has been committed to the source file.
Namespace: Microsoft.VisualStudio.Package
Assemblies: 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)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaration
Public Overridable Function OnAutoComplete As Char
public virtual char OnAutoComplete()
public:
virtual wchar_t OnAutoComplete()
abstract OnAutoComplete : unit -> char
override OnAutoComplete : unit -> char
public function OnAutoComplete() : char
Return Value
Type: System.Char
A character to be inserted after the committed text, or 0 if no character is to be inserted.
Remarks
After the text has been committed to the source file, this method is called to determine if any further completion operations are needed. An additional operation is indicated if a non-0 character is returned from this method that triggers another IntelliSense operation. For example, if a method name has just been inserted, this method can return a "(" that is appended to the method name and triggers an IntelliSense method tip operation.
This method is typically called from the HandlePreExec method in the ViewFilter class in response to the AUTOCOMPLETE command (which was posted by the OnCommit method to be executed after the text was inserted in the source file) or from the ExecCommand method in the ViewFilter class to determine if any additional completion operations are needed.
The base method forwards the call to the OnAutoComplete method on the Declarations object if that object exists. Otherwise, the base method always 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.