C# 클래스 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.
상속: IBraceCompletionContext
파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
EnsureTreeReady ( ITextBuffer subjectBuffer ) : void

메소드 상세

AllowOverType() 공개 메소드

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
리턴 bool

BraceCompletionContext() 공개 메소드

public BraceCompletionContext ( IEditorShell shell ) : Microsoft.Languages.Editor.Shell
shell IEditorShell
리턴 Microsoft.Languages.Editor.Shell

Finish() 공개 메소드

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

OnReturn() 공개 메소드

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
리턴 void

Start() 공개 메소드

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
리턴 void