Class: VscodeTextEditorImpl
ide/vscode/VscodeTextEditorImpl.VscodeTextEditorImpl
Implements
Constructors
constructor
• new VscodeTextEditorImpl(id
, ide
, editor
)
Parameters
Name | Type |
---|---|
id | string |
ide | VscodeIDE |
editor | TextEditor |
Defined in
ide/vscode/VscodeTextEditorImpl.ts:39
Properties
document
• Readonly
document: TextDocument
The document associated with this text editor. The document will be the same for the entire lifetime of this text editor.
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:37
id
• Readonly
id: string
Unique identifier for this text editor
Implementation of
Accessors
isActive
• get
isActive(): boolean
True if this text editor is active.
Returns
boolean
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:71
options
• get
options(): TextEditorOptions
Text editor options.
Returns
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:63
• set
options(options
): void
Text editor options.
Parameters
Name | Type |
---|---|
options | TextEditorOptions |
Returns
void
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:67
selections
• get
selections(): Selection
[]
The selections in this text editor.
Returns
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:51
• set
selections(selections
): void
The selections in this text editor.
Parameters
Name | Type |
---|---|
selections | Selection [] |
Returns
void
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:55
visibleRanges
• get
visibleRanges(): Range
[]
The current visible ranges in the editor (vertically). This accounts only for vertical scrolling, and not for horizontal scrolling.
Returns
Range
[]
Implementation of
EditableTextEditor.visibleRanges
Defined in
ide/vscode/VscodeTextEditorImpl.ts:59
vscodeEditor
• get
vscodeEditor(): TextEditor
Returns
TextEditor
Defined in
ide/vscode/VscodeTextEditorImpl.ts:47
Methods
clipboardCopy
▸ clipboardCopy(_ranges?
): Promise
<void
>
Copy to clipboard
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.clipboardCopy
Defined in
ide/vscode/VscodeTextEditorImpl.ts:131
clipboardPaste
▸ clipboardPaste(_ranges?
): Promise
<void
>
Paste clipboard content
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.clipboardPaste
Defined in
ide/vscode/VscodeTextEditorImpl.ts:135
edit
▸ edit(callback
, options?
): Promise
<boolean
>
Perform an edit on the document associated with this text editor.
The given callback-function is invoked with an edit-builder which must be used to make edits. Note that the edit-builder is only valid while the callback executes.
Parameters
Name | Type |
---|---|
callback | (editBuilder : TextEditorEdit ) => void |
options? | Object |
options.undoStopAfter | boolean |
options.undoStopBefore | boolean |
Returns
Promise
<boolean
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:87
editNewNotebookCellAbove
▸ editNewNotebookCellAbove(): Promise
<(selection
: Selection
) => Selection
>
Edit a new new notebook cell above.
Returns
Promise
<(selection
: Selection
) => Selection
>
Implementation of
EditableTextEditor.editNewNotebookCellAbove
Defined in
ide/vscode/VscodeTextEditorImpl.ts:98
editNewNotebookCellBelow
▸ editNewNotebookCellBelow(): Promise
<void
>
Edit a new new notebook cell below.
Returns
Promise
<void
>
Implementation of
EditableTextEditor.editNewNotebookCellBelow
Defined in
ide/vscode/VscodeTextEditorImpl.ts:104
extractVariable
▸ extractVariable(_range?
): Promise
<void
>
Extract variable
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.extractVariable
Defined in
ide/vscode/VscodeTextEditorImpl.ts:188
focus
▸ focus(): Promise
<void
>
Focus the editor.
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:94
fold
▸ fold(ranges?
): Promise
<void
>
Fold ranges
Parameters
Name | Type |
---|---|
ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:115
indentLine
▸ indentLine(_ranges?
): Promise
<void
>
Indent lines
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:139
insertLineAfter
▸ insertLineAfter(ranges?
): Promise
<void
>
Insert line after
Parameters
Name | Type |
---|---|
ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.insertLineAfter
Defined in
ide/vscode/VscodeTextEditorImpl.ts:147
insertSnippet
▸ insertSnippet(snippet
, ranges?
): Promise
<void
>
Insert snippet
Parameters
Name | Type |
---|---|
snippet | string |
ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.insertSnippet
Defined in
ide/vscode/VscodeTextEditorImpl.ts:155
isEqual
▸ isEqual(other
): boolean
Check if this text editor is equal to other
.
Parameters
Name | Type |
---|---|
other | TextEditor |
Returns
boolean
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:75
openLink
▸ openLink(location?
): Promise
<boolean
>
Open link at location.
Parameters
Name | Type |
---|---|
location? | Range | Position |
Returns
Promise
<boolean
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:108
outdentLine
▸ outdentLine(_ranges?
): Promise
<void
>
Outdent lines
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.outdentLine
Defined in
ide/vscode/VscodeTextEditorImpl.ts:143
quickFix
▸ quickFix(_range?
): Promise
<void
>
Show quick fixed dialogue
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:167
rename
▸ rename(_range?
): Promise
<void
>
Rename
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:159
revealDefinition
▸ revealDefinition(_range?
): Promise
<void
>
Reveal definition
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.revealDefinition
Defined in
ide/vscode/VscodeTextEditorImpl.ts:172
revealLine
▸ revealLine(lineNumber
, at
): Promise
<void
>
Scroll to reveal the given line.
Parameters
Name | Type |
---|---|
lineNumber | number |
at | RevealLineAt |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:83
revealRange
▸ revealRange(range
): Promise
<void
>
Scroll to reveal the given range.
Parameters
Name | Type |
---|---|
range | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.revealRange
Defined in
ide/vscode/VscodeTextEditorImpl.ts:79
revealTypeDefinition
▸ revealTypeDefinition(_range?
): Promise
<void
>
Reveal type definition
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.revealTypeDefinition
Defined in
ide/vscode/VscodeTextEditorImpl.ts:176
showDebugHover
▸ showDebugHover(_range?
): Promise
<void
>
Show debug hover
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.showDebugHover
Defined in
ide/vscode/VscodeTextEditorImpl.ts:184
showHover
▸ showHover(_range?
): Promise
<void
>
Show hover
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:180
showReferences
▸ showReferences(_range?
): Promise
<void
>
Show references
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.showReferences
Defined in
ide/vscode/VscodeTextEditorImpl.ts:163
toggleBreakpoint
▸ toggleBreakpoint(descriptors?
): Promise
<void
>
Toggle breakpoints. For each of the descriptors in {@link descriptors}, remove all breakpoints overlapping with the given descriptor if it overlaps with any existing breakpoint, otherwise add a new breakpoint at the given location.
Parameters
Name | Type |
---|---|
descriptors? | BreakpointDescriptor [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.toggleBreakpoint
Defined in
ide/vscode/VscodeTextEditorImpl.ts:123
toggleLineComment
▸ toggleLineComment(_ranges?
): Promise
<void
>
Toggle line comments
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.toggleLineComment
Defined in
ide/vscode/VscodeTextEditorImpl.ts:127
unfold
▸ unfold(ranges?
): Promise
<void
>
Unfold ranges
Parameters
Name | Type |
---|---|
ranges? | Range [] |
Returns
Promise
<void
>