Declarations::IsCommitChar Method (String^, Int32, Char)
Determines whether the specified character can be used to complete the specified text.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public: virtual bool IsCommitChar( String^ textSoFar, int selected, wchar_t commitCharacter )
Parameters
- textSoFar
-
Type:
System::String^
[in] A string containing the text typed by the user.
- selected
-
Type:
System::Int32
[in] The number of characters that are currently selected or -1 if nothing is selected.
- commitCharacter
-
Type:
System::Char
[in] The character to determine is a completion character.
Return Value
Type: System::BooleanIf the character is a commit character, returns true; otherwise, returns false.
Typing a commit character causes the currently selected item in the completion list to be committed to the source file (through a call to the OnCommit method). This method determines if the character typed can be used to commit the text to the source file.
Text might be selected (for example, because of a previous auto-completion step) and that could change what is considered a commit character.
The base method returns true if the commit character is not a letter, numerical digit, or an underscore.