Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CompletionSet Class

CompletionSet Class

Represents an IntelliSense completion list that is displayed in the current text view.

This API is not CLS-compliant. The CLS-compliant alternative is [None].


Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

public class CompletionSet : IVsCompletionSet, 
	IVsCompletionSetEx, IDisposable

The CompletionSet type exposes the following members.

Public methodCompletionSetInitializes a new instance of the CompletionSet class.

Public propertyDeclarationsGets or sets the Declarations object this completion set uses.
Public propertyIsCommittedGets whether any text has been committed to the source file.
Public propertyIsDisplayedGets whether the completion list is currently displayed.
Public propertyOnCommitTextGets the text that is to be committed to the source file.

Public methodCloseCloses the completion list display.
Public methodCompareItemsCompares two strings for the specified number of characters.
Public methodDecreaseFilterLevelChanges the level of the internal filter list and updates it, showing common items.
Public methodDismissCalled when the completion list is no longer needed.
Public methodDisposeDeallocates any resources just before the CompletionSet object is destroyed.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetBestMatchDetermines which item in the list is the best match for the text typed so far by the user.
Public methodGetCompletionItemColorGets the foreground and background colors for a selected item.
Public methodGetCountGets the number of items that can be displayed in the completion list.
Public methodGetDescriptionTextGets a description for the specified item in the completion list.
Public methodGetDisplayTextGets the text and image index to display in the completion list for the specified item.
Public methodGetFilterLevelGets the current filter level.
Public methodGetFlagsGets a set of flags specifying the behavior of the completion list.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetImageListReturns the image list to use for the glyphs in the completion list.
Public methodGetInitialExtentGets the initial extent of the text to be completed.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIncreaseFilterLevelShow in the completion list the members of the specified type.
Public methodInitInitializes the completion set object.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnAutoCompleteCalled after completion text has been committed to the source file.
Public methodOnCommitGets the text to be inserted into the source file if the specified character is a commit character.
Public methodOnCommitCompleteCalled after the text has been committed.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Visual Studio manages the actual display of the completion list while this class manages what is displayed in the completion list and what happens when the user commits to an entry in that list.

Notes to Implementers

This class implements everything needed to interact with the Declarations class and to provide suitable default behavior for each method so that there is typically no need for you to implement a derived version of the CompletionSet class.

Notes to Callers

An instance of this class is returned from the CreateCompletionSet method in the Source class. The CreateCompletionSet method is typically called from the Source class constructor. The CompletionSet object is then used in handling a completion operation that may optionally require displaying a completion list. Visual Studio interacts with the CompletionSet class through the IVsCompletionSet interface to implement the IntelliSense completion list.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft