Class WorkspaceFrontendContribution

Implements

  • CommandContribution
  • KeybindingContribution
  • MenuContribution
  • FrontendApplicationContribution

Constructors

Properties

contextKeyService: ContextKeyService
encodingRegistry: EncodingRegistry
fileDialogService: FileDialogService
fileService: FileService
messageService: MessageService
openerService: OpenerService
preferenceConfigurations: PreferenceConfigurations
quickOpenWorkspace: QuickOpenWorkspace
saveService: FilesystemSaveableService
toDisposeOnUpdateEncodingOverrides: DisposableCollection = ...
workspaceFileService: WorkspaceFileService
workspaceService: WorkspaceService

Methods

  • Opens a set of files after prompting the Open File dialog. Resolves to undefined, if

    • the workspace root is not set,
    • the file to open does not exist, or
    • it was not a file, but a directory.

    Otherwise, resolves to the set of URIs of the files.

    Returns Promise<undefined | URI[]>

  • Opens one or more folders after prompting the Open Folder dialog. Resolves to undefined, if

    • the user's selection is empty or contains only files.
    • the new workspace is equal to the old workspace.

    Otherwise, resolves to the URI of the new workspace:

    • a single folder if a single folder was selected.
    • a new, untitled workspace file if multiple folders were selected.

    Returns Promise<undefined | URI>