Share via


ExpansionProvider Members

Include Protected Members
Include Inherited Members

Provides support for inserting code snippets into source code.

The ExpansionProvider type exposes the following members.

Constructors

  Name Description
Public method ExpansionProvider Initializes a new instance of the ExpansionProvider class.

Top

Methods

  Name Description
Public method BeginTemplateEditing Inserts the previously prepared code snippet and starts the snippet editing mode.
Public method DisplayExpansionBrowser Displays a list of expansion templates of the specified type and kind.
Public method Dispose Cleans up allocated resource just before the ExpansionProvider object is destroyed.
Public method EndExpansion Called when an expansion session has ended.
Public method EndTemplateEditing Ends the current snippet editing mode.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Cleans up all resources just before the ExpansionProvider object is destroyed. (Overrides Object.Finalize().)
Public method FindExpansionByShortcut Obtains the path and title of a code snippet given the snippet's shortcut name.
Public method FormatSpan Formats the specified text span.
Public method GetExpansionFunction(XmlElement, String) Returns an IVsExpansionFunction object representing the expansion function described in the given XML template node.
Public method GetExpansionFunction(IXMLDOMNode, String, IVsExpansionFunction%) Returns a IVsExpansionFunction object representing the expansion function described in the given XML template node (COM implementation).
Public method GetExpansionSpan Returns the span occupied by the snippet currently being edited.
Public method GetFieldSpan Gets the field span of the specified field
Public method GetFieldValue Returns the value of the specified field.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method HandlePostExec Called after a command has been executed.
Public method HandlePreExec Called before a command is executed.
Public method HandleQueryStatus Determines if the specified command is handled by the ExpansionProvider class.
Public method InsertNamedExpansion Inserts the specified snippet into the source at the given position.
Public method InsertSpecificExpansion Inserts the specific snippet into the source at the specified position.
Public method IsValidKind Determines whether this is valid text for expansion. This method should be overridden if you want to specify where in the source document the expansion can take place.
Public method IsValidType Determines whether or not a given type is valid for expansion purposes. This method should be overridden if you want to specify where in the source document the expansion can take place.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnAfterInsertion Called after a snippet has been inserted into the source.
Public method OnBeforeInsertion Called just before the snippet has been inserted into the source.
Public method OnItemChosen Called when an item is chosen in a snippet browser.
Public method PositionCaretForEditing Puts the caret in a position suitable for editing.
Public method PrepareTemplate Prepares for insertion of the specified snippet.
Public method ToString Returns a String that represents the current Object. (Inherited from Object.)

Top

Properties

  Name Description
Public property Expansion Returns the IVsExpansion object used for inserting snippets into a buffer.
Public property ExpansionSession Returns the expansion session created to manage editing the code snippet.
Public property InTemplateEditingMode Indicates whether the code snippet is currently being edited.
Public property Source Returns the Source object associated with this expansion provider.
Public property TextView Returns the text view containing the source file being manipulated by the expansion provider.

Top

See Also

Reference

ExpansionProvider Class

Microsoft.VisualStudio.Package Namespace