Declarations Class

 
clsCompliantAlternativeNone

Manages a list of declarations to be shown in an IntelliSense drop-down list.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

System.Object
  Microsoft.VisualStudio.Package.Declarations

[CLSCompliantAttribute(false)]
public abstract class Declarations : IDisposable

NameDescription
System_CAPS_protmethodDeclarations()

Initializes a new instance of the Declarations class.

NameDescription
System_CAPS_pubpropertyLastBestMatch

Gets or sets the name of the item that best matches what has been typed so far.

NameDescription
System_CAPS_pubmethodDispose()

Frees any resources allocated by the class just before the class object is destroyed.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetBestMatch(String, Int32, Boolean)

Determines the best completion match for the specified value.

System_CAPS_pubmethodGetCount()

When implemented in a derived class, gets the number of items in the list of declarations.

System_CAPS_pubmethodGetDescription(Int32)

When implemented in a derived class, gets a description of the specified item.

System_CAPS_pubmethodGetDisplayText(Int32)

When implemented in a derived class, gets the text to be displayed in the completion list for the specified item.

System_CAPS_pubmethodGetGlyph(Int32)

When implemented in a derived class, gets the image to show next to the specified item.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetInitialExtent(IVsTextView, Int32, Int32, Int32)

Returns the initial extent of the text to be completed.

System_CAPS_pubmethodGetName(Int32)

When implemented in a derived class, gets the name or text to be inserted for the specified item.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsCommitChar(String, Int32, Char)

Determines whether the specified character can be used to complete the specified text.

System_CAPS_pubmethodIsMatch(String, Int32)

Determines whether the specified text matches some or all of the specified item.

System_CAPS_pubmethodIsPerfectMatch(String, Int32)

Determines whether the specified text matches all of the specified item.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodOnAutoComplete(IVsTextView, String, Char, Int32)

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.

System_CAPS_pubmethodOnCommit(IVsTextView, String, Char, Int32, TextSpan)

Called to commit the specified item to the source file.

System_CAPS_pubmethodToString()

(Inherited from Object.)

This abstract class is used to manage a list of identifiers or declarations that are shown in an IntelliSense member completion list. If you intend to support IntelliSense in your application, you must provide a concrete class that derives from this class.

Notes to Implementers:

The implemented methods of this class assume that the declarations are stored in a list that is sorted in ascending order.

If you intend to support the IntelliSense completion list, you must derive a class from the Declarations class and implement the following abstract methods:

Abstract Method

Description

GetCount

Returns number of items in declarations list

GetDescription

Returns description for specified item.

GetDisplayText

Returns text to be shown in the completion list for the specified item.

GetGlyph

Returns an index into an image list for the specified item.

GetName

Returns the text to be inserted for the specified item.

Notes to Callers:

An instance of this class is returned from the GetDeclarations method in the AuthoringScope class. The GetDeclarations method must be implemented in a class derived from the AuthoringScope class. How your version of the Declarations class is populated is entirely up to you. The Declarations class is populated by the parser.

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

Return to top
Show: