Interface ICodeEditorOpener

Represents an object that can handle editor open operations (e.g. when "go to definition" is called with a resource other than the current model).

interface ICodeEditorOpener {
    openCodeEditor(source, resource, selectionOrPosition?): boolean | Promise<boolean>;
}

Methods

  • Callback that is invoked when a resource other than the current model should be opened (e.g. when "go to definition" is called). The callback should return true if the request was handled and false otherwise.

    Parameters

    • source: ICodeEditor

      The code editor instance that initiated the request.

    • resource: Uri

      The Uri of the resource that should be opened.

    • Optional selectionOrPosition: IPosition | IRange

      An optional position or selection inside the model corresponding to resource that can be used to set the cursor.

    Returns boolean | Promise<boolean>