Hierarchy

Index

Events

onDidDispose

onDidUpdateDiff

  • An event emitted when the diff information computed by this diff editor has been updated.

    Parameters

    • listener: function
        • (): void
        • Returns void

    Returns IDisposable

Methods

dispose

  • dispose(): void

focus

  • focus(): void

getActions

  • getActions(): IEditorAction[]

getDiffLineInformationForModified

  • Get information based on computed diff about a line number from the modified model. If the diff computation is not finished or the model is missing, will return null.

    Parameters

    • lineNumber: number

    Returns IDiffLineInformation

getDiffLineInformationForOriginal

  • Get information based on computed diff about a line number from the original model. If the diff computation is not finished or the model is missing, will return null.

    Parameters

    • lineNumber: number

    Returns IDiffLineInformation

getEditorType

  • getEditorType(): string

getId

  • getId(): string

getLineChanges

  • getLineChanges(): ILineChange[]
  • Get the computed diff information.

    Returns ILineChange[]

getModel

getModifiedEditor

getOriginalEditor

getPosition

getSelection

getSelections

  • getSelections(): Selection[]

getSupportedActions

  • getSupportedActions(): IEditorAction[]

getValue

  • getValue(options?: object): string
  • see

    ICodeEditor.getValue

    Parameters

    • Optional options: object
      • lineEnding: string
      • preserveBOM: boolean

    Returns string

getVisibleColumnFromPosition

  • getVisibleColumnFromPosition(position: IPosition): number

isFocused

  • isFocused(): boolean

layout

  • Instructs the editor to remeasure its container. This method should be called when the container of the editor gets resized.

    Parameters

    Returns void

restoreViewState

revealLine

  • revealLine(lineNumber: number): void

revealLineInCenter

  • revealLineInCenter(lineNumber: number): void

revealLineInCenterIfOutsideViewport

  • revealLineInCenterIfOutsideViewport(lineNumber: number): void

revealLines

  • revealLines(startLineNumber: number, endLineNumber: number): void
  • Scroll vertically as necessary and reveal lines.

    Parameters

    • startLineNumber: number
    • endLineNumber: number

    Returns void

revealLinesInCenter

  • revealLinesInCenter(lineNumber: number, endLineNumber: number): void

revealLinesInCenterIfOutsideViewport

  • revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number): void

revealPosition

  • revealPosition(position: IPosition, revealVerticalInCenter?: boolean, revealHorizontal?: boolean): void
  • Scroll vertically or horizontally as necessary and reveal a position.

    Parameters

    • position: IPosition
    • Optional revealVerticalInCenter: boolean
    • Optional revealHorizontal: boolean

    Returns void

revealPositionInCenter

  • revealPositionInCenter(position: IPosition): void

revealPositionInCenterIfOutsideViewport

  • revealPositionInCenterIfOutsideViewport(position: IPosition): void

revealRange

  • revealRange(range: IRange): void

revealRangeAtTop

  • revealRangeAtTop(range: IRange): void

revealRangeInCenter

  • revealRangeInCenter(range: IRange): void

revealRangeInCenterIfOutsideViewport

  • revealRangeInCenterIfOutsideViewport(range: IRange): void

saveViewState

setModel

  • Sets the current model attached to this editor. If the previous model was created by the editor via the value key in the options literal object, it will be destroyed. Otherwise, if the previous model was set via setModel, or the model key in the options literal object, the previous model will not be destroyed. It is safe to call setModel(null) to simply detach the current model from the editor.

    Parameters

    Returns void

setPosition

  • Set the primary position of the cursor. This will remove any secondary cursors.

    Parameters

    • position: IPosition

      New primary cursor's position

    Returns void

setSelection

  • setSelection(selection: IRange): void
  • setSelection(selection: Range): void
  • setSelection(selection: ISelection): void
  • setSelection(selection: Selection): void

setSelections

  • setSelections(selections: ISelection[]): void
  • Set the selections for all the cursors of the editor. Cursors will be removed or added, as necessary.

    Parameters

    • selections: ISelection[]

    Returns void

trigger

  • trigger(source: string, handlerId: string, payload: any): void
  • Directly trigger a handler or an editor action.

    Parameters

    • source: string

      The source of the call.

    • handlerId: string

      The id of the handler or the id of a contribution.

    • payload: any

      Extra data to be sent to the handler.

    Returns void

updateOptions