Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "extension"

Index

Variables

Const EVENT_STYLE_CHANGED

EVENT_STYLE_CHANGED: "webview.style.changed" = "webview.style.changed"

The name of the event, when style changed.

Const IS_UNSET

IS_UNSET: unique symbol = Symbol('IS_UNSET')

Indicates that something is unset.

Const KEY_CURRENT_STYLE

KEY_CURRENT_STYLE: "vschcCurrentStyle" = "vschcCurrentStyle"

Const KEY_LAST_KNOWN_DEFAULT_URI

KEY_LAST_KNOWN_DEFAULT_URI: "vschcLastKnownDefaultUri" = "vschcLastKnownDefaultUri"

Const KEY_LAST_KNOWN_VERSION

KEY_LAST_KNOWN_VERSION: "vschcLastKnownVersion" = "vschcLastKnownVersion"

Const MergeDeep

MergeDeep: any = require('merge-deep')

Let activeWorkspace

activeWorkspace: Workspace

Let extension

extension: vscode.ExtensionContext

Let isDeactivating

isDeactivating: boolean = false

Let outputChannel

outputChannel: vscode.OutputChannel

Let packageFile

packageFile: PackageFile

Let workspaceWatcher

workspaceWatcher: WorkspaceWatcherContext<Workspace>

Functions

activate

  • activate(context: vscode.ExtensionContext): Promise<void>
  • Parameters

    • context: vscode.ExtensionContext

    Returns Promise<void>

confirm

  • confirm<TResult>(action: function, prompt: string): Promise<TResult>
  • Shows a confirm window.

    Type parameters

    • TResult

    Parameters

    • action: function

      The action to invoke.

        • (yes: boolean): TResult | PromiseLike<TResult>
        • Parameters

          • yes: boolean

          Returns TResult | PromiseLike<TResult>

    • prompt: string

      The promt text.

    Returns Promise<TResult>

    The promise with the result of the action.

deactivate

  • deactivate(): Promise<void>

exec

  • Executes a file / command.

    Parameters

    • command: string

      The command to execute.

    Returns Promise<ExecResult>

    The promise with the result.

getContext

  • getContext(): vscode.ExtensionContext
  • Returns the current extension context.

    Returns vscode.ExtensionContext

getCurrentStyle

  • getCurrentStyle(): string | false
  • Returns the path of the current, existing style (CSS) file.

    Returns string | false

    The file path or (false) if not found.

getCurrentStyleUri

  • getCurrentStyleUri(getResourceUri: function): Uri
  • Returns the URI for the current style file.

    Parameters

    • getResourceUri: function

      The function to use to resolve the default URI.

        • (path: string): vscode.Uri
        • Parameters

          • path: string

          Returns vscode.Uri

    Returns Uri

    The resource URI of the current style.

getDefaultUriForDialogs

  • getDefaultUriForDialogs(): Promise<Uri>

getOutputChannel

  • getOutputChannel(): OutputChannel
  • Returns the current output channel.

    Returns OutputChannel

    The output channel.

getUsersExtensionDir

  • getUsersExtensionDir(): string
  • Returns the extension's path inside the user's home directory.

    Returns string

    string The path to the (possible) directory.

getWebViewResourceUris

  • getWebViewResourceUris(): vscode.Uri[]
  • Returns all possible resource URIs for web views.

    Returns vscode.Uri[]

    The list of URIs.

openFiles

  • openFiles<TResult>(action: function, options?: OpenDialogOptions): Promise<TResult>
  • Invokes an action for an 'oprn files' dialog.

    Type parameters

    • TResult

    Parameters

    • action: function

      The action to invoke.

        • (files: vscode.Uri[]): TResult | PromiseLike<TResult>
        • Parameters

          • files: vscode.Uri[]

          Returns TResult | PromiseLike<TResult>

    • Optional options: OpenDialogOptions

    Returns Promise<TResult>

    The promise with the result of the action.

saveFile

  • Invokes an action for an 'oprn files' dialog.

    Type parameters

    • TResult

    Parameters

    • action: function

      The action to invoke.

        • (file: vscode.Uri): TResult | PromiseLike<TResult>
        • Parameters

          • file: vscode.Uri

          Returns TResult | PromiseLike<TResult>

    • Optional options: SaveDialogOptions

    Returns Promise<TResult>

    The promise with the result of the action.

showError

  • showError(err: any): Promise<string>
  • Shows an error.

    Parameters

    • err: any

      The error to show.

    Returns Promise<string>

updateActiveWorkspace

  • updateActiveWorkspace(): Promise<void>

updateLastKnownDefaultUriForDialogs

  • updateLastKnownDefaultUriForDialogs(uri: vscode.Uri): Promise<void>

Generated using TypeDoc