Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorkspaceFrontendContribution

Hierarchy

  • WorkspaceFrontendContribution

Implements

Index

Properties

Protected Readonly applicationShell

applicationShell: ApplicationShell

Protected Readonly commandRegistry

commandRegistry: CommandRegistry

Protected Readonly contextKeyService

contextKeyService: ContextKeyService

Protected Readonly encodingRegistry

encodingRegistry: EncodingRegistry

Protected Readonly fileDialogService

fileDialogService: FileDialogService

Protected Readonly fileService

fileService: FileService

Protected Readonly labelProvider

labelProvider: LabelProvider

Protected Readonly messageService

messageService: MessageService

Protected Readonly openerService

openerService: OpenerService

Protected Readonly preferenceConfigurations

preferenceConfigurations: PreferenceConfigurations

Protected preferences

Protected Readonly quickOpenWorkspace

quickOpenWorkspace: QuickOpenWorkspace

Protected Readonly selectionService

selectionService: SelectionService

Protected Readonly toDisposeOnUpdateEncodingOverrides

toDisposeOnUpdateEncodingOverrides: DisposableCollection = new DisposableCollection()

Protected Readonly workspaceService

workspaceService: WorkspaceService

Protected Readonly workspaceStorage

workspaceStorage: StorageService

Methods

Protected canBeSavedAs

  • canBeSavedAs(widget: Widget | undefined): widget is Widget & SaveableSource & Navigatable
  • This method ensures a few things about widget:

    • widget.getResourceUri() actually returns a URI.
    • widget.saveable.createSnapshot is defined.
    • widget.saveable.revert is defined.

    Parameters

    • widget: Widget | undefined

    Returns widget is Widget & SaveableSource & Navigatable

Protected closeWorkspace

  • closeWorkspace(): Promise<void>

configure

  • configure(): void

Private confirmOverwrite

  • confirmOverwrite(uri: URI): Promise<boolean>

Private copyAndSave

Protected doOpen

  • doOpen(): Promise<URI | undefined>

Protected doOpenFile

  • doOpenFile(): Promise<URI | undefined>

Protected doOpenFolder

  • doOpenFolder(): Promise<URI | undefined>

Protected doOpenWorkspace

  • doOpenWorkspace(): Promise<URI | undefined>
  • Opens a workspace after raising the Open Workspace dialog. Resolves to the URI of the recently opened workspace, if it was successful. Otherwise, resolves to undefined.

    Caveat: this behaves differently on different platforms, the workspace.supportMultiRootWorkspace preference value does matter, and electron/browser version has impact too. See here for more details.

    Legend:

    • workspace.supportMultiRootWorkspace is false: => N
    • workspace.supportMultiRootWorkspace is true: => Y
    • Folders only: => F
    • Workspace files only: => W
    • Folders and workspace files: => FW

    |---------|-----------|-----------|------------|------------| | | browser Y | browser N | electron Y | electron N | |---------|-----------|-----------|------------|------------| | Linux | FW | F | W | F | | Windows | FW | F | W | F | | OS X | FW | F | FW | FW | |---------|-----------|-----------|------------|------------|

    Returns Promise<URI | undefined>

Private getCurrentWorkspaceUri

  • getCurrentWorkspaceUri(): URI | undefined

Private isElectron

  • isElectron(): boolean

Protected openWorkspaceOpenFileDialogProps

registerCommands

registerKeybindings

registerMenus

Protected saveAs

Protected saveWorkspaceAs

  • saveWorkspaceAs(): Promise<void>

Protected updateEncodingOverrides

  • updateEncodingOverrides(): void

Protected updateStyles

  • updateStyles(): void

Protected updateWorkspaceStateKey

Static createOpenWorkspaceOpenFileDialogProps

  • createOpenWorkspaceOpenFileDialogProps(options: Readonly<{ electron: boolean; supportMultiRootWorkspace: boolean; type: Type }>): OpenFileDialogProps

Object literals

Static DEFAULT_FILE_FILTER

DEFAULT_FILE_FILTER: object

File filter for all Theia and VS Code workspace file types.

Theia Workspace (*.theia-workspace)

Theia Workspace (*.theia-workspace): string[] = [THEIA_EXT]

VS Code Workspace (*.code-workspace)

VS Code Workspace (*.code-workspace): string[] = [VSCODE_EXT]