C# Класс Microsoft.Languages.Editor.Completion.CompletionController

Base completion controller. Not language specific.
Наследование: IIntellisenseController
Показать файл Открыть проект

Открытые методы

Метод Описание
CommitCompletionSession ( ) : bool

Close the completion dropdown, commit the selected item to the text view.

CommitCompletionSession ( char typedCharacter ) : bool

Close the completion dropdown, commit the selected item to the text view. Used when typing a char, use the one without a typed char for CompleteWord command

ConnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
Detach ( ITextView textView ) : void
DisconnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
DismissAllSessions ( ) : void

Close any sessions that I am showing

DismissCompletionSession ( ) : void

Close the completion dropdown, don't make any changes

DismissQuickInfoSession ( ITextView textView ) : void
DismissSignatureSession ( ITextView textView, ICoreShell shell ) : void
FilterCompletionSession ( ) : void

Restricts the set of completions to those that match the applicability text of the completion set, and then determines the best match. R is case-sensitive so 't' is different from 'T' (the latter is a shortcut for 'TRUE').

HandleCommand ( System.Guid group, int id, object inputArg ) : bool

Allows custom completion presenters to intercept commands

HasActiveSignatureSession ( ITextView textView, ICoreShell shell ) : bool

Is there an active signature help session? (is the tooltip showing?)

IsClosingChar ( char typedCharacter ) : bool

In some languages completion needs to know if a character is a 'closing' character. Closing character typically tells if user finished typing certain fragment. This might be semicolon in C# or JScript, closing angle bracked in HTML etc. Upon closing character language may choose to autoformat code, dismiss intellisense or change intellisense presenter.

IsCommitChar ( char typedCharacter ) : bool

Should this key press commit a completion session?

IsMuteCharacter ( char typedCharacter ) : bool

True if character should be 'eaten' when session completes rather than passed to the core editor controller. For example, '=' symbol is ignored in HTML completion since on = HTML editor inserts ="" which already contains equals.

IsTriggerChar ( char typedCharacter ) : bool

Should this key press start a completion session?

OnCompleteWord ( ) : void

Called when the user executes a command that should show the completion list, and also automatically completes the current word if possible

OnPostTypeChar ( char typedCharacter ) : void

Called when the user types a character, after it shows up in the text view

OnPreTypeChar ( char typedCharacter ) : bool

Called when the user types a character, but before it shows up in the text view.

OnShowMemberList ( bool filterList ) : void

Called when the user executes a command that should show the completion list

OnShowQuickInfo ( ) : void

Called when the user executes a command that should show the signature help tooltip

OnShowSignatureHelp ( ) : void

Called when the user executes a command that should show the signature help tooltip

ShowCompletion ( bool autoShownCompletion ) : ICompletionSession

Show the completion dropdown if it isn't showing already

ShowSignature ( bool autoShown ) : void

Shows the signature help tooltip if it isn't showing already

TriggerCompletion ( ) : ICompletionSession
TriggerSignatureHelp ( ) : void

Защищенные методы

Метод Описание
CanCommitCompletionSession ( char typedCharacter ) : bool
CanDismissSignatureOnCommit ( ) : bool
CommitUniqueCompletionSession ( ) : void

Only commit the completion selection if there is a unique choice in the list

HasActiveSignatureSession ( ITextView textView ) : bool
IsAutoShownCompletion ( ) : bool

Determines if current completion session is automatically invoked such as when user types a trigger character. Oppisite is when user explicitly invokes Edit > Intellisense > Show Members or similar command such as Ctrl+J or Ctrl+Space.

IsRetriggerChar ( ICompletionSession session, char typedCharacter ) : bool

If completion is already showing, should this keypress start a new session?

OnCompletionSessionCommitted ( object sender, EventArgs eventArgs ) : void
OnCompletionSessionDismissed ( object sender, EventArgs eventArgs ) : void
OnPostTypeClosingChar ( char typedCharacter ) : void

Invoked if user typed a closing character. IsClosingChar

