다음을 통해 공유


Microsoft.VisualStudio.Package Namespace

This namespace now includes documentation only for the types in the Microsoft.VisualStudio.Package.LanguageService.* assemblies.

Classes

AuthoringScope

Encapsulates information about the source as obtained from a parsing operation.

AuthoringSink

AuthoringSink is used to gather information from the parser to help in the following:

  • error reporting
  • matching braces (ctrl-])
  • intellisense: Member Selection, CompleteWord, QuickInfo, MethodTips
  • management of the autos window in the debugger
  • breakpoint validation
CodeWindowManager

CodeWindowManager provides a default implementation of the VSIP interface IVsCodeWindowManager and manages the LanguageService, Source, ViewFilter, and DocumentProperties objects associated with the given IVsCodeWindow. It calls CreateViewFilter on your LanguageService for each new IVsTextView created by Visual Studio and installs the resulting filter into the command chain. You do not have to override this method, since a default view filter will be created. If your LanguageService returns an object from CreateDocumentProperties then you will have properties in the Properties Window associated with your source files. The CodeWindowManager also provides support for optional drop down combos in the IVsDropdownBar for listing types and members by installing the TypeAndMemberDropdownBars object returned from your LanguageService CreateDropDownHelper method. The default return from CreateDropDownHelper is null, which results in no drop down combos.

ColorableItem

Provides a default implementation of the VSIP interface IVsColorableItem.

Colorizer

This class implements the IVsColorizer interface and is used to support syntax highlighting in an editor.

CompletionSet

Represents an IntelliSense completion list that is displayed in the current text view.

Completor

Wraps and applies multiple changes to a text view as a single operation.

CompoundAction

This class can be used in a using statement to open and close a compound edit action via IVsCompoundAction interface. Be sure to call Close() at the end of your using statement, otherwise Dispose will call Abort.

CompoundActionBase

Used to create CompoundAction objects.

CompoundActionFactory

Creates CompoundAction objects based on specific source files and views.

CompoundViewAction

This class can be used in a using statement to open and close a compound edit action via IVsCompoundAction interface from an IVsTextView. This allows the view to optimize it's updates based on edits you are making on the buffer, so it's the preferred way of doing things if you have access to the IVsTextView. If not, use CompoundAction.

Declarations

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

DefaultFieldValue

Associates a default value with a field name as defined in a code snippet template for a language service.

DocumentProperties

This class can be used as a base class for document properties which are displayed in the Properties Window when the document is active. Simply add some public properties and they will show up in the properties window.

DocumentTask

Represents an item for a language service in the Error List Options window.

DropDownMember

Represents a single entry in a combo box on a drop-down bar.

EditArray

This class encapsulates a batch edit operation. The reason this class exists is because performing thousands of tiny edits on a large document can be pretty slow, so the best thing to do is merge the edits into bigger chunks and that is exactly what this class will do for you. The trick is that when merging edits you need to be careful not to include any IVsTextLineMarkers in the merged chunks, because editing over the top of the marker will blow it away, which is not what the user wants. The user wants to keep all their breakpoints and bookmarks, and red and blue squigglies and so on. So this class also takes care of that.

EditorControl

This class wraps a managed WinForm control and uses that as the editor window.

EditorFactory

You must inherit from this class and simply add a [ComVisible] and [GuidAttribute] and then specify the EditorFactoryGuid, EditorFactoryGuid and EditorName variables in your Registration class. This base class provides a default editor factory implementation that hosts the Visual Studio Core editor.

EditorFactory.EditorInfo

Contains data about a specific editor.

EditSpan

This class encapsulates one atomic edit operation. Add these to an EditArray then when you are ready call ApplyEdits().

ExpansionFunction

Provides support for expansion functions in code snippets for a language service.

ExpansionProvider

Provides support for inserting code snippets into source code.

FilePathUtilities

Static utilities for getting and setting file paths.

LanguagePreferences

