Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorkspaceCommandContribution

Hierarchy

  • WorkspaceCommandContribution

Implements

  • CommandContribution

Index

Constructors

Properties

app: FrontendApplication
clipboardService: ClipboardService
compareHandler: WorkspaceCompareHandler
deleteHandler: WorkspaceDeleteHandler
duplicateHandler: WorkspaceDuplicateHandler
fileDialogService: FileDialogService
fileService: FileService
labelProvider: LabelProvider
messageService: MessageService
onDidCreateNewFileEmitter: Emitter<DidCreateNewResourceEvent> = ...
onDidCreateNewFolderEmitter: Emitter<DidCreateNewResourceEvent> = ...
openerService: OpenerService
openers: OpenHandler[]
selectionService: SelectionService
workspaceService: WorkspaceService

Accessors

Methods

  • addFolderToWorkspace(...uris: URI[]): Promise<void>
  • areMultipleOpenHandlersPresent(openers: OpenHandler[], uri: URI): boolean
  • areWorkspaceRoots(uris: URI[]): boolean
  • getDefaultFileConfig(): { fileExtension: string; fileName: string }
  • getDirectory(candidate: URI): Promise<undefined | FileStat>
  • getParent(candidate: URI): Promise<undefined | FileStat>
  • isWorkspaceRoot(uri: URI): boolean
  • newMultiUriAwareCommandHandler(handler: UriCommandHandler<URI[]>): UriAwareCommandHandler<URI[]>
  • newUriAwareCommandHandler(handler: UriCommandHandler<URI>): UriAwareCommandHandler<URI>
  • registerCommands(registry: CommandRegistry): void
  • registerOpenWith(registry: CommandRegistry): Promise<void>
  • removeFolderFromWorkspace(uris: URI[]): Promise<void>
  • saveWorkspaceWithPrompt(registry: CommandRegistry): Promise<void>
  • trimFileName(name: string): string
  • 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>

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