OnPostTypeCompletionChar ( char typedCharacter ) : void
OnPreTypeCompletionChar ( char typedCharacter ) : void
ShowSignatureAndCompletion ( bool autoShownSignature, bool autoShownCompletion ) : void

The signature and completion MUST be shown in a specific order, so use this function to get the order correct.

UpdateInsertionText ( ) : void

Gives derived controllers a chance to update CompletionSession.SelectedCompletionSet.SelectionStatus.Completion.InsertionText

Приватные методы

Метод Описание
ClearCompletionSession ( ) : void
CompletionController ( ITextView textView, IList subjectBuffers, ICompletionBroker completionBroker, IQuickInfoBroker quickInfoBroker, ISignatureHelpBroker signatureBroker, ICoreShell shell ) : System

Описание методов

CanCommitCompletionSession() защищенный Метод

protected CanCommitCompletionSession ( char typedCharacter ) : bool
typedCharacter char
Результат bool

CanDismissSignatureOnCommit() защищенный Метод

protected CanDismissSignatureOnCommit ( ) : bool
Результат bool

CommitCompletionSession() публичный Метод

Close the completion dropdown, commit the selected item to the text view.
public CommitCompletionSession ( ) : bool
Результат bool

CommitCompletionSession() публичный Метод

Close the completion dropdown, commit the selected item to the text view. Used when typing a char, use the one without a typed char for CompleteWord command
public CommitCompletionSession ( char typedCharacter ) : bool
typedCharacter char
Результат bool

CommitUniqueCompletionSession() защищенный Метод

Only commit the completion selection if there is a unique choice in the list
protected CommitUniqueCompletionSession ( ) : void
Результат void

ConnectSubjectBuffer() публичный абстрактный Метод

public abstract ConnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
subjectBuffer ITextBuffer
Результат void

Detach() публичный Метод

public Detach ( ITextView textView ) : void
textView ITextView
Результат void

DisconnectSubjectBuffer() публичный абстрактный Метод

public abstract DisconnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
subjectBuffer ITextBuffer
Результат void

DismissAllSessions() публичный Метод

Close any sessions that I am showing
public DismissAllSessions ( ) : void
Результат void

DismissCompletionSession() публичный Метод

Close the completion dropdown, don't make any changes
public DismissCompletionSession ( ) : void
Результат void

DismissQuickInfoSession() публичный Метод

public DismissQuickInfoSession ( ITextView textView ) : void
textView ITextView
Результат void

DismissSignatureSession() публичный статический Метод

public static DismissSignatureSession ( ITextView textView, ICoreShell shell ) : void
textView ITextView
shell ICoreShell
Результат void

FilterCompletionSession() публичный Метод

Restricts the set of completions to those that match the applicability text of the completion set, and then determines the best match. R is case-sensitive so 't' is different from 'T' (the latter is a shortcut for 'TRUE').
public FilterCompletionSession ( ) : void
Результат void

HandleCommand() публичный Метод

Allows custom completion presenters to intercept commands
public HandleCommand ( System.Guid group, int id, object inputArg ) : bool
group System.Guid
id int
inputArg object
Результат bool

HasActiveSignatureSession() защищенный Метод

protected HasActiveSignatureSession ( ITextView textView ) : bool
textView ITextView
Результат bool

HasActiveSignatureSession() публичный статический Метод

Is there an active signature help session? (is the tooltip showing?)
public static HasActiveSignatureSession ( ITextView textView, ICoreShell shell ) : bool
textView ITextView
shell ICoreShell
Результат bool

IsAutoShownCompletion() защищенный Метод

Determines if current completion session is automatically invoked such as when user types a trigger character. Oppisite is when user explicitly invokes Edit > Intellisense > Show Members or similar command such as Ctrl+J or Ctrl+Space.
protected IsAutoShownCompletion ( ) : bool
Результат bool

IsClosingChar() публичный Метод

