Page object representing the active text editor

Hierarchy (view full)

Constructors

Properties

action$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseElement<Element>

action$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseArray<Element[]>

actionContainer$: ChainablePromiseElement<Element>
actionContainer$$: ChainablePromiseArray<Element[]>
actionItem$: ChainablePromiseElement<Element>
actionItem$$: ChainablePromiseArray<Element[]>
actions$: ChainablePromiseElement<Element>
actions$$: ChainablePromiseArray<Element[]>
activeTab$: ChainablePromiseElement<Element>
activeTab$$: ChainablePromiseArray<Element[]>
breakPoint$: ChainablePromiseElement<Element>
breakPoint$$: ChainablePromiseArray<Element[]>
checkboxChecked$: ChainablePromiseElement<Element>
checkboxChecked$$: ChainablePromiseArray<Element[]>
checkboxSetting$: ChainablePromiseElement<Element>
checkboxSetting$$: ChainablePromiseArray<Element[]>
closeTab$: ChainablePromiseElement<Element>
closeTab$$: ChainablePromiseArray<Element[]>
comboOption$: ChainablePromiseElement<Element>
comboOption$$: ChainablePromiseArray<Element[]>
comboSetting$: ChainablePromiseElement<Element>
comboSetting$$: ChainablePromiseArray<Element[]>
dataUri$: ChainablePromiseElement<Element>
dataUri$$: ChainablePromiseArray<Element[]>
debugHint$: ChainablePromiseElement<Element>
debugHint$$: ChainablePromiseArray<Element[]>
diffEditor$: ChainablePromiseElement<Element>
diffEditor$$: ChainablePromiseArray<Element[]>
editorContainer$: ChainablePromiseElement<Element>
editorContainer$$: ChainablePromiseArray<Element[]>
editorGroup$: ChainablePromiseElement<Element>
editorGroup$$: ChainablePromiseArray<Element[]>
elem$: ChainablePromiseElement<Element>
elem$$: ChainablePromiseArray<Element[]>
findWidget$: ChainablePromiseElement<Element>
findWidget$$: ChainablePromiseArray<Element[]>
formatDoc$: ChainablePromiseElement<Element>
formatDoc$$: ChainablePromiseArray<Element[]>
header$: ChainablePromiseElement<Element>
header$$: ChainablePromiseArray<Element[]>
inputArea$: ChainablePromiseElement<Element>
inputArea$$: ChainablePromiseArray<Element[]>
itemCount$: ChainablePromiseElement<Element>
itemCount$$: ChainablePromiseArray<Element[]>
itemRow$: ChainablePromiseElement<Element>
itemRow$$: ChainablePromiseArray<Element[]>
lineNumber$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [line: number]

      Returns ChainablePromiseElement<Element>

lineNumber$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [line: number]

      Returns ChainablePromiseArray<Element[]>

lineOverlay$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [line: number]

      Returns ChainablePromiseElement<Element>

lineOverlay$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [line: number]

      Returns ChainablePromiseArray<Element[]>

linkButton$: ChainablePromiseElement<Element>
linkButton$$: ChainablePromiseArray<Element[]>
marginArea$: ChainablePromiseElement<Element>
marginArea$$: ChainablePromiseArray<Element[]>
modifiedEditor$: ChainablePromiseElement<Element>
modifiedEditor$$: ChainablePromiseArray<Element[]>
originalEditor$: ChainablePromiseElement<Element>
originalEditor$$: ChainablePromiseArray<Element[]>
selection$: ChainablePromiseElement<Element>
selection$$: ChainablePromiseArray<Element[]>
settingConstructor$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [title: string, category: string]

      Returns ChainablePromiseElement<Element>

settingConstructor$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [title: string, category: string]

      Returns ChainablePromiseArray<Element[]>

settingDesctiption$: ChainablePromiseElement<Element>
settingDesctiption$$: ChainablePromiseArray<Element[]>
settingsEditor$: ChainablePromiseElement<Element>
settingsEditor$$: ChainablePromiseArray<Element[]>
tab$: ChainablePromiseElement<Element>
tab$$: ChainablePromiseArray<Element[]>
tabLabel$: ChainablePromiseElement<Element>
tabLabel$$: ChainablePromiseArray<Element[]>
tabSeparator$: ChainablePromiseElement<Element>
tabSeparator$$: ChainablePromiseArray<Element[]>
tabTitle$: ChainablePromiseElement<Element>
tabTitle$$: ChainablePromiseArray<Element[]>
tabs$: ChainablePromiseElement<Element>
tabs$$: ChainablePromiseArray<Element[]>
textSetting$: ChainablePromiseElement<Element>
textSetting$$: ChainablePromiseArray<Element[]>
title$: ChainablePromiseElement<Element>
title$$: ChainablePromiseArray<Element[]>
view: EditorView | EditorGroup = ...
webView$: ChainablePromiseElement<Element>
webView$$: ChainablePromiseArray<Element[]>

