ISmartTagBroker Interface

 
Note: This API is now obsolete.

Defines a smart tag broker, which is responsible for triggering smart tags. Components call methods on the broker in order to trigger smart tags.

Smart tags are deprecated in favor of light bulbs. See ILightBulbBroker for a replacement.

Namespace:   Microsoft.VisualStudio.Language.Intellisense
Assembly:  Microsoft.VisualStudio.Language.Intellisense (in Microsoft.VisualStudio.Language.Intellisense.dll)

[ObsoleteAttribute("This API is deprecated in this version of the Visual Studio SDK, and will be retired in a future version. To find out more about the replacement API, Light Bulb, refer to http://go.microsoft.com/fwlink/?LinkId=394601.")]
public interface ISmartTagBroker

NameDescription
System_CAPS_pubmethodCreateSmartTagSession(ITextView, SmartTagType, ITrackingPoint, SmartTagState)

Creates a smart tag session for smart tags of the specified type at the specified location.

Smart tags are deprecated in favor of light bulbs. See ILightBulbBroker for a replacement.

System_CAPS_pubmethodGetSessions(ITextView)

Gets the list of currently-active smart tag sessions for the specified text view.

Smart tags are deprecated in favor of light bulbs. See ILightBulbBroker for a replacement.

System_CAPS_pubmethodIsSmartTagActive(ITextView)

Determines whether a smart tag is active.

Smart tags are deprecated in favor of light bulbs. See ILightBulbBroker for a replacement.

To create a smart tag session, use CreateSmartTagSession, add some context data into the session's property bag, and call Start.

During the Start call, the session is calculated for the first time, and in AugmentSmartTagSession the smart tag source can return actions to be added to the ActionSets. ISmartTagSource objects should also set the ApplicableToSpan property based on the context data that was earlier added to the session's property bag. If, during any smart tag session calculation, the session does not get actions or an applicability span, the session will be immediately dismissed.

For an example of the use of this interface, see Walkthrough: Displaying Light Bulb Suggestions.

Return to top
Show: