Freigeben über


AuthoringScope.GetDeclarations Method

Definition

Returns a list of declarations based on the specified reason for parsing.

public:
 abstract Microsoft::VisualStudio::Package::Declarations ^ GetDeclarations(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ view, int line, int col, Microsoft::VisualStudio::Package::TokenInfo ^ info, Microsoft::VisualStudio::Package::ParseReason reason);
public abstract Microsoft.VisualStudio.Package.Declarations GetDeclarations (Microsoft.VisualStudio.TextManager.Interop.IVsTextView view, int line, int col, Microsoft.VisualStudio.Package.TokenInfo info, Microsoft.VisualStudio.Package.ParseReason reason);
abstract member GetDeclarations : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * int * int * Microsoft.VisualStudio.Package.TokenInfo * Microsoft.VisualStudio.Package.ParseReason -> Microsoft.VisualStudio.Package.Declarations
Public MustOverride Function GetDeclarations (view As IVsTextView, line As Integer, col As Integer, info As TokenInfo, reason As ParseReason) As Declarations

Parameters

view
IVsTextView

[in] An IVsTextView object that can be used to access the source.

line
Int32

[in] The line number where the parse operation started.

col
Int32

[in] The offset into the line where the parse operation started.

info
TokenInfo

[in] A TokenInfo structure containing information about the token at the specified position.

reason
ParseReason

[in] The ParseReason value describing what kind of parse operation was completed.

Returns

If successful returns a Declarations object; otherwise, returns a null value.

Remarks

This method is used to obtain a list of member declarations based on the given position in the source code in order to support the IntelliSense members list (a list of all members for a particular class or scope). Note that the parse operation has been completed by the time this method is called.

In the default managed package framework implementation, the Source class method Completion is called to present a list of declarations the user can select from to complete the entry of a particular identifier. The call to Completion is triggered when a parse operation returns a MemberSelect and the user is typing a character. Completion executes a parse operation and when the parse is complete, the GetDeclarations method is called to return the list of declarations to display. Note that the returned Declarations object is always your implementation of the Declarations class.

Applies to