Accessors

  • get elem(): ChainablePromiseElement<Element>
  • Base element of given page object

    Returns ChainablePromiseElement<Element>

  • get parent(): ChainablePromiseElement<Element>
  • Parent element of given page object

    Returns ChainablePromiseElement<Element>

Methods

  • Use the built-in 'Format Document' option to format the text

    Returns Promise<void>

    Promise resolving when the Format Document command is invoked

  • Get a code lens based on title, or zero based index

    Parameters

    • indexOrTitle: string | number

      zero based index (counting from the top of the editor), or partial title of the code lens

    Returns Promise<undefined | CodeLens>

    CodeLens object if such a code lens exists, undefined otherwise

  • Get the cursor's coordinates as an array of two numbers: [line, column]

    Caution line & column coordinates do not start at 0 but at 1!

    Returns Promise<[number, number]>

  • Retrieve the path to the file opened in the active editor

    Returns Promise<string>

    Promise resolving to editor's underlying file path

  • Retrieve the Uri of the file opened in the active editor

    Returns Promise<string>

    Promise resolving to editor's underlying Uri

  • Get line number that contains the given text. Not suitable for multi line inputs.

    Parameters

    • text: string

      text to search for

    • occurrence: number = 1

      select which occurrence of the search text to look for in case there are multiple in the document, defaults to 1 (the first instance)

    Returns Promise<number>

    Number of the line that contains the start of the given text. -1 if no such text is found. If occurrence number is specified, searches until it finds as many instances of the given text. Returns the line number that holds the last occurrence found this way.

  • Get the selection block as a page object

    Returns Promise<undefined | Selection>

    Selection page object

  • Get text from a given line

    Parameters

    • line: number

      number of the line to retrieve

    Returns Promise<string>

    Promise resolving to text at the given line number

  • Find whether the active editor has unsaved changes

    Returns Promise<boolean>

    Promise resolving to true/false

  • Move the cursor to the given coordinates

    Parameters

    • line: number

      line number to move to

    • column: number

      column number to move to

    Returns Promise<void>

    Promise resolving when the cursor has reached the given coordinates

  • Poll for the element to become visible

    Parameters

    • timeout: number = 10000

      custom timeout for the wait

    • interval: number = 2000

      custom interval to control polling

    Returns Promise<TextEditor>

    thenable self reference

  • Find and select a given text. Not usable for multi line selection.

    Parameters

    • text: string

      text to select

    • occurrence: number = 1

      specify which onccurrence of text to select if multiple are present in the document

    Returns Promise<void>

  • Replace the contents of the editor with a given text

    Parameters

    • text: string

      text to type into the editor

    • formatText: boolean = false

      format the new text, default false

    Returns Promise<void>

    Promise resolving once the new text is copied over

  • Replace the contents of a line with a given text

    Parameters

    • line: number

      number of the line to edit

    • text: string

      text to set at the line

    Returns Promise<void>

    Promise resolving when the text is typed in

  • Toggle breakpoint on a given line

    Parameters

    • line: number

      target line number

    Returns Promise<boolean>

    promise resolving to true when a breakpoint was added, false when removed or

  • Open/Close the content assistant at the current position in the editor by sending the default keyboard shortcut signal

    Parameters

    • open: boolean

      true to open, false to close

    Returns Promise<undefined | ContentAssist>

    Promise resolving to ContentAssist object when opening, void otherwise

  • Type given text at the current coordinates

    Parameters

    • text: string

      text to type

    Returns Promise<void>

    promise resolving when the text is typed in

  • Add the given text to the given coordinates

    Parameters

    • line: number

      number of the line to type into

    • column: number

      number of the column to start typing at

    • text: string

      text to add

    Returns Promise<void>

    Promise resolving when the text is typed in

Generated using TypeDoc