Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • NavigatableWidgetOpenHandler<MiniBrowser>
    • MiniBrowserOpenHandler

Implements

  • FrontendApplicationContribution
  • CommandContribution
  • MenuContribution
  • TabBarToolbarContribution

Index

Constructors

Properties

id: string = MiniBrowser.ID
label: string = ...
labelProvider: LabelProvider
locationMapperService: LocationMapperService
miniBrowserService: MiniBrowserService
openerService: OpenerService
quickInputService: QuickInputService
supportedExtensions: Map<string, number> = ...

Instead of going to the backend with each file URI to ask whether it can handle the current file or not, we have this map of extension and priority pairs that we populate at application startup. The real advantage of this approach is the following: Phosphor cannot run async code when invoking isEnabled/isVisible for the command handlers so the menu item would be always visible for the user even if the file type cannot be handled eventually. Hopefully, we could get rid of this hack once we have migrated the existing Phosphor code to React.

PREVIEW_URI: URI = ...

Methods

  • canPreviewWidget(widget?: Widget): boolean
  • getSourceUri(ref?: Widget): undefined | URI
  • getUriToPreview(widget?: Widget): undefined | URI
  • getWidgetToPreview(widget?: Widget): undefined | NavigatableWidget
  • onStart(): void
  • openSource(ref?: Widget): Promise<void>
  • openUrl(arg?: string): Promise<void>
  • preview(widget?: Widget): Promise<void>
  • registerCommands(commands: CommandRegistry): void
  • registerMenus(menus: MenuModelRegistry): void
  • registerToolbarItems(toolbar: TabBarToolbarRegistry): void
  • resetBackground(uri: URI): MaybePromise<boolean>