Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EditorManager

Hierarchy

Index

Constructors

constructor

  • Returns EditorManager

Properties

Protected _activeEditor

_activeEditor: undefined | EditorWidget

Protected _currentEditor

_currentEditor: undefined | EditorWidget

Protected Readonly editorCounters

editorCounters: Map<string, number> = ...

Readonly id

id: string = ...

Readonly label

label: "Code Editor" = 'Code Editor'

Readonly onActiveEditorChanged

onActiveEditorChanged: Event<undefined | EditorWidget> = ...

Emit when the active editor is changed.

Protected Readonly onActiveEditorChangedEmitter

onActiveEditorChangedEmitter: Emitter<undefined | EditorWidget> = ...

Readonly onCreated

onCreated: Event<EditorWidget>

Emit when a new widget is created.

Protected Readonly onCreatedEmitter

onCreatedEmitter: Emitter<EditorWidget>

Readonly onCurrentEditorChanged

onCurrentEditorChanged: Event<undefined | EditorWidget> = ...

Emit when the current editor is changed.

Protected Readonly onCurrentEditorChangedEmitter

onCurrentEditorChangedEmitter: Emitter<undefined | EditorWidget> = ...

Protected Readonly recentlyVisibleIds

recentlyVisibleIds: string[] = []

Protected Readonly shell

shell: ApplicationShell

Protected Readonly widgetManager

widgetManager: WidgetManager

Accessors

activeEditor

all

  • get all(): W[]
  • Retrieves all open widgets that have been opened by this handler.

    Returns W[]

    all open widgets for this open handler.

currentEditor

  • The most recently activated editor (which might not have the focus anymore, hence it is not active). If no editor has focus, e.g. when a context menu is shown, the active editor is undefined, but current might be the editor that was active before the menu popped up.

    Returns undefined | EditorWidget

Protected recentlyVisible

Methods

Protected addRecentlyVisible

canHandle

  • canHandle(uri: default, options?: WidgetOpenerOptions): number

Protected checkCounterForWidget

closeAll

  • Closes all widgets that have been opened by this open handler.

    Parameters

    • Optional options: CloseOptions

      the close options that should be applied to all widgets.

    Returns Promise<EditorWidget[]>

    a promise of all closed widgets that resolves after they have been closed.

Protected createCounterForUri

  • createCounterForUri(uri: default): number

Protected createWidgetOptions

Protected doOpen

  • doOpen(widget: EditorWidget, options?: WidgetOpenerOptions): Promise<void>
  • Parameters

    • widget: EditorWidget
    • Optional options: WidgetOpenerOptions

    Returns Promise<void>

Protected extractIdFromWidget

getByUri

Protected getCounterForUri

  • getCounterForUri(uri: default): undefined | number

getOrCreateByUri

Protected getOrCreateCounterForUri

  • getOrCreateCounterForUri(uri: default): number

Protected getOrCreateWidget

Protected getSelection

  • getSelection(widget: EditorWidget, selection: RecursivePartial<Range>): undefined | Range | Position

Protected getWidget

Protected init

  • init(): void

open

openToSide

Protected removeFromCounter

Protected removeRecentlyVisible

Protected revealSelection

Protected serializeUri

  • serializeUri(uri: default): string
  • Parameters

    • uri: default

    Returns string

Protected setActiveEditor

Protected setCurrentEditor

Protected tryGetPendingWidget

Protected updateActiveEditor

  • updateActiveEditor(): void

Protected updateCurrentEditor

  • updateCurrentEditor(): void