This topic has not yet been rated - Rate this topic

MethodData Class

Provides support for the IntelliSense method tip operation.

This API is not CLS-compliant. The CLS-compliant alternative is [None].
Object
  Microsoft.VisualStudio.Package.MethodData

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  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)
[CLSCompliantAttribute(false)]
public class MethodData : IVsMethodData, IDisposable

The MethodData type exposes the following members.

  NameDescription
Public methodMethodDataInitializes a new instance of the MethodData class.
Top
  NameDescription
Public propertyIsDisplayedDetermines if the method tip is visible.
Protected propertyMethodsDetermines the list of method signatures that can be displayed in the method tip.
Protected propertyMethodTipWindowDetermines the method tip window as represented by an IVsMethodTipWindow interface.
Protected propertyProviderDetermines the service provider.
Protected propertyTextViewDetermines the view the method tip is displayed on.
Top
  NameDescription
Public methodAdjustCurrentParameterUpdate the current parameter, either forward or backward, by the specified amount.
Public methodCloseCloses the method tip and clears the MethodData object.
Public methodDismissDismisses the method tip from view.
Public methodDisposeFrees any allocations made just before the MethodData 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 methodGetContextStreamConverts the current context span to a file position and length.
Public methodGetCurMethodReturns the currently visible method signature.
Public methodGetCurrentParameterReturns the current parameter being edited in the specified method signature.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetMethodTextReturns the specified text for the specified method signature.
Public methodGetOverloadCountReturns the number of method signatures that can be shown.
Public methodGetParameterCountReturns the number of parameters available for the specified method signature.
Public methodGetParameterTextReturns the specified parameter text for the specified method signature.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodNextMethodMoves to the next method signature and returns the index of the current method signature.
Public methodOnDismissCalled after the method tip is removed from view.
Public methodPrevMethodMoves to the previous method signature and returns the index of the current method signature.
Public methodRefreshDisplays the method tip with the given method signatures.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodUpdateViewUpdates the method tip display.
Top

This class is used by the Source class to implement the IntelliSense method tip operation. This class presents the tool tip and manages it as the user types the various parameters. This class uses a Methods object to contain all of the appropriate method signatures for the method currently being typed. This Methods object is filled in by the parser when the parsing reason MethodTip is given.

Notes to Implementers

The base class already implements most of everything needed to support the IntelliSense method tip operation, so there is little need to derive from this class. If your language requires more specialized formatting of method data, then you must derive a class from the MethodData class and override the GetMethodText method. You must also override the CreateMethodData method in the Source class to create an instance of your version of the MethodData class.

This class interacts with the Methods class to obtain information on how to format method signatures. Specifically, this class consults the properties, OpenBracket, CloseBracket, Delimiter, TypePrefixed, TypePrefix, and TypePostfix to format the method signatures in the method tip. Since all of this information is obtained through the Methods class, you should not need to override the MethodData class.

Notes to Callers

This class is instantiated in the CreateMethodData method in the Source class.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.