Modern completion API - microsoft/vs-editor-api GitHub Wiki
#
Contents- 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
- ICompletionPresenter
- ICompletionPresenterProvider
- InitialSelectionOption
- PredefinedCompletionNames
- SessionInitialData
- SessionInstantenousData
- SuggestionItemOptions
- UpdateTrigger
# =
Microsoft.VisualStudio.Language# =
CommitBehaviorNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Instructs the editor how to behave after invoking the custom commit method.
constants
# =
None Summary
Use the default behavior
constants
# =
RaiseFurtherCommandHandlers Summary
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.
constants
# =
SuppressFurtherCommandHandlers Summary
Surpresses further invocation of the TypeChar command handlers. By default, editor invoke these command handlers to enable features such as brace completion.
# =
CommitResultNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Tracks whether the commit occured, and provides instructions for behavior after committing.
constructor
# =
#ctor(isHandled,behavior) Summary
Creates a CommitResult with specified properties.
Parameters
Name | Type | Description |
---|---|---|
isHandled | System.Boolean | Whether the commit occured |
behavior | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CommitBehavior | Desired behavior after committing |
constants
# =
Handled Summary
Marks this commit as handled. No other IAsyncCompletionCommitManager will be asked to commit.
constants
# =
Unhandled Summary
Marks this commit as unhandled. Another IAsyncCompletionCommitManager will be asked to commit.
property
# =
Behavior Summary
Desired behavior after committing, respected even when IsHandled is unset.
property
# =
IsHandled Summary
Whether the commit occured. If true, no other IAsyncCompletionCommitManager will be asked to commit. If false, another IAsyncCompletionCommitManager will be asked to commit.
# =
CompletionClosedEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify completion's logic when the UI closes
constructor
# =
#ctor(textView) Summary
Constructs instance of CompletionClosedEventArgs.
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | ITextView that hosted this completion UI |
property
# =
TextView Summary
ITextView that hosted completion UI
# =
CompletionContextNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This type is used to transfer data from IAsyncCompletionSource to IAsyncCompletionBroker and further to IAsyncCompletionItemManager
constructor
# =
#ctor(items) Summary
Constructs CompletionContext with specified CompletionItems. Completion will use default selection and no suggestion mode, unless overriden by another IAsyncCompletionSource
Parameters
Name | Type | Description |
---|---|---|
items | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem} | Available completion items |
constructor
# =
#ctor(items,useSoftSelection,useSuggestionMode,suggestionModeDescription) Summary
Constructs CompletionContext with CompletionItems with specified suggestion mode and soft selection properties.
Parameters
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. |
constructor
# =
#ctor(items,useSoftSelection,suggestionModeOptions) Summary
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.
Parameters
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 |
constructor
# =
#ctor(items,useSoftSelection,suggestionModeOptions) Summary
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.
Parameters
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 |
constants
# =
Default Summary
Empty completion context, when IAsyncCompletionSource offers no items pertinent to given location.
property
# =
Items Summary
Set of completion items available at a location
property
# =
SuggestionModeOptions Summary
When set, uses suggestion mode with options specified in this object. When null, this context does not provide a suggestion mode item.
property
# =
UseSoftSelection Summary
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.
# =
CompletionFilterNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Identifies a filter that toggles exclusive display of CompletionItems that reference it.
Example
static CompletionFilter MyFilter = new CompletionFilter("My items", "m", MyItemsImageMoniker);
Remarks
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.
constructor
# =
#ctor(displayText,accessKey,image) Summary
Constructs an instance of CompletionFilter.
Parameters
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 |
property
# =
AccessKey Summary
Key used in a keyboard shortcut that toggles this filter.
property
# =
DisplayText Summary
Name of this filter.
property
# =
Image Summary
ImageElement that represents this filter.
# =
CompletionFilterChangedEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify completion's logic of selection change in the filter UI
constructor
# =
#ctor(filters) Summary
Constructs instance of CompletionFilterChangedEventArgs.
Parameters
Name | Type | Description |
---|---|---|
filters | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterWithState} | Current state of the filters |
property
# =
Filters Summary
Current state of the filters
# =
CompletionFilterReasonNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Describes the kind of action that triggered completion to filter.
constants
# =
Deletion Summary
Completion was triggered via an action deleting a character from the document.
constants
# =
FilterChange Summary
Update was triggered by changing filters
constants
# =
Initial Summary
Completion was triggered by a direct invocation of the completion feature using the Edit.ListMember command.
constants
# =
Insertion Summary
Completion was triggered via an action inserting a character into the document.
# =
CompletionFilterWithStateNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Immutable data transfer object used to communicate between the completion session and completion UI
constructor
# =
#ctor(filter,isAvailable) Summary
Constructs a new instance of CompletionFilterWithState.
Parameters
Name | Type | Description |
---|---|---|
filter | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilter | Reference to CompletionFilter |
isAvailable | System.Boolean | Whether this CompletionFilter is available |
constructor
# =
#ctor(filter,isAvailable,isSelected) Summary
Constructs a new instance of CompletionFilterWithState when selected state is known.
Parameters
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 |
property
# =
Filter Summary
Reference to the completion filter
property
# =
IsAvailable Summary
Whether the filter is available. Filter should be available when there are visible CompletionItems that define this Filter in their Filters
property
# =
IsSelected Summary
Whether the filter is selected by the user.
method
# =
ToString() Summary
Override for nice debugger display
Parameters
This method has no parameters.
method
# =
WithAvailability(isAvailable) Summary
Returns instance of CompletionFilterWithState with specified IsAvailable
Returns
Updated instance of CompletionFilterWithState
Parameters
Name | Type | Description |
---|---|---|
isAvailable | System.Boolean | Value to use for IsAvailable |
method
# =
WithSelected(availability) Summary
Returns instance of CompletionFilterWithState with specified IsSelected
Returns
Updated instance of CompletionFilterWithState
Parameters
Name | Type | Description |
---|---|---|
availability | System.Boolean | Value to use for IsSelected |
# =
CompletionItemNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class, returned from IAsyncCompletionSource, represents a single entry to be displayed in the completion UI. This class implements IPropertyOwner
constructor
# =
#ctor(displayText,source,icon,suffix) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters,suffix) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons) Summary
Creates a completion item, allowing customization of all of its properties.
Parameters
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 |
constructor
# =
#ctor(displayText,source) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,suffix) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters,suffix) Summary
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.
Parameters
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 |
constructor
# =
#ctor(displayText,source,icon,filters,suffix,insertText,sortText,filterText,attributeIcons) Summary
Creates a completion item, allowing customization of all of its properties.
Parameters
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 |
property
# =
AttributeIcons Summary
Additional images to display in the UI. Usually, these images are displayed on the far right side of the UI.
property
# =
DisplayText Summary
Text used in the UI
property
# =
Filters Summary
ImmutableArray of references to CompletionFilters applicable to this item
property
# =
FilterText Summary
Text used by IAsyncCompletionItemManager when matching against the applicable span
property
# =
Icon Summary
Image displayed in the UI
property
# =
InsertText Summary
Text inserted when completing this item
property
# =
Properties Summary
The collection of properties controlled by the property owner. See Properties
property
# =
SortText Summary
Text used by IAsyncCompletionItemManager when sorting against other items
property
# =
Source Summary
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
property
# =
Suffix Summary
Additional text to display in the UI, after DisplayText. This text has less emphasis than DisplayText and is usually right-aligned.
# =
CompletionItemEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify of an operation that affects a single CompletionItem.
constructor
# =
#ctor() Summary
Constructs instance of CompletionItemEventArgs.
Parameters
This constructor has no parameters.
property
# =
Item Summary
Relevant item
# =
CompletionItemSelectedEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify completion's logic of selecting through the UI
constructor
# =
#ctor(selectedItem,suggestionModeSelected) Summary
Constructs instance of CompletionItemSelectedEventArgs.
Parameters
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 |
property
# =
SelectedItem Summary
Selected item. Might be null if there is no selection
property
# =
SuggestionModeSelected Summary
Whether selected item is a suggestion mode item
# =
CompletionItemSelectionNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
constants
# =
NoChange Summary
Don't change the current selection mode.
constants
# =
Selected Summary
Set selection mode to regular selection: item is committed using Tab, mouse, enter and commit characters.
constants
# =
SoftSelected Summary
Set selection mode to soft selection: item is committed only using Tab or mouse.
# =
CompletionItemsWithHighlightEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify of an operation that affects multiple CompletionItemWithHighlights.
constructor
# =
#ctor() Summary
Constructs instance of CompletionItemEventArgs.
Parameters
This constructor has no parameters.
property
# =
Items Summary
Relevant items
# =
CompletionItemWithHighlightNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Wraps CompletionItem with information about highlighted parts of its DisplayText.
constructor
# =
#ctor(completionItem) Summary
Constructs CompletionItemWithHighlight without any highlighting. Used when the CompletionItem appears in the completion list without being a text match.
Parameters
Name | Type | Description |
---|---|---|
completionItem | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem | Instance of the CompletionItem |
constructor
# =
#ctor(completionItem,highlightedSpans) Summary
Constructs CompletionItemWithHighlight with given highlighting. Used when text used to filter the completion list can be found in the DisplayText.
Parameters
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 |
property
# =
CompletionItem Summary
The completion item
property
# =
HighlightedSpans Summary
Which parts of DisplayText to highlight
# =
CompletionPresentationViewModelNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class contains completion items, filters and other pieces of information used by ICompletionPresenter to render the completion UI.
constructor
# =
#ctor(items,filters,applicableSpan,useSoftSelection,useSuggestionMode,selectSuggestionMode,selectedItemIndex,suggestionModeItem) Summary
Constructs CompletionPresentationViewModel
Parameters
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 |
property
# =
ApplicableSpan Summary
Span pertinent to the completion session.
property
# =
Filters Summary
Completion filters with their available and selected state.
property
# =
Items Summary
Completion items to display with their highlighted spans.
property
# =
SelectedItemIndex Summary
Controls which item is selected. Use -1 in suggestion mode.
property
# =
SelectSuggestionMode Summary
Controls whether suggestion mode item is selected.
property
# =
SuggestionItemOptions Summary
How to display the suggestion mode completion.
property
# =
SuggestionModeItem Summary
Suggestion mode item to display.
property
# =
UseSoftSelection Summary
Controls whether selected item should be soft selected.
property
# =
UseSuggestionMode Summary
Controls whether suggestion mode item is visible.
# =
CompletionTriggerNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
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.
constructor
# =
#ctor(reason,character) Summary
Creates a CompletionTrigger associated with a text edit
Parameters
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 |
constructor
# =
#ctor(reason) Summary
Creates a CompletionTrigger not associated with a text edit
Parameters
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionTriggerReason | The kind of action that triggered completion to start |
property
# =
Character Summary
The text edit associated with the triggering action.
property
# =
Reason Summary
The reason that completion was started.
# =
CompletionTriggeredEventArgsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class is used to notify about new IAsyncCompletionSession being triggered
constructor
# =
#ctor(completionSession,textView) Summary
Constructs instance of CompletionItemSelectedEventArgs.
Parameters
Name | Type | Description |
---|---|---|
completionSession | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession | Newly created IAsyncCompletionSession |
textView | Microsoft.VisualStudio.Text.Editor.ITextView | ITextView where completion was triggered |
property
# =
CompletionSession Summary
Newly created IAsyncCompletionSession.
property
# =
TextView Summary
ITextView where completion was triggered.
# =
CompletionTriggerReasonNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Describes the kind of action that initially triggered completion to open.
constants
# =
Deletion Summary
Completion was triggered via an action deleting a character from the document.
constants
# =
Insertion Summary
Completion was triggered via an action inserting a character into the document.
constants
# =
Invoke Summary
Completion was triggered by a direct invocation of the completion feature using the Edit.ListMember command.
constants
# =
InvokeAndCommitIfUnique Summary
Completion was triggered with a request to commit if a single item would be selected using the Edit.CompleteWord command.
constants
# =
Snippets Summary
Completion was triggered for snippets only.
# =
FilteredCompletionModelNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
This class, returned from IAsyncCompletionItemManager, contains completion items to display in the UI, recommended item to display, selection mode and available filters.
constructor
# =
#ctor(items,selectedItemIndex) Summary
Constructs FilteredCompletionModel without completion filters.
Parameters
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. |
constructor
# =
#ctor(items,selectedItemIndex,filters) Summary
Constructs FilteredCompletionModel with completion filters.
Parameters
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. |
constructor
# =
#ctor(items,selectedItemIndex,filters,selectionMode,uniqueItem) Summary
Constructs FilteredCompletionModel with completion filters, indication regarding selection mode and the unique item
Parameters
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. |
property
# =
CenterSelection Summary
Whether selected item should be displayed in the center of the list. Usually, this is true
property
# =
Filters Summary
Completion filters with their availability and selection state.
property
# =
Items Summary
Items to display in the completion UI.
property
# =
SelectedItemIndex Summary
Recommended item index to select. Presence of a suggestion mode item may override
property
# =
SelectionMode Summary
Controls the selection mode of the selected item.
property
# =
UniqueItem Summary
Optionally, provides an item that should be committed using the "commit if unique" command.
# =
IAsyncCompletionBrokerNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
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.
Example
[Import] IAsyncCompletionBroker CompletionBroker { get; set; }
method
# =
GetSession(textView) Summary
Returns IAsyncCompletionSession if active or null if not
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
method
# =
IsCompletionActive(textView) Summary
Returns whether completion is active in given view
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | View that hosts completion and relevant buffers |
method
# =
IsCompletionSupported(textView) Summary
Returns whether there are any completion item sources available for the top buffer in the provided view.
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Utilities.IContentType | View to check for available completion source exports |
method
# =
TriggerCompletion(textView,triggerLocation,typeChar) Summary
Activates completion and returns IAsyncCompletionSession. If completion was already active, returns the existing session without changing it. Must be invoked on UI thread.
Parameters
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 |
# =
IAsyncCompletionCommitManagerNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Represents a class that provides means to commit CompletionItems and other information relevant to the completion feature at a specific SnapshotPoint.
Remarks
Instances of this class should be created by IAsyncCompletionCommitManagerProvider, which is a MEF part.
property
# =
PotentialCommitCharacters Summary
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.
method
# =
ShouldCommitCompletion(typeChar,location) Summary
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.
Returns
True if this character should commit the active session.
Parameters
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. |
method
# =
TryCommit(view,buffer,item,applicableSpan,typedChar,token) Summary
Requests commit of specified CompletionItem. Called on UI thread.
Returns
Instruction for the editor how to proceed after invoking this method
Parameters
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 |
# =
IAsyncCompletionCommitManagerProviderNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Provides instances of IAsyncCompletionItemManager which filters and sorts available CompletionItems given the current state of the editor.
Example
[Export(typeof(IAsyncCompletionCommitManagerProvider))] [Name(nameof(MyCompletionCommitManagerProvider))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = "OtherCompletionCommitManager")] public class MyCompletionCommitManagerProvider : IAsyncCompletionCommitManagerProvider
Remarks
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.
method
# =
GetOrCreate(textView) Summary
Creates an instance of IAsyncCompletionCommitManager for the specified ITextView.
Returns
Instance of IAsyncCompletionItemManager
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
# =
IAsyncCompletionItemManagerNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
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.
Remarks
Instances of this class should be created by IAsyncCompletionItemManagerProvider, which is a MEF part.
method
# =
SortCompletionListAsync(session,data,token) Summary
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 UpdateCompletionListAsyncsession
tracks user user's input tracked with ApplicableSpan. data
provides applicable Snapshot and
Returns
Instance of FilteredCompletionModel that contains completion items to render, filters to display and recommended item to select
Parameters
Name | Type | Description |
---|---|---|
session | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession | The active IAsyncCompletionSession. See ApplicableSpan and TextView |
data | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.SessionInitialData | Contains properties applicable at the time this method is invoked. |
token | System.Threading.CancellationToken | Cancellation token that may interrupt this operation |
method
# =
UpdateCompletionListAsync(session,data,token) Summary
This method is first called before completion is about to appear, and then on subsequent typing events and when user toggles completion filters. session
tracks user user's input tracked with ApplicableSpan. data
provides applicable Snapshot and and SelectedFilterss that indicate user's filter selection.
Returns
Instance of FilteredCompletionModel that contains completion items to render, filters to display and recommended item to select
Parameters
Name | Type | Description |
---|---|---|
session | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession | The active IAsyncCompletionSession. See ApplicableSpan and TextView |
data | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.SessionInstantenousData | Contains properties applicable at the time this method is invoked. |
token | System.Threading.CancellationToken | Cancellation token that may interrupt this operation |
# =
IAsyncCompletionItemManagerProviderNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Provides instances of IAsyncCompletionItemManager which filters and sorts available CompletionItems given the current state of the editor.
Example
[Export(typeof(IAsyncCompletionItemManagerProvider))] [Name(nameof(MyCompletionItemManagerProvider))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = "OtherCompletionItemManager")] public class MyCompletionItemManagerProvider : IAsyncCompletionItemManagerProvider
Remarks
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.
method
# =
GetOrCreate(textView) Summary
Creates an instance of IAsyncCompletionItemManager for the specified ITextView.
Returns
Instance of IAsyncCompletionItemManager
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
# =
IAsyncCompletionSessionNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Represents a class that tracks completion within a single ITextView. Constructed and managed by an instance of IAsyncCompletionBroker
property
# =
ApplicableSpan Summary
Gets span applicable to this completion session. The span is defined on the session's TextBuffer.
property
# =
IsDismissed Summary
Returns whether session is dismissed. When session is dismissed, all work is canceled.
property
# =
TextView Summary
Returns the ITextView this session is active on.
method
# =
Commit(typedChar,token) Summary
Commits the currently selected CompletionItem. Must be called on UI thread.
Returns
Instruction for the editor how to proceed after invoking this method
Parameters
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 |
method
# =
CommitIfUnique(token) Summary
Commits the single CompletionItem or opens the completion UI. Must be called on UI thread.
Returns
Whether the unique item was committed.
Parameters
Name | Type | Description |
---|---|---|
token | System.Threading.CancellationToken | Token used to cancel this operation |
method
# =
Dismiss() Summary
Stops the session and hides associated UI. May be called from any thread.
Parameters
This method has no parameters.
method
# =
GetBuilderItems() Summary
Gets suggestion items visible in the UI. This is a blocking call. As a side effect, prevents the UI from displaying.
Parameters
This method has no parameters.
method
# =
GetItems() Summary
Gets items visible in the UI. This is a blocking call. As a side effect, prevents the UI from displaying.
Parameters
This method has no parameters.
method
# =
GetSelectedItem() Summary
Gets currently selected item. This is a blocking call. As a side effect, prevents the UI from displaying.
Parameters
This method has no parameters.
method
# =
OpenOrUpdate(trigger,triggerLocation,token) Summary
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.
Parameters
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. |
method
# =
ShouldCommit(typedChar,triggerLocation,token) Summary
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.
Returns
Parameters
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 |
# =
IAsyncCompletionSourceNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Represents a class that provides CompletionItems and other information relevant to the completion feature at a specific SnapshotPoint.
Remarks
Instances of this class should be created by IAsyncCompletionSourceProvider, which is a MEF part.
method
# =
GetCompletionContextAsync(trigger,triggerLocation,applicableSpan) Summary
Called once per completion session to fetch the set of all completion items available at a given location. Called on a background thread.
Returns
A struct that holds completion items and applicable span
Parameters
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 |
method
# =
GetDescriptionAsync(item) Summary
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.
Returns
Return type is pending what we agree to describe GUI in cross platform fashion
Parameters
Name | Type | Description |
---|---|---|
item | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionItem |
method
# =
TryGetApplicableSpan(typeChar,triggerLocation,applicableSpan) Summary
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.
Returns
Whether completion should use the supplied applicable span.
Parameters
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. |
# =
IAsyncCompletionSourceProviderNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Provides instances of IAsyncCompletionSource which filters and sorts available CompletionItems given the current state of the editor.
Example
[Export(typeof(IAsyncCompletionSourceProvider))] [Name(nameof(MyCompletionSource))] [ContentType("text")] [TextViewRoles(PredefinedTextViewRoles.Editable)] public class MyCompletionSource : IAsyncCompletionSource
Remarks
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.
method
# =
GetOrCreate(textView) Summary
Creates an instance of IAsyncCompletionSource for the specified ITextView. Called on the UI thread.
Returns
Instance of IAsyncCompletionSource
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
# =
ICompletionPresenterNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Represents a class that manages user interface for the completion feature. All methods are called on UI thread.
Remarks
Instances of this class should be created by ICompletionPresenterProvider, which is a MEF part.
method
# =
Close() Summary
Hides the completion UI
Parameters
This method has no parameters.
method
# =
Open(presentation) Summary
Opens the UI and displays provided data
Parameters
Name | Type | Description |
---|---|---|
presentation | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionPresentationViewModel |
method
# =
Update(presentation) Summary
Displays provided data on the UI
Parameters
Name | Type | Description |
---|---|---|
presentation | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionPresentationViewModel |
# =
ICompletionPresenterProviderNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Represents a class that produces instances of ICompletionPresenter
Example
[Export(typeof(ICompletionPresenterProvider))] [Name(nameof(MyCompletionPresenterProvider))] [ContentType("any")] [TextViewRoles(PredefinedTextViewRoles.Editable)] [Order(Before = KnownCompletionNames.DefaultCompletionPresenter)] public class MyCompletionPresenterProvider : ICompletionPresenterProvider
Remarks
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.
property
# =
ResultsPerPage Summary
Declares size of the jump when user presses PageUp and PageDown keys.
Remarks
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
method
# =
GetOrCreate(textView) Summary
Returns instance of ICompletionPresenter that will host completion for given ITextView
Returns
Instance of ICompletionPresenter
Parameters
Name | Type | Description |
---|---|---|
textView | Microsoft.VisualStudio.Text.Editor.ITextView | Text view that will host the completion. Completion acts on buffers of this view. |
Remarks
It is encouraged to reuse the UI over creating new UI each time this method is called.
# =
InitialSelectionOptionNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
constants
# =
NoSelection Summary
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.
constants
# =
RegularSelection Summary
Item is selected. It will be committed by pressing a commit character, e.g. a token delimeter, Tab, Enter and mouse click.
constants
# =
SoftSelection Summary
Item is soft selected. It will be committed only by pressing Tab or clicking the item.
# =
PredefinedCompletionNamesNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
Provides names used by the Async Completion feature.
constants
# =
CompletionCommandHandlers Summary
Name of the completion's ICommandHandler. Use to order your MEF part.
constants
# =
DefaultCompletionItemManager Summary
Name of the default IAsyncCompletionItemManagerProvider. Use to order your MEF part.
constants
# =
DefaultCompletionPresenter Summary
Name of the default ICompletionPresenterProvider. Use to order your MEF part.
constants
# =
SuggestionModeInCompletionOptionName Summary
Name of the editor option that stores user's preference for the completion mode.
constants
# =
SuggestionModeInDebuggerCompletionOptionName Summary
Name of the editor option that stores user's preference for the completion mode during debugging.
Namespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
Summary
Contains data of IAsyncCompletionSession valid at a specific, instantenous moment pertinent to current computation. This data is passed to IAsyncCompletionItemManager to initially sort the list prior to filtering and selecting.
constructor
# =
#ctor(initialList,snapshot,initialTrigger) Summary
Constructs SessionInitialData
Parameters
Name | Type | Description |
---|---|---|
initialList | System.Collections.Immutable.ImmutableArray{Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem} | Set of CompletionItems to sort |
snapshot | Microsoft.VisualStudio.Text.ITextSnapshot | The ITextSnapshot applicable for this computation. The snapshot comes from the view's top buffer |
initialTrigger | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.InitialTrigger | The InitialTrigger that started this completion session |
property
# =
InitialList Summary
Set of CompletionItems to sort.
property
# =
InitialTrigger Summary
The InitialTrigger that started this completion session.
property
# =
Snapshot Summary
The ITextSnapshot applicable for this computation. The snapshot comes from the view's top buffer.
# =
SessionInstantenousDataNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
Summary
Contains data of IAsyncCompletionSession valid at a specific, instantenous moment pertinent to current computation. This data is passed to IAsyncCompletionItemManager to filter the list and select appropriate item.
constructor
# =
#ctor(initialSortedList,snapshot,initialTrigger,updateTrigger,selectedFilters,isSoftSelected,isUnavailable) Summary
Constructs SessionInstantenousData
Parameters
property
# =
InitialSortedList Summary
Set of CompletionItems to filter and sort, originally returned from SortCompletionListAsync.
property
# =
InitialTrigger Summary
The InitialTrigger that started this completion session.
property
# =
IsSoftSelected Summary
Inidicates whether the session is using soft selection
property
# =
IsUnavailable Summary
Inidicates whether completion is in special mode where it is invisible.
property
# =
SelectedFilters Summary
Filters, their availability and selection state.
property
# =
Snapshot Summary
The ITextSnapshot applicable for this computation. The snapshot comes from the view's top buffer.
property
# =
UpdateTrigger Summary
The UpdateTrigger for this update.
# =
SuggestionItemOptionsNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
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.
constructor
# =
#ctor(displayTextWhenEmpty,toolTipText) Summary
Creates instance of SuggestionModeOptions with specified text. Provide this instance to CompletionContext to activate suggestion mode.
Parameters
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 |
# =
UpdateTriggerNamespace
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Summary
What triggered updating of completion.
constructor
# =
#ctor(reason,character) Summary
Creates a UpdateTrigger associated with a text edit
Parameters
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 |
constructor
# =
#ctor(reason) Summary
Creates a CompletionTrigger not associated with a text edit
Parameters
Name | Type | Description |
---|---|---|
reason | Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.CompletionFilterReason | The kind of action that triggered completion to update |
property
# =
Character Summary
The text edit associated with the triggering action.
property
# =
Reason Summary
The reason that completion was updated.