-
Notifications
You must be signed in to change notification settings - Fork 33
Modern completion API
Contents #
- CodeElementKinds
- CodeLensDataPointDescriptor
- CodeLensDataPointProviderDescriptor
- CodeLensDescriptor
- CodeLensDetailEntryCommand
- CodeLensDetailEntryDescriptor
- CodeLensDetailEntryField
- CodeLensDetailHeaderDescriptor
- CodeLensDetailPaneCommand
- CodeLensDetailsDescriptor
- CodeLensServiceProtocolNames
- CommitBehavior
- CommitResult
- CompletionClosedEventArgs
- CompletionContext
- CompletionFilter
- CompletionFilterChangedEventArgs
- CompletionFilterReason
- CompletionFilterWithState
-
CompletionItem
- #ctor(displayText,source,icon,suffix)
- #ctor(displayText,source,icon,filters)
- #ctor(displayText,source,icon,filters,suffix)
- #ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons)
- #ctor(displayText,source)
- #ctor(displayText,source,icon,suffix)
- #ctor(displayText,source,icon,filters)
- #ctor(displayText,source,icon,filters,suffix)
- #ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons)
- AttributeIcons
- DisplayText
- Filters
- FilterText
- Icon
- InsertText
- Properties
- SortText
- Source
- Suffix
- CompletionItemEventArgs
- CompletionItemSelectedEventArgs
- CompletionItemSelection
- CompletionItemsWithHighlightEventArgs
- CompletionItemWithHighlight
- CompletionPresentationViewModel
- CompletionTrigger
- CompletionTriggeredEventArgs
- CompletionTriggerReason
- DetailsTemplateNameAttribute
- FilteredCompletionModel
- IAsyncCodeLensDataPoint
- IAsyncCodeLensDataPointProvider
- IAsyncCompletionBroker
- IAsyncCompletionCommitManager
- IAsyncCompletionCommitManagerProvider
- IAsyncCompletionItemManager
- IAsyncCompletionItemManagerProvider
- IAsyncCompletionSession
- IAsyncCompletionSource
- IAsyncCompletionSourceProvider
- IAsyncQuickInfoBroker
- IAsyncQuickInfoSession
- IAsyncQuickInfoSource
- IAsyncQuickInfoSourceProvider
- ICodeLensDescriptor
- ICodeLensTag
- ICompletionPresenter
- ICompletionPresenterProvider
- IInteractiveQuickInfoContent
- ILegacyQuickInfoBrokerSupport
- ILegacyQuickInfoRecalculateSupport
- ILegacyQuickInfoSource
- ILegacyQuickInfoSourcesSupport
- InitialSelectionOption
- LegacyQuickInfoMetadata
- PredefinedCompletionNames
- QuickInfoItem
- QuickInfoSessionOptions
- QuickInfoSessionState
- QuickInfoSessionStateChangedEventArgs
- SuggestionItemOptions
- UpdateTrigger
Microsoft.VisualStudio.Language.Intellisense
Represents the kind of code elements in a document.
Kind is a class.
Kind is a constructor.
Kind is a type container.
A type container can be any of File, Module, Package, or Namespace. Code should use one of the concrete values if needed.
Kind is an enum.
Kind is an event.
Kind is a field.
Kind is a file.
Kind is a function.
Kind is an interface.
Invalid kind.
Kind is a type member.
A Member kind can be any of MethodPropertyEventFieldConstructorFunction
Kind is a method.
Kind is a module.
Kind is a namespace.
Kind is a package.
Kind is a property.
Kind is a struct.
Kind is a type (Class, Interface, Struct, or Enum).
Unspecified kind.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a descriptor for a CodeLens data point.
This type is used for the object representing a data point returned from the remote data point provider.
Additional data of the data point. Reserved for customization.
The description text that displays in the UI indicator of the data point.
The image content of the data point.
The integer content of the data point.
The data point provider's unique identifier.
The tooltip text for the UI indicator of the data point.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a data model describing IAsyncCodeLensDataPointProviders.
When requested, the remote CodeLens service returns an object of CodeLensDataPointProviderDescriptor for each provider it hosts.
List of supported content types.
What template to use for presenting the detail in the detail popup. Defaults to use a GridView to present detail data.
The localized name of the data point provider.
Determines if the provider can be modified in the tool's option setting.
Determines if the provider is visible in the tool's option setting.
An Int32 value indicating the order of the indicator. Lower value indicators will come first in the default ordering in indicator adornments in editor.
The uniquely-identifying name of the data point provider.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a data model describing the code element in a document on which CodeLens data point indicators would be requested.
A Span identifying the place of the code element with which a data point is associated.
A text description for the code element with which a data point is associated.
Language services use this property to pass the text of the code element to data points.
Full path to the document on which data points are requested.
The CodeElementKinds of the code element with which a data point is associated.
A Guid identifying the project to which the document belongs.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a navigation command invokable from the details pane.
A command can only have either the CommandName or the pair of CommandSet and CommandId, depending on the platform on which the code runs:
The command Id.
The command name.
The command group Guid.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Defines a row entry in CodeLensDetailsDescriptor.
Additional data asociated with the entry. Reserved for customization.
A list of field values in the entry.
The order of Fields in an entry must be the same as the order of Headers in the CodeLensDetailsDescriptor.
Navigation command associated with the entry.
Arguments for the navigation command.
Tooltip for the entry.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Defines a field of a CodeLensDetailEntryDescriptor.
Additional data associated with this field. Reserved for customization.
The image content of the field.
The text string content of the field.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Defines a header object for CodeLensDetailsDescriptor.
The localized name of the header when displayed.
Indicates whether this column should display in the grid view.
Stores custom information that can be used to customize the column.
The header's unique name.
The desired width of this header when displayed in the detail popup.
If Width <= 1.0, this value is used as a multifier for the percentage of remaining width in the grid view, excluding all fixed width columns, should be allocated to this column. A value of 1.0 means 100% of remaining width is allocated to this column.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a navigation command in the detail pane.
The command arguments.
The command text displayed in the pane.
The navigation command.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a descriptor for the detail of a data point.
When GetDetailsAsync is called, the data point returns a CodeLensDetailsDescriptor object providing the data point details that will be presented in the details popup.
Custom details data.
Defines rows (entries) of the detail list.
Defines the headers of the detail list.
Defines the additional navigation commands in the details pane
Microsoft.VisualStudio.Language.CodeLens.Remoting
Defines the names of the protocols for CodeLens ServiceHub service.
Protocol for querying a CodeLens provider if it supports to create a data point.
The name of the default SeviceHub service.
Protocol for retrieving data from a CodeLens data point.
Protocol params and return: params: CodeLensDescriptor and the provider name. return: CodeLensDataPointDescriptor
Protocol for retrieving details of a CodeLens data point.
Protocol params and return: params: CodeLensDescriptor and the provider name. return: CodeLensDetailsDescriptor
Protocol for getting CodeLens providers hosted by the service.
Protocol params and return: params: none return: CodeLensDataPointProviderDescriptor
A protocol that the service can use to notify the CodeLens infrastructure that the remote CodeLens data in the data point source has been invalidated.
Protocol params and return: params: CodeLensDescriptor and the provider name return: none.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Instructs the editor how to behave after invoking the custom commit method.
Use the default behavior
Raises further invocation of the ReturnKey and Tab command handlers. By default, editor doesn't invoke ReturnKey and Tab command handlers after committing completion session.
Surpresses further invocation of the TypeChar command handlers. By default, editor invoke these command handlers to enable features such as brace completion.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Tracks whether the commit occured, and provides instructions for behavior after committing.
Creates a CommitResult with specified properties.
Name | Type | Description |
---|---|---|
isHandled | System.Boolean | Whether the commit occured |
behavior | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CommitBehavior | Desired behavior after committing |
Marks this commit as handled. No other IAsyncCompletionCommitManager will be asked to commit.
Marks this commit as unhandled. Another IAsyncCompletionCommitManager will be asked to commit.
Desired behavior after committing, respected even when IsHandled is unset.
Whether the commit occured. If true, no other IAsyncCompletionCommitManager will be asked to commit. If false, another IAsyncCompletionCommitManager will be asked to commit.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify completion's logic when the UI closes
Constructs instance of CompletionClosedEventArgs.
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | ITextView that hosted this completion UI |
ITextView that hosted completion UI
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This type is used to transfer data from IAsyncCompletionSource to IAsyncCompletionBroker and further to IAsyncCompletionItemManager
Constructs CompletionContext with specified CompletionItems. Completion will use default selection and no suggestion mode, unless overriden by another IAsyncCompletionSource
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Available completion items |
Constructs CompletionContext with CompletionItems with specified suggestion mode and soft selection properties.
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Available completion items |
useSoftSelection | System.Boolean | Whether UI should use soft selection |
useSuggestionMode | System.Boolean | Whether UI should enter suggestion mode |
suggestionModeDescription | System.String | Explains why suggestion mode is active. It is displayed when applicableSpan is empty. Otherwise, UI displays content of applicableSpan. May be null. |
Construsts CompletionContext with specified CompletionItems. Completion will use specified selection mode, and if SuggestionModeOptions is not null, it will use suggestion mode with specified options.
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Available completion items |
useSoftSelection | System.Boolean | Whether UI should use soft selection. Default is false. Usually it is true when suggestionModeOptions is set |
suggestionModeOptions | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.SuggestionItemOptions | Whether there should be completion item |
Construsts CompletionContext with specified CompletionItems. Completion will use specified selection mode, and if SuggestionModeOptions is not null, it will use suggestion mode with specified options.
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Available completion items |
useSoftSelection | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.InitialSelectionOption | Whether UI should use soft selection. Default is false. Usually it is true when suggestionModeOptions is set |
suggestionModeOptions | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.SuggestionItemOptions | Whether there should be completion item |
Empty completion context, when IAsyncCompletionSource offers no items pertinent to given location.
Set of completion items available at a location
When set, uses suggestion mode with options specified in this object. When null, this context does not provide a suggestion mode item.
When set to true, the completion list will be initially soft-selected. Soft selection means that typing commit characters will not commit the item. The item may be committed only by using TAB or double-clicking. Soft selection is represented by a border around the item, without a background fill. Selecting another item automatically disables soft selection and enables full selection.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Identifies a filter that toggles exclusive display of CompletionItems that reference it.
static CompletionFilter MyFilter = new CompletionFilter("My items", "m", MyItemsImageMoniker);
These instances should be singletons. All CompletionItems that should be filtered using the same filter button must use the same reference to the instance of CompletionFilter.
Constructs an instance of CompletionFilter.
Name | Type | Description |
---|---|---|
displayText | System.String | Name of this filter |
accessKey | System.String | Key used in a keyboard shortcut that toggles this filter. |
image | Microsoft.VisualStudio.Text.Adornments.ImageElement | Image that represents this filter |
Key used in a keyboard shortcut that toggles this filter.
Name of this filter.
ImageElement that represents this filter.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify completion's logic of selection change in the filter UI
Constructs instance of CompletionFilterChangedEventArgs.
Name | Type | Description |
---|---|---|
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterWithState} | Current state of the filters |
Current state of the filters
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Describes the kind of action that triggered completion to filter.
Completion was triggered via an action deleting a character from the document.
Update was triggered by changing filters
Completion was triggered by a direct invocation of the completion feature using the Edit.ListMember command.
Completion was triggered via an action inserting a character into the document.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Immutable data transfer object used to communicate between the completion session and completion UI
Constructs a new instance of CompletionFilterWithState.
Name | Type | Description |
---|---|---|
filter | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter | Reference to CompletionFilter |
isAvailable | System.Boolean | Whether this CompletionFilter is available |
Constructs a new instance of CompletionFilterWithState when selected state is known.
Name | Type | Description |
---|---|---|
filter | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter | Reference to CompletionFilter |
isAvailable | System.Boolean | Whether this CompletionFilter is available |
isSelected | System.Boolean | Whether this CompletionFilter is selected |
Reference to the completion filter
Whether the filter is available. Filter should be available when there are visible CompletionItems that define this Filter in their Filters
Whether the filter is selected by the user.
Override for nice debugger display
This method has no parameters.
Returns instance of CompletionFilterWithState with specified IsAvailable
Updated instance of CompletionFilterWithState
Name | Type | Description |
---|---|---|
isAvailable | System.Boolean | Value to use for IsAvailable |
Returns instance of CompletionFilterWithState with specified IsSelected
Updated instance of CompletionFilterWithState
Name | Type | Description |
---|---|---|
availability | System.Boolean | Value to use for IsSelected |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class, returned from IAsyncCompletionSource, represents a single entry to be displayed in the completion UI. This class implements IPropertyOwner
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, and there are no filter, suffix nor attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Core.Imaging.AccessibleImageId | Image displayed in the UI |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, and there are no suffix nor attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Core.Imaging.AccessibleImageId | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, suffix, and there are no attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Core.Imaging.AccessibleImageId | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
suffix | System.String | Additional text to display in the UI |
#ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons) constructor
# =
Creates a completion item, allowing customization of all of its properties.
Name | Type | Description |
---|---|---|
displayText | System.String | Text used in the UI |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Core.Imaging.AccessibleImageId | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
suffix | System.String | Additional text to display in the UI |
insertText | System.String | Text inserted when completing this item |
sortText | System.String | Text used by IAsyncCompletionItemManager when sorting against other items |
filterText | System.String | Text used by IAsyncCompletionItemManager when matching against the applicable span |
attributeIcons | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Core.Imaging.AccessibleImageId} | Additional images to display in the UI |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, and there are no icon, filter, suffix nor attribute icons associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, and there are no filter, suffix nor attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Text.Adornments.ImageElement | Image displayed in the UI |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, and there are no suffix nor attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Text.Adornments.ImageElement | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, suffix, and there are no attribute images associated with this item.
Name | Type | Description |
---|---|---|
displayText | System.String | Text to use in the UI, when sorting, filtering and completing |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Text.Adornments.ImageElement | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
suffix | System.String | Additional text to display in the UI |
#ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons) constructor
# =
Creates a completion item, allowing customization of all of its properties.
Name | Type | Description |
---|---|---|
displayText | System.String | Text used in the UI |
source | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource | Reference to IAsyncCompletionSource that created this item |
icon | Microsoft.VisualStudio.Text.Adornments.ImageElement | Image displayed in the UI |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter} | ImmutableArray of references to CompletionFilters applicable to this item |
suffix | System.String | Additional text to display in the UI |
insertText | System.String | Text inserted when completing this item |
sortText | System.String | Text used by IAsyncCompletionItemManager when sorting against other items |
filterText | System.String | Text used by IAsyncCompletionItemManager when matching against the applicable span |
attributeIcons | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Text.Adornments.ImageElement} | Additional images to display in the UI |
Additional images to display in the UI. Usually, these images are displayed on the far right side of the UI.
Text used in the UI
ImmutableArray of references to CompletionFilters applicable to this item
Text used by IAsyncCompletionItemManager when matching against the applicable span
Image displayed in the UI
Text inserted when completing this item
The collection of properties controlled by the property owner. See Properties
Text used by IAsyncCompletionItemManager when sorting against other items
Reference to the instance that will provide tooltip and custom commit method. Usually it is the same instance as the one that created this CompletionItem
Additional text to display in the UI, after DisplayText. This text has less emphasis than DisplayText and is usually right-aligned.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify of an operation that affects a single CompletionItem.
Constructs instance of CompletionItemEventArgs.
This constructor has no parameters.
Relevant item
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify completion's logic of selecting through the UI
Constructs instance of CompletionItemSelectedEventArgs.
Name | Type | Description |
---|---|---|
selectedItem | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | User-selected item |
suggestionModeSelected | System.Boolean | Whether the selected item is a suggestion mode item |
Selected item. Might be null if there is no selection
Whether selected item is a suggestion mode item
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Don't change the current selection mode.
Set selection mode to regular selection: item is committed using Tab, mouse, enter and commit characters.
Set selection mode to soft selection: item is committed only using Tab or mouse.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify of an operation that affects multiple CompletionItemWithHighlights.
Constructs instance of CompletionItemEventArgs.
This constructor has no parameters.
Relevant items
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Wraps CompletionItem with information about highlighted parts of its DisplayText.
Constructs CompletionItemWithHighlight without any highlighting. Used when the CompletionItem appears in the completion list without being a text match.
Name | Type | Description |
---|---|---|
completionItem | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | Instance of the CompletionItem |
Constructs CompletionItemWithHighlight with given highlighting. Used when text used to filter the completion list can be found in the DisplayText.
Name | Type | Description |
---|---|---|
completionItem | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | Instance of the CompletionItem |
highlightedSpans | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Text.Span} | Spans of DisplayText to highlight |
The completion item
Which parts of DisplayText to highlight
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class contains completion items, filters and other pieces of information used by ICompletionPresenter to render the completion UI.
#ctor(items,filters,applicableSpan,useSoftSelection,useSuggestionMode,selectSuggestionMode,selectedItemIndex,suggestionModeItem) constructor
# =
Constructs CompletionPresentationViewModel
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItemWithHighlight} | Completion items to display with their highlighted spans |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterWithState} | Completion filters with their available and selected state |
applicableSpan | Microsoft.VisualStudio.Text.ITrackingSpan | Span pertinent to the completion session |
useSoftSelection | System.Boolean | Controls whether selected item should be soft selected |
useSuggestionMode | System.Boolean | Controls whether suggestion mode item is visible |
selectSuggestionMode | System.Boolean | Controls whether suggestion mode item is selected |
selectedItemIndex | System.Int32 | Controls which item is selected. Use -1 in suggestion mode |
suggestionModeItem | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | Suggestion mode item to display |
Span pertinent to the completion session.
Completion filters with their available and selected state.
Completion items to display with their highlighted spans.
Controls which item is selected. Use -1 in suggestion mode.
Controls whether suggestion mode item is selected.
How to display the suggestion mode completion.
Suggestion mode item to display.
Controls whether selected item should be soft selected.
Controls whether suggestion mode item is visible.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
What triggered the completion, but not where it happened. The reason we don't expose location is that for each extension, we map the point to a buffer with matching content type.
Creates a CompletionTrigger associated with a text edit
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTriggerReason | The kind of action that triggered completion to start |
character | System.Char | Character that triggered completion |
Creates a CompletionTrigger not associated with a text edit
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTriggerReason | The kind of action that triggered completion to start |
The text edit associated with the triggering action.
The reason that completion was started.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class is used to notify about new IAsyncCompletionSession being triggered
Constructs instance of CompletionItemSelectedEventArgs.
Name | Type | Description |
---|---|---|
completionSession | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession | Newly created IAsyncCompletionSession |
textView | Microsoft.VisualStudio.Text.Editor.ITextView | ITextView where completion was triggered |
Newly created IAsyncCompletionSession.
ITextView where completion was triggered.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Describes the kind of action that initially triggered completion to open.
Completion was triggered via an action deleting a character from the document.
Completion was triggered via an action inserting a character into the document.
Completion was triggered by a direct invocation of the completion feature using the Edit.ListMember command.
Completion was triggered with a request to commit if a single item would be selected using the Edit.CompleteWord command.
Completion was triggered for snippets only.
Microsoft.VisualStudio.Language.CodeLens.Remoting
A MEF attribute specifying a template for presenting details of data points from a IAsyncCodeLensDataPointProvider.
Initializes a new instance of DetailsTemplateNameAttribute.
This constructor has no parameters.
The name of the template for presenting the data point's details.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
This class, returned from IAsyncCompletionItemManager, contains completion items to display in the UI, recommended item to display, selection mode and available filters.
Constructs FilteredCompletionModel without completion filters.
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItemWithHighlight} | Items to display in the completion UI. |
selectedItemIndex | System.Int32 | Recommended item index to select. |
Constructs FilteredCompletionModel with completion filters.
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItemWithHighlight} | Items to display in the completion UI. |
selectedItemIndex | System.Int32 | Recommended item index to select. |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterWithState} | Completion filters with their availability and selection state. |
Constructs FilteredCompletionModel with completion filters, indication regarding selection mode and the unique item
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItemWithHighlight} | Items to display in the completion UI. |
selectedItemIndex | System.Int32 | Recommended item index to select. |
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterWithState} | Completion filters with their availability and selection state. |
selectionMode | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItemSelection | Allows IAsyncCompletionItemManager to influence the selection mode. |
uniqueItem | System.Boolean | Provides CompletionItem to commit using "commit if unique" command despite displaying more than one item. |
Whether selected item should be displayed in the center of the list. Usually, this is true
Completion filters with their availability and selection state.
Items to display in the completion UI.
Recommended item index to select. Presence of a suggestion mode item may override
Controls the selection mode of the selected item.
Optionally, provides an item that should be committed using the "commit if unique" command.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents an async CodeLens data point.
The CodeLensDescriptor object that uniquely identifies the data point.
Gets lens data from the data point.
A CodeLensDataPointDescriptor object representing the lens data from the data point.
This method has no parameters.
Gets lens details from the data point.
A CodeLensDetailEntryDescriptor object representing the lens details of the data point.
This method has no parameters.
Microsoft.VisualStudio.Language.CodeLens.Remoting
Represents a provider which creates IAsyncCodeLensDataPoint instances from an CodeLensDescriptor.
This is a MEF component part, and should be exported with the following metadata:
[Export(typeof(IAsyncCodeLensDataPointProvider))]
[Name("nameOfTheProvider")]
[ContentType("csharp")]
The following metadata are optional:
<see cref="T:Microsoft.VisualStudio.Utilities.PriorityAttribute" /><see cref="T:Microsoft.VisualStudio.Utilities.LocalizedNameAttribute" /><see cref="T:Microsoft.VisualStudio.Utilities.OptionUserVisibleAttribute" /><see cref="T:Microsoft.VisualStudio.Utilities.OptionUserModifiableAttribute" /><see cref="T:Microsoft.VisualStudio.Language.CodeLens.Remoting.DetailsTemplateNameAttribute" />
Determines if this provider can create an IAsyncCodeLensDataPoint for the specified CodeLensDescriptor.
true
if a data point can be created from the descriptor; false
otherwise.
Name | Type | Description |
---|---|---|
descriptor | Microsoft.VisualStudio.Language.CodeLens.Remoting.CodeLensDescriptor | The descriptor to check. |
Creates an IAsyncCodeLensDataPoint, on request, from a given descriptor.
An IAsyncCodeLensDataPoint created from the descriptor.
Name | Type | Description |
---|---|---|
descriptor | Microsoft.VisualStudio.Language.CodeLens.Remoting.CodeLensDescriptor | The descriptor to use. |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that manages the completion feature. The editor uses this class to trigger completion and obtain instance of IAsyncCompletionSession which contains methods and events relevant to the active completion session.
[Import] IAsyncCompletionBroker CompletionBroker { get; set; }
Returns IAsyncCompletionSession if active or null if not
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
Returns whether completion is active in given view
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
Returns whether there are any completion item sources available for the top buffer in the provided view.
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Utilities.IContentType | View to check for available completion source exports |
Activates completion and returns IAsyncCompletionSession. If completion was already active, returns the existing session without changing it. Must be invoked on UI thread.
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
triggerLocation | Microsoft.VisualStudio.Text.SnapshotPoint | Location of completion on the view's top buffer. Used to pick relevant IAsyncCompletionSources and IAsyncCompletionItemManager |
typeChar | System.Char | Character that triggered completion, or default |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that provides means to commit CompletionItems and other information relevant to the completion feature at a specific SnapshotPoint.
Instances of this class should be created by IAsyncCompletionCommitManagerProvider, which is a MEF part.
Returns characters that may commit completion. When completion is active and a text edit matches one of these characters, ShouldCommitCompletion is called to verify that the character is indeed a commit character at a given location. Called on UI thread.
Returns whether this character is a commit character in a given location. If every character returned by PotentialCommitCharacters should always commit the active completion session, return true. Called on UI thread.
True if this character should commit the active session.
Name | Type | Description |
---|---|---|
typeChar | System.Char | Character typed by the user |
location | Microsoft.VisualStudio.Text.SnapshotPoint | Location in the snapshot of the view's topmost buffer. The character is not inserted into this snapshot. |
Requests commit of specified CompletionItem. Called on UI thread.
Instruction for the editor how to proceed after invoking this method
Name | Type | Description |
---|---|---|
view | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
buffer | Microsoft.VisualStudio.Text.ITextBuffer | Reference to the buffer with matching content type to perform text edits etc. |
item | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | Which completion item is to be applied |
applicableSpan | Microsoft.VisualStudio.Text.ITrackingSpan | Span augmented by completion, on the view's top buffer |
typedChar | System.Char | Text change associated with this commit |
token | System.Threading.CancellationToken | Cancellation token |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Provides instances of IAsyncCompletionItemManager which filters and sorts available CompletionItems given the current state of the editor.
[Export(typeof(IAsyncCompletionCommitManagerProvider))] [Name(nameof(MyCompletionCommitManagerProvider))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = "OtherCompletionCommitManager")] public class MyCompletionCommitManagerProvider : IAsyncCompletionCommitManagerProvider
This is a MEF component and should be exported with [ContentType] and [Name] attributes and optional [Order] and [TextViewRoles] attributes. An instance of IAsyncCompletionItemManager is selected first by matching ContentType with content type of the view's top buffer, and then by Order. Only one IAsyncCompletionItemManager is used in a given view.
Creates an instance of IAsyncCompletionCommitManager for the specified ITextView.
Instance of IAsyncCompletionItemManager
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that filters and sorts available CompletionItems given the current state of the editor. It also declares which completion filters are available for the returned subset of CompletionItems. All methods are called on background thread.
Instances of this class should be created by IAsyncCompletionItemManagerProvider, which is a MEF part.
This method is first called before completion is about to appear, and then on subsequent typing events and when user toggles completion filters. The result of this method will be used in subsequent invocations of UpdateCompletionListAsync User's input is tracked by ITrackingSpan on a ITextSnapshot in a ITextView.
Instance of FilteredCompletionModel that contains completion items to render, filters to display and recommended item to select
Name | Type | Description |
---|---|---|
initialList | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Set of CompletionItems to filter and sort |
triggerReason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTriggerReason | The CompletionTriggerReason completion was initially triggered. |
snapshot | Microsoft.VisualStudio.Text.ITextSnapshot | Text snapshot of the view's top buffer |
applicableSpan | Microsoft.VisualStudio.Text.ITrackingSpan | Span which tracks the location of the completion session and user's input |
view | Microsoft.VisualStudio.Text.Editor.ITextView | Instance of ITextView that hosts the completion |
token | System.Threading.CancellationToken | Cancellation token that may interrupt this operation |
UpdateCompletionListAsync(sortedList,initialTrigger,updateTrigger,snapshot,applicableSpan,selectedFilters,view,token) method
# =
This method is first called before completion is about to appear, and then on subsequent typing events and when user toggles completion filters. user's input tracked with ITrackingSpan on given ITextSnapshot and a collection of CompletionFilterWithStates that indicate user's filter selection.
Instance of FilteredCompletionModel that contains completion items to render, filters to display and recommended item to select
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Provides instances of IAsyncCompletionItemManager which filters and sorts available CompletionItems given the current state of the editor.
[Export(typeof(IAsyncCompletionItemManagerProvider))] [Name(nameof(MyCompletionItemManagerProvider))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = "OtherCompletionItemManager")] public class MyCompletionItemManagerProvider : IAsyncCompletionItemManagerProvider
This is a MEF component and should be exported with [ContentType] and [Name] attributes and optional [Order] and [TextViewRoles] attributes. An instance of IAsyncCompletionItemManager is selected first by matching ContentType with content type of the view's top buffer, and then by Order. Only one IAsyncCompletionItemManager is used in a given view.
Creates an instance of IAsyncCompletionItemManager for the specified ITextView.
Instance of IAsyncCompletionItemManager
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that tracks completion within a single ITextView. Constructed and managed by an instance of IAsyncCompletionBroker
Gets span applicable to this completion session. The span is defined on the session's TextBuffer.
Returns whether session is dismissed. When session is dismissed, all work is canceled.
Returns the ITextView this session is active on.
Commits the currently selected CompletionItem. Must be called on UI thread.
Instruction for the editor how to proceed after invoking this method
Name | Type | Description |
---|---|---|
typedChar | System.Char | The text edit which caused this action. May be default(char). |
token | System.Threading.CancellationToken | Token used to cancel this operation |
Commits the single CompletionItem or opens the completion UI. Must be called on UI thread.
Whether the unique item was committed.
Name | Type | Description |
---|---|---|
token | System.Threading.CancellationToken | Token used to cancel this operation |
Stops the session and hides associated UI. May be called from any thread.
This method has no parameters.
Gets suggestion items visible in the UI. This is a blocking call. As a side effect, prevents the UI from displaying.
This method has no parameters.
Gets items visible in the UI. This is a blocking call. As a side effect, prevents the UI from displaying.
This method has no parameters.
Gets currently selected item. This is a blocking call. As a side effect, prevents the UI from displaying.
This method has no parameters.
Request completion to be opened or updated in a given location, the completion items to be filtered and sorted, and the UI updated. Must be called on UI thread. Enqueues work on a worker thread.
Name | Type | Description |
---|---|---|
trigger | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTrigger | What caused completion |
triggerLocation | Microsoft.VisualStudio.Text.SnapshotPoint | Location of the trigger on the subject buffer |
token | System.Threading.CancellationToken | Token used to cancel this and other queued operation. |
Returns whether given text edit should result in committing this session. Since this method is on a typing hot path, it uses PotentialCommitCharacters to quickly return if typedChar
is not a potential commit character. Else, we map triggerLocation
to subject buffers and query ShouldCommitCompletion. Must be called on UI thread.
Name | Type | Description |
---|---|---|
typedChar | System.Char | The text edit which caused this action. May be null. |
triggerLocation | Microsoft.VisualStudio.Text.SnapshotPoint | Location on the view's top buffer |
token | System.Threading.CancellationToken | Token used to cancel this operation |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that provides CompletionItems and other information relevant to the completion feature at a specific SnapshotPoint.
Instances of this class should be created by IAsyncCompletionSourceProvider, which is a MEF part.
Called once per completion session to fetch the set of all completion items available at a given location. Called on a background thread.
A struct that holds completion items and applicable span
Name | Type | Description |
---|---|---|
trigger | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTrigger | What caused the completion |
triggerLocation | Microsoft.VisualStudio.Text.SnapshotPoint | Location where completion was triggered, on the subject buffer that matches this IAsyncCompletionSource's content type |
applicableSpan | Microsoft.VisualStudio.Text.SnapshotSpan | Location where completion will take place, on the view's top buffer |
Returns tooltip associated with provided completion item. The returned object will be rendered by IViewElementFactoryService. See its documentation for supported types. Called on a background thread, so UIElement may not be returned.
Return type is pending what we agree to describe GUI in cross platform fashion
Name | Type | Description |
---|---|---|
item | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem |
Provides the span applicable to the prospective session. Called on UI thread and expected to return very quickly, based on syntactic information. This method is called sequentially on available IAsyncCompletionSources until one of them returns true. Returning false does not exclude this source from participating in completion session. If no IAsyncCompletionSources return true, there will be no completion session.
Whether completion should use the supplied applicable span.
Name | Type | Description |
---|---|---|
typeChar | System.Char | Character typed by the user |
triggerLocation | Microsoft.VisualStudio.Text.SnapshotPoint | Location on the subject buffer that matches this IAsyncCompletionSource's content type |
applicableSpan | Microsoft.VisualStudio.Text.SnapshotSpan@ | Applicable span for the prospective completion session. You may set it to default(SnapshotSpan) if returning false. |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Provides instances of IAsyncCompletionSource which filters and sorts available CompletionItems given the current state of the editor.
[Export(typeof(IAsyncCompletionSourceProvider))] [Name(nameof(MyCompletionSource))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] public class MyCompletionSource : IAsyncCompletionSource
This is a MEF component and should be exported with [ContentType] and [Name] attributes and optional [TextViewRoles] attribute. Completion feature will request data from all exported IAsyncCompletionSources whose ContentType matches content type of any buffer in the completion's trigger location.
Creates an instance of IAsyncCompletionSource for the specified ITextView. Called on the UI thread.
Instance of IAsyncCompletionSource
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
Microsoft.VisualStudio.Language.Intellisense
Controls invocation and dismissal of Quick Info tooltips for ITextView instances.
This type can be called from any thread and will marshal its work to the UI thread as required.
Gets the current IAsyncQuickInfoSession for the ITextView.
The session, or null
if there is no active session.
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | The ITextView for which to lookup the session. |
Quick info is considered to be active if there is a visible, calculating, or recalculating quick info session.
Triggers Quick Info tooltip in the specified ITextView at the caret or optional triggerPoint
.
An IAsyncQuickInfoSession tracking the state of the session or null if there are no items.
Name | Type | Description |
---|---|---|
cancellationToken | Microsoft.VisualStudio.Text.Editor.ITextView | If canceled before the method returns, cancels any computations in progress. |
textView | Microsoft.VisualStudio.Text.ITrackingPoint | The ITextView for which Quick Info is to be triggered. |
triggerPoint | Microsoft.VisualStudio.Language.Intellisense.QuickInfoSessionOptions | The ITrackingPoint in the view's text buffer at which Quick Info should be triggered. |
options | System.Threading.CancellationToken | Options for customizing Quick Info behavior. |
Name | Description |
---|---|
System.OperationCanceledException |
cancellationToken was canceled by the caller or the operation was interrupted by another call to TriggerQuickInfoAsync
|
Microsoft.VisualStudio.Language.Intellisense
Tracks state of a visible or calculating Quick Info session.
The span of text to which this Quick Info session applies.
The ordered, merged collection of content to be displayed in the Quick Info.
This field is originally null and is updated with the content once the session has finished querying the providers.
Indicates that this Quick Info has interactive content that can request to stay open.
Specifies attributes of the Quick Info session and Quick Info session presentation.
The current state of the Quick Info session.
The ITextView for which this Quick Info session was created.
Dismisses the Quick Info session, if applicable. If the session is already dismissed, this method no-ops.
A task tracking the completion of the operation.
This method has no parameters.
Gets the point at which the Quick Info tip was triggered in the ITextView.
A ITrackingPoint indicating the point over which Quick Info was invoked.
Name | Type | Description |
---|---|---|
textBuffer | Microsoft.VisualStudio.Text.ITextBuffer | The ITextBuffer relative to which to obtain the point. |
Returned ITrackingPoint is on the buffer requested by the caller.
Gets the point at which the Quick Info tip was triggered in the ITextView.
The point over which Quick Info was invoked or null
if it does not exist in snapshot
.
Name | Type | Description |
---|---|---|
snapshot | Microsoft.VisualStudio.Text.ITextSnapshot | The ITextSnapshot relative to which to obtain the point. |
Returned point is on the buffer requested by the caller.
Microsoft.VisualStudio.Language.Intellisense
Source of Quick Info tooltip content item, proffered to the IDE by a IAsyncQuickInfoSourceProvider.
This class is always constructed and disposed on the UI thread and called on a non-UI thread. Callers that require the UI thread must explicitly marshal there with SwitchToMainThreadAsync. Content objects are resolved into UI constructs via the IViewElementFactoryService.
Gets Quick Info item and tracking span via a QuickInfoItem.
item and a tracking span for which these item are applicable.
Name | Type | Description |
---|---|---|
session | Microsoft.VisualStudio.Language.Intellisense.IAsyncQuickInfoSession | An object tracking the current state of the Quick Info. |
cancellationToken | System.Threading.CancellationToken | Cancels an in-progress computation. |
This method is always called on a background thread. Multiple elements can be be returned by a single source by wrapping them in a ContainerElement.
Microsoft.VisualStudio.Language.Intellisense
A MEF component part that is proffered to the IDE to construct an IAsyncQuickInfoSource.
[Export(typeof(IAsyncQuickInfoSourceProvider))] [Name("Foo QuickInfo Provider")] [Order(After = "default")] [ContentType("text")]
This class is always constructed and called on the UI thread.
Creates an IAsyncQuickInfoSource for the specified ITextBuffer.
An instance of IAsyncQuickInfoSource for textBuffer
or null if no source could be created.
Name | Type | Description |
---|---|---|
textBuffer | Microsoft.VisualStudio.Text.ITextBuffer | The ITextBuffer for which this source produces items. |
Microsoft.VisualStudio.Language.CodeLens
Represents an object describing a code element at the location where an ICodeLensTag will be created.
The Span of the element.
A short description of the element for which this descriptor is created.
The absolute file path of the document in which the descriptor is created.
The CodeElementKinds of the element.
The containing project of the document. Can be Empty if the document is a solution's miscellaneous file, or if it does not need to be specified.
Microsoft.VisualStudio.Language.CodeLens
An ITag indicating the place where CodeLens indicators should be created.
The descriptor for this tag.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that manages user interface for the completion feature. All methods are called on UI thread.
Instances of this class should be created by ICompletionPresenterProvider, which is a MEF part.
Hides the completion UI
This method has no parameters.
Opens the UI and displays provided data
Name | Type | Description |
---|---|---|
presentation | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionPresentationViewModel |
Displays provided data on the UI
Name | Type | Description |
---|---|---|
presentation | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionPresentationViewModel |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Represents a class that produces instances of ICompletionPresenter
[Export(typeof(ICompletionPresenterProvider))] [Name(nameof(MyCompletionPresenterProvider))] [ContentType("any")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = KnownCompletionNames.DefaultCompletionPresenter)] public class MyCompletionPresenterProvider : ICompletionPresenterProvider
This is a MEF component and should be exported with [ContentType] and [Name] attributes and optional [Order] attribute. An instance of ICompletionPresenterProvider is selected first by matching ContentType with content type of the view's top buffer, and then by Order. Only one ICompletionPresenterProvider is used in a given view.
Declares size of the jump when user presses PageUp and PageDown keys.
This value needs to be known before the UI is created, hence it is defined on this class instead of ICompletionPresenter. Note that ICompletionPresenter is just a view that doesn't participate in keyboard scrolling
Returns instance of ICompletionPresenter that will host completion for given ITextView
Instance of ICompletionPresenter
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
It is encouraged to reuse the UI over creating new UI each time this method is called.
Microsoft.VisualStudio.Language.Intellisense
Represents an interactive Quick Info content. This interface can be used to add an interactive content such as hyperlinks to the Quick Info popup. If any object implementing this interface is provided to IAsyncQuickInfoSource via GetQuickInfoItemAsync, the Quick Info presenter will allow to interact with this content, particulartly it will keep Quick Info popup open when mouse is over it and will allow this content to recieve mouse events.
Gets a value indicating whether the mouse pointer is located over this interactive Quick Info content, including any parts that are out of the Quick Info visual tree (such as popups).
Gets whether the interactive Quick Info content wants to keep current Quick Info session open. Until this property is true, the IAsyncQuickInfoSession containing this content won't be dismissed even if mouse is moved somewhere else. This is useful in very rare scenarios when an interactive Quick Info content handles all input interaction, while needs to keep this IAsyncQuickInfoSession open (the only known example so far is LightBulb in its expanded state hosted in Quick Info).
Microsoft.Internal.VisualStudio.Language.Intellisense
This interface supports the product infrastructure and should not be used.
This method supports the product infrastructure and should not be used.
This method has no parameters.
Microsoft.Internal.VisualStudio.Language.Intellisense
This interface supports the product infrastructure and should not be used.
Microsoft.Internal.VisualStudio.Language.Intellisense
This interface supports the product infrastructure and should not be used.
This interface supports the product infrastructure and should not be used.
This method has no parameters.
Microsoft.Internal.VisualStudio.Language.Intellisense
This interface supports the product infrastructure and should not be used.
This interface supports the product infrastructure and should not be used.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
There is no selected item. Completion UI will initially not appear. Pressing Tab will dismiss the invisible session. This option is used only in narrow corner cases.
Item is selected. It will be committed by pressing a commit character, e.g. a token delimeter, Tab, Enter and mouse click.
Item is soft selected. It will be committed only by pressing Tab or clicking the item.
Microsoft.Internal.VisualStudio.Language.Intellisense
This interface supports the product infrastructure and should not be used.
This is a MEF metadata view, similar to IContentTypeMetadata, however it uses an explicit metadata class to allow it to be internal. Internal MEF metadata view interfaces are supported but are currently suffering from intermittent type load exceptions resulting from a bug in either the CLR or VS MEF.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Provides names used by the Async Completion feature.
Name of the completion's ICommandHandler. Use to order your MEF part.
Name of the default IAsyncCompletionItemManagerProvider. Use to order your MEF part.
Name of the default ICompletionPresenterProvider. Use to order your MEF part.
Name of the editor option that stores user's preference for the completion mode.
Name of the editor option that stores user's preference for the completion mode during debugging.
Microsoft.VisualStudio.Language.Intellisense
The result generated by an IAsyncQuickInfoSource.
Constructs a new instance of QuickInfoItem.
Name | Type | Description |
---|---|---|
applicableToSpan | Microsoft.VisualStudio.Text.ITrackingSpan | The span to which item is applicable. |
item | System.Object | The Quick Info item. |
Name | Description |
---|---|
System.ArgumentNullException | Thrown if item is null. |
The ITrackingSpan to which Item is applicable.
This parameter can be null.
The item to be displayed in the Quick Info IToolTipPresenter.
Microsoft.VisualStudio.Language.Intellisense
Options for customization of Quick Info behavior.
No options.
Dismisses Quick Info when the mouse moves away.
Microsoft.VisualStudio.Language.Intellisense
Defines the possible IAsyncQuickInfoSession states.
Session is currently computing Quick Info content.
Session has been created but is not yet active.
Session has been dismissed and is no longer active.
Computation is complete and session is visible.
Microsoft.VisualStudio.Language.Intellisense
Creates a new instance of QuickInfoSessionStateChangedEventArgs.
Name | Type | Description |
---|---|---|
oldState | Microsoft.VisualStudio.Language.Intellisense.QuickInfoSessionState | The state before the transition. |
newState | Microsoft.VisualStudio.Language.Intellisense.QuickInfoSessionState | The state after the transition. |
The state after the transition.
The state before the transition.
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Instructs the editor if and how to display the suggestion mode completion. Suggestion mode displays a single CompletionItem whose DisplayText and InsertText is equal to text typed by the user so far. This class specifies the tooltip to use for this item, and DisplayText when user has not typed anything.
Creates instance of SuggestionModeOptions with specified text. Provide this instance to CompletionContext to activate suggestion mode.
Name | Type | Description |
---|---|---|
displayTextWhenEmpty | System.String | DisplayText for the suggestion item when user has not typed anything |
toolTipText | System.String | Tooltip for the suggestion item |
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
What triggered updating of completion.
Creates a UpdateTrigger associated with a text edit
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterReason | The kind of action that triggered completion to update |
character | System.Char | Character that triggered the update |
Creates a CompletionTrigger not associated with a text edit
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterReason | The kind of action that triggered completion to update |
The text edit associated with the triggering action.
The reason that completion was updated.