C# Class Microsoft.R.Editor.Completion.AutoCompletion.BraceCompletionContext

Represents a simple context used to extend the default brace completion behaviors to include language-specific behaviors such as parsing and formatting.
Inheritance: IBraceCompletionContext
Afficher le fichier Open project: Microsoft/RTVS Class Usage Examples

Méthodes publiques

Méthode Description
AllowOverType ( IBraceCompletionSession session ) : bool

Called by the editor when the closing brace character has been typed.

The closing brace character will not be inserted into the buffer until after this returns. Does not occur if there is any non-whitespace between the caret and the closing brace. Language-specific decisions may be made here to take into account scenarios such as an escaped closing char.

BraceCompletionContext ( IEditorShell shell ) : Microsoft.Languages.Editor.Shell
Finish ( IBraceCompletionSession session ) : void

Called after the session has been removed from the stack.

OnReturn ( IBraceCompletionSession session ) : void

Called by the editor when return is pressed while both braces are on the same line and no typing has occurred in the session.

Called after the newline has been inserted into the buffer. Formatting for scenarios where the closing brace needs to be moved down an additional line past the caret should be done here.

Start ( IBraceCompletionSession session ) : void

Called before the session is added to the stack.

If additional formatting is required for the opening or closing brace it should be done here.

Private Methods

Méthode Description
EnsureTreeReady ( ITextBuffer subjectBuffer ) : void

Method Details

AllowOverType() public méthode

Called by the editor when the closing brace character has been typed.
The closing brace character will not be inserted into the buffer until after this returns. Does not occur if there is any non-whitespace between the caret and the closing brace. Language-specific decisions may be made here to take into account scenarios such as an escaped closing char.
public AllowOverType ( IBraceCompletionSession session ) : bool
session IBraceCompletionSession Default brace completion session
Résultat bool

BraceCompletionContext() public méthode

public BraceCompletionContext ( IEditorShell shell ) : Microsoft.Languages.Editor.Shell
shell IEditorShell
Résultat Microsoft.Languages.Editor.Shell

Finish() public méthode

Called after the session has been removed from the stack.
public Finish ( IBraceCompletionSession session ) : void
session IBraceCompletionSession Default brace completion session
Résultat void

OnReturn() public méthode

Called by the editor when return is pressed while both braces are on the same line and no typing has occurred in the session.
Called after the newline has been inserted into the buffer. Formatting for scenarios where the closing brace needs to be moved down an additional line past the caret should be done here.
public OnReturn ( IBraceCompletionSession session ) : void
session IBraceCompletionSession Default brace completion session
Résultat void

Start() public méthode

Called before the session is added to the stack.
If additional formatting is required for the opening or closing brace it should be done here.
public Start ( IBraceCompletionSession session ) : void
session IBraceCompletionSession Default brace completion session
Résultat void