LanguagePreferences encapsulates the standard General and Tab settings for a language service and provides a way of getting and setting the values. It is expected that you will have one global LanguagePreferences created by your package. The General and Tabs settings are automatically persisted in .vssettings files by the core editor package. All you need to do is register your language under AutomationProperties/TextEditor and specify:

YourLanguage = s '%YourLocalizedName%'
{
   val Name = s 'YourLanguage'
   val Package = s '{F5E7E720-1401-11D1-883B-0000F87579D2}'
   val ProfileSave = d 1
   val ResourcePackage = s '%YourPackage%'
}

Therefore this class hides all it's properties from user setting persistence using DesignerSerializationVisibility.Hidden. This is so that if you give this object to the Package.ExportSettings method as the AutomationObject then it will only write out your new settings which is what you want, otherwise the General and Tab settings will appear in two places in the .vsssettings file.

LanguageService

This is the base class for a language service that supplies language features including syntax highlighting, brace matching, auto-completion, IntelliSense support, and code snippet expansion.

MethodData

Provides support for the IntelliSense method tip operation.

Methods

Represents a collection of method signatures obtained from a parsing operation in a language service.

ParseRequest

Provides information to execute a parsing operation in a language service.

SimpleEditorView

This class View provides an abstract base class for simple editor views that follow the VS simple embedding model.

Source

Source represents one source file and manages the parsing and intellisense on this file and keeping things like the drop down combos in sync with the source and so on.

TextSpanHelper

A utility class that provides methods for manipulating and comparing instances of the TextSpan class, and also for validating positions.

TextTipData

This class provides a default implementation of IVsTextTipData for use in the IVsTextTipWindow for displaying tool tips.

TokenInfo

Provides information about a particular token encountered by a language service's language parser.

TypeAndMemberDropdownBars

Represents the two drop down bars on the top of a text editor window that allow types and type members to be selected by name.

ViewFilter

ViewFilter provides a default implementation of IVsTextViewFilter providing a handling of the following VS commands:

VsCommands.GotoDefn VsCommands.GotoDecl VsCommands.GotoRef VsCommands2K.COMMENT_BLOCK VsCommands2K.UNCOMMENT_BLOCK VsCommands2K.SHOWMEMBERLIST VsCommands2K.COMPLETEWORD VsCommands2K.PARAMINFO VsCommands2K.QUICKINFO VsCommands2K.OUTLN_STOP_HIDING_ALL VsCommands2K.OUTLN_START_AUTOHIDING VsCommands2K.SHOWCONTEXTMENU

Most of the work is delegated to the Source object.

Structs

CommentInfo

Provides the characters that define comments for a language service.

Variant

Represents an object that can be interpreted as more than one type.

Interfaces

IScanner

Scans individual source lines and provides coloring and trigger information about tokens.

Enums

IndentingStyle

Represents the different indenting styles supported by language services.

ParseReason

Provides reasons for a parsing operation in a language service.

Severity

Specifies the severity of a parser error in a language service.

TokenColor

Provides initial values for color indices as reported by an IScanner scanner.

TokenTriggers

TokenTriggers: If a character has (a) trigger(s) associated with it, it may fire one or both of the following triggers: MemberSelect - a member selection tip window MatchBraces - highlight matching braces or the following trigger: MethodTip - a method tip window

The following triggers exist for speed reasons: the (fast) lexer determines when a (slow) parse might be needed. The Trigger.MethodTip trigger is subdivided in 4 other triggers. It is the best to be as specific as possible; it is better to return Trigger.ParamStart than Trigger.Param (or Trigger.MethodTip)

TokenType

Specifies the different types of tokens that can be identified and returned from a language service scanner.

Variant.VariantType

Specifies the type of a variant object as used by a managed package framework (MPF) language service class.

Delegates

ParseResultHandler

Used to define a delegate for a parsing operation completion handler in a language service.

Remarks

The Managed Package Framework source code that formerly was shipped as part of the Visual Studio SDK can now be found at MPF for Projects - Visual Studio 2010.