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:40
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:38
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:72
options
• get
options(): TextEditorOptions
Text editor options.
Returns
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:64
• set
options(options
): void
Text editor options.
Parameters
Name | Type |
---|---|
options | TextEditorOptions |
Returns
void
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:68
selections
• get
selections(): Selection
[]
The selections in this text editor.
Returns
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:52
• 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:56
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:60
vscodeEditor
• get
vscodeEditor(): TextEditor
Returns
TextEditor
Defined in
ide/vscode/VscodeTextEditorImpl.ts:48
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:139
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:143
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:95
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:106
editNewNotebookCellBelow
▸ editNewNotebookCellBelow(): Promise
<void
>
Edit a new new notebook cell below.
Returns
Promise
<void
>
Implementation of
EditableTextEditor.editNewNotebookCellBelow
Defined in
ide/vscode/VscodeTextEditorImpl.ts:112
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:195
focus
▸ focus(): Promise
<void
>
Focus the editor.
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:102
fold
▸ fold(ranges?
): Promise
<void
>
Fold ranges
Parameters
Name | Type |
---|---|
ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:123
indentLine
▸ indentLine(_ranges?
): Promise
<void
>
Indent lines
Parameters
Name | Type |
---|---|
_ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:147
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:155
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:162
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:76
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:116
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:151
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:174
rename
▸ rename(_range?
): Promise
<void
>
Rename
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:166
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:179
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:84
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:80
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:183
setDecorations
▸ setDecorations(decorationType
, ranges
): Promise
<void
>
Adds a set of decorations to the text editor. If a set of decorations already exists with
the given decoration type, they will be replaced. If
ranges
is empty, the existing decorations with the given decoration type
will be removed.
Parameters
Name | Type |
---|---|
decorationType | TextEditorDecorationType |
ranges | readonly Range [] |
Returns
Promise
<void
>
Implementation of
EditableTextEditor.setDecorations
Defined in
ide/vscode/VscodeTextEditorImpl.ts:88
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:191
showHover
▸ showHover(_range?
): Promise
<void
>
Show hover
Parameters
Name | Type |
---|---|
_range? | Range |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:187
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:170
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:131
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:135
unfold
▸ unfold(ranges?
): Promise
<void
>
Unfold ranges
Parameters
Name | Type |
---|---|
ranges? | Range [] |
Returns
Promise
<void
>
Implementation of
Defined in
ide/vscode/VscodeTextEditorImpl.ts:127