Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorkspaceCommandContribution

Hierarchy

  • WorkspaceCommandContribution

Implements

  • CommandContribution

Index

Constructors

constructor

Properties

Protected Readonly app

app: FrontendApplication

Protected Readonly applicationServer

applicationServer: ApplicationServer

Protected backendOS

backendOS: Promise<Type>

Protected Readonly compareHandler

compareHandler: WorkspaceCompareHandler

Protected Readonly deleteHandler

deleteHandler: WorkspaceDeleteHandler

Protected Readonly duplicateHandler

duplicateHandler: WorkspaceDuplicateHandler

Protected Readonly fileDialogService

fileDialogService: FileDialogService

Protected Readonly fileService

fileService: FileService

Protected Readonly labelProvider

labelProvider: LabelProvider

Protected Readonly messageService

messageService: MessageService

Private Readonly onDidCreateNewFileEmitter

onDidCreateNewFileEmitter: Emitter<DidCreateNewResourceEvent> = ...

Private Readonly onDidCreateNewFolderEmitter

onDidCreateNewFolderEmitter: Emitter<DidCreateNewResourceEvent> = ...

Protected Readonly openerService

openerService: OpenerService

openers

openers: OpenHandler[]

Protected Readonly preferences

preferences: PreferenceProxy<WorkspaceConfiguration>

Protected Readonly selectionService

selectionService: SelectionService

Protected Readonly workspaceService

workspaceService: WorkspaceService

Accessors

onDidCreateNewFile

onDidCreateNewFolder

Methods

Protected addFolderToWorkspace

  • addFolderToWorkspace(...uris: default[]): Promise<void>

Protected areMultipleOpenHandlersPresent

  • areMultipleOpenHandlersPresent(openers: OpenHandler[], uri: default): boolean

Protected areWorkspaceRoots

  • areWorkspaceRoots(uris: default[]): boolean

Protected fireCreateNewFile

Protected fireCreateNewFolder

Protected getDefaultFileConfig

  • getDefaultFileConfig(): { fileExtension: string; fileName: string }

Protected getDirectory

  • getDirectory(candidate: default): Promise<undefined | FileStat>

Protected getParent

  • getParent(candidate: default): Promise<undefined | FileStat>

init

  • init(): Promise<void>

Protected isWorkspaceRoot

  • isWorkspaceRoot(uri: default): boolean

Protected newMultiUriAwareCommandHandler

  • newMultiUriAwareCommandHandler(handler: UriCommandHandler<default[]>): UriAwareCommandHandler<default[]>

Protected newUriAwareCommandHandler

  • newUriAwareCommandHandler(handler: UriCommandHandler<default>): UriAwareCommandHandler<default>

Protected newWorkspaceRootUriAwareCommandHandler

registerCommands

  • registerCommands(registry: CommandRegistry): void

Protected registerOpenWith

  • registerOpenWith(registry: CommandRegistry): Promise<void>

Protected removeFolderFromWorkspace

  • removeFolderFromWorkspace(uris: default[]): Promise<void>

Protected trimFileName

  • trimFileName(name: string): string

Protected validateFileName

  • validateFileName(name: string, parent: FileStat, allowNested?: boolean): Promise<string>
  • Returns an error message if the file name is invalid. Otherwise, an empty string.

    Parameters

    • name: string

      the simple file name of the file to validate.

    • parent: FileStat

      the parent directory's file stat.

    • allowNested: boolean = false

      allow file or folder creation using recursive path

    Returns Promise<string>

Protected validateFileRename

  • validateFileRename(oldName: string, newName: string, parent: FileStat): Promise<string>