C# Class Microsoft.Languages.Editor.Completion.CompletionController

Base completion controller. Not language specific.
Inheritance: IIntellisenseController
Afficher le fichier Open project: Microsoft/RTVS

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
ClearCompletionSession ( ) : void
CompletionController ( ITextView textView, IList subjectBuffers, ICompletionBroker completionBroker, IQuickInfoBroker quickInfoBroker, ISignatureHelpBroker signatureBroker, ICoreShell shell ) : System

Method Details

CanCommitCompletionSession() protected méthode

protected CanCommitCompletionSession ( char typedCharacter ) : bool
typedCharacter char
Résultat bool

CanDismissSignatureOnCommit() protected méthode

protected CanDismissSignatureOnCommit ( ) : bool
Résultat bool

CommitCompletionSession() public méthode

Close the completion dropdown, commit the selected item to the text view.
public CommitCompletionSession ( ) : bool
Résultat bool

CommitCompletionSession() public méthode

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
Résultat bool

CommitUniqueCompletionSession() protected méthode

Only commit the completion selection if there is a unique choice in the list
protected CommitUniqueCompletionSession ( ) : void
Résultat void

ConnectSubjectBuffer() public abstract méthode

public abstract ConnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
subjectBuffer ITextBuffer
Résultat void

Detach() public méthode

public Detach ( ITextView textView ) : void
textView ITextView
Résultat void

DisconnectSubjectBuffer() public abstract méthode

public abstract DisconnectSubjectBuffer ( ITextBuffer subjectBuffer ) : void
subjectBuffer ITextBuffer
Résultat void

DismissAllSessions() public méthode

Close any sessions that I am showing
public DismissAllSessions ( ) : void
Résultat void

DismissCompletionSession() public méthode

Close the completion dropdown, don't make any changes
public DismissCompletionSession ( ) : void
Résultat void

DismissQuickInfoSession() public méthode

public DismissQuickInfoSession ( ITextView textView ) : void
textView ITextView
Résultat void

DismissSignatureSession() public static méthode

public static DismissSignatureSession ( ITextView textView, ICoreShell shell ) : void
textView ITextView
shell ICoreShell
Résultat void

FilterCompletionSession() public méthode

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
Résultat void

HandleCommand() public méthode

Allows custom completion presenters to intercept commands
public HandleCommand ( System.Guid group, int id, object inputArg ) : bool
group System.Guid
id int
inputArg object
Résultat bool

HasActiveSignatureSession() protected méthode

protected HasActiveSignatureSession ( ITextView textView ) : bool
textView ITextView
Résultat bool

HasActiveSignatureSession() public static méthode

Is there an active signature help session? (is the tooltip showing?)
public static HasActiveSignatureSession ( ITextView textView, ICoreShell shell ) : bool
textView ITextView
shell ICoreShell
Résultat bool

IsAutoShownCompletion() protected méthode

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
Résultat bool

IsClosingChar() public méthode

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
Résultat bool

IsCommitChar() public méthode

Should this key press commit a completion session?
public IsCommitChar ( char typedCharacter ) : bool
typedCharacter char
Résultat bool

IsMuteCharacter() public méthode

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
Résultat bool

IsRetriggerChar() protected méthode

If completion is already showing, should this keypress start a new session?
protected IsRetriggerChar ( ICompletionSession session, char typedCharacter ) : bool
session ICompletionSession
typedCharacter char
Résultat bool

IsTriggerChar() public méthode

Should this key press start a completion session?
public IsTriggerChar ( char typedCharacter ) : bool
typedCharacter char
Résultat bool

OnCompleteWord() public méthode

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
Résultat void

OnCompletionSessionCommitted() protected méthode

protected OnCompletionSessionCommitted ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Résultat void

OnCompletionSessionDismissed() protected méthode

protected OnCompletionSessionDismissed ( object sender, EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Résultat void

OnPostTypeChar() public méthode

Called when the user types a character, after it shows up in the text view
public OnPostTypeChar ( char typedCharacter ) : void
typedCharacter char
Résultat void

OnPostTypeClosingChar() protected méthode

Invoked if user typed a closing character. IsClosingChar
protected OnPostTypeClosingChar ( char typedCharacter ) : void
typedCharacter char
Résultat void

OnPostTypeCompletionChar() protected méthode

protected OnPostTypeCompletionChar ( char typedCharacter ) : void
typedCharacter char
Résultat void

OnPreTypeChar() public méthode

Called when the user types a character, but before it shows up in the text view.
public OnPreTypeChar ( char typedCharacter ) : bool
typedCharacter char
Résultat bool

OnPreTypeCompletionChar() protected méthode

protected OnPreTypeCompletionChar ( char typedCharacter ) : void
typedCharacter char
Résultat void

OnShowMemberList() public méthode

Called when the user executes a command that should show the completion list
public OnShowMemberList ( bool filterList ) : void
filterList bool
Résultat void

OnShowQuickInfo() public méthode

Called when the user executes a command that should show the signature help tooltip
public OnShowQuickInfo ( ) : void
Résultat void

OnShowSignatureHelp() public méthode

Called when the user executes a command that should show the signature help tooltip
public OnShowSignatureHelp ( ) : void
Résultat void

ShowCompletion() public méthode

Show the completion dropdown if it isn't showing already
public ShowCompletion ( bool autoShownCompletion ) : ICompletionSession
autoShownCompletion bool
Résultat ICompletionSession

ShowSignature() public méthode

Shows the signature help tooltip if it isn't showing already
public ShowSignature ( bool autoShown ) : void
autoShown bool
Résultat void

ShowSignatureAndCompletion() protected méthode

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
Résultat void

TriggerCompletion() public méthode

public TriggerCompletion ( ) : ICompletionSession
Résultat ICompletionSession

TriggerSignatureHelp() public méthode

public TriggerSignatureHelp ( ) : void
Résultat void

UpdateInsertionText() protected méthode

Gives derived controllers a chance to update CompletionSession.SelectedCompletionSet.SelectionStatus.Completion.InsertionText
protected UpdateInsertionText ( ) : void
Résultat void