In some languages completion needs to know if a character is a 'closing' character. Closing character typically tells if user finished typing certain fragment. This might be semicolon in C# or JScript, closing angle bracked in HTML etc. Upon closing character language may choose to autoformat code, dismiss intellisense or change intellisense presenter.
public IsClosingChar ( char typedCharacter ) : bool
typedCharacter char
Результат bool

IsCommitChar() публичный Метод

Should this key press commit a completion session?
public IsCommitChar ( char typedCharacter ) : bool
typedCharacter char
Результат bool

IsMuteCharacter() публичный Метод

True if character should be 'eaten' when session completes rather than passed to the core editor controller. For example, '=' symbol is ignored in HTML completion since on = HTML editor inserts ="" which already contains equals.
public IsMuteCharacter ( char typedCharacter ) : bool
typedCharacter char
Результат bool

IsRetriggerChar() защищенный Метод

If completion is already showing, should this keypress start a new session?
protected IsRetriggerChar ( ICompletionSession session, char typedCharacter ) : bool
session ICompletionSession
typedCharacter char
Результат bool

IsTriggerChar() публичный Метод

Should this key press start a completion session?
public IsTriggerChar ( char typedCharacter ) : bool
typedCharacter char
Результат bool

OnCompleteWord() публичный Метод

Called when the user executes a command that should show the completion list, and also automatically completes the current word if possible
public OnCompleteWord ( ) : void
Результат void

OnCompletionSessionCommitted() защищенный Метод

protected OnCompletionSessionCommitted ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Результат void

OnCompletionSessionDismissed() защищенный Метод

protected OnCompletionSessionDismissed ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Результат void

OnPostTypeChar() публичный Метод

Called when the user types a character, after it shows up in the text view
public OnPostTypeChar ( char typedCharacter ) : void
typedCharacter char
Результат void

OnPostTypeClosingChar() защищенный Метод

Invoked if user typed a closing character. IsClosingChar
protected OnPostTypeClosingChar ( char typedCharacter ) : void
typedCharacter char
Результат void

OnPostTypeCompletionChar() защищенный Метод

protected OnPostTypeCompletionChar ( char typedCharacter ) : void
typedCharacter char
Результат void

OnPreTypeChar() публичный Метод

Called when the user types a character, but before it shows up in the text view.
public OnPreTypeChar ( char typedCharacter ) : bool
typedCharacter char
Результат bool

OnPreTypeCompletionChar() защищенный Метод

protected OnPreTypeCompletionChar ( char typedCharacter ) : void
typedCharacter char
Результат void

OnShowMemberList() публичный Метод

Called when the user executes a command that should show the completion list
public OnShowMemberList ( bool filterList ) : void
filterList bool
Результат void

OnShowQuickInfo() публичный Метод

Called when the user executes a command that should show the signature help tooltip
public OnShowQuickInfo ( ) : void
Результат void

OnShowSignatureHelp() публичный Метод

Called when the user executes a command that should show the signature help tooltip
public OnShowSignatureHelp ( ) : void
Результат void

ShowCompletion() публичный Метод

Show the completion dropdown if it isn't showing already
public ShowCompletion ( bool autoShownCompletion ) : ICompletionSession
autoShownCompletion bool
Результат ICompletionSession

ShowSignature() публичный Метод

Shows the signature help tooltip if it isn't showing already
public ShowSignature ( bool autoShown ) : void
autoShown bool
Результат void

ShowSignatureAndCompletion() защищенный Метод

The signature and completion MUST be shown in a specific order, so use this function to get the order correct.
protected ShowSignatureAndCompletion ( bool autoShownSignature, bool autoShownCompletion ) : void
autoShownSignature bool
autoShownCompletion bool
Результат void

TriggerCompletion() публичный Метод

public TriggerCompletion ( ) : ICompletionSession
Результат ICompletionSession

TriggerSignatureHelp() публичный Метод

public TriggerSignatureHelp ( ) : void
Результат void

UpdateInsertionText() защищенный Метод

Gives derived controllers a chance to update CompletionSession.SelectedCompletionSet.SelectionStatus.Completion.InsertionText
protected UpdateInsertionText ( ) : void
Результат void