Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MiniBrowserOpenHandler

Hierarchy

Implements

Index

Properties

Readonly id

id: string = MiniBrowser.ID

Readonly label

label: "Preview" = "Preview"

Protected Readonly labelProvider

labelProvider: LabelProvider

Protected Readonly locationMapperService

locationMapperService: LocationMapperService

Protected Readonly miniBrowserService

miniBrowserService: MiniBrowserService

Readonly onCreated

onCreated: Event<MiniBrowser> = this.onCreatedEmitter.event

Emit when a new widget is created.

Protected Readonly onCreatedEmitter

onCreatedEmitter: Emitter<W> = new Emitter<W>()

Protected Readonly openerService

openerService: OpenerService

Protected Readonly quickInputService

quickInputService: QuickInputService

Protected Readonly shell

Protected Readonly supportedExtensions

supportedExtensions: Map<string, number> = new Map()

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.

Protected Readonly widgetManager

widgetManager: WidgetManager

Static PREVIEW_URI

PREVIEW_URI: URI = new URI().withScheme('__minibrowser__preview__')

Accessors

all

Methods

canHandle

  • canHandle(uri: URI): number

Protected canPreviewWidget

  • canPreviewWidget(widget?: Widget): boolean

closeAll

Protected createWidgetOptions

Protected defaultOptions

Protected doOpen

getByUri

Protected getOpenPreviewProps

getOrCreateByUri

Protected getOrCreateWidget

Protected getSourceUri

  • getSourceUri(ref?: Widget): URI | undefined

Protected getUriToPreview

  • getUriToPreview(widget?: Widget): URI | undefined

Protected getWidget

Protected getWidgetToPreview

Protected init

  • init(): void

onStart

  • onStart(): void

open

openPreview

Protected openSource

  • openSource(ref?: Widget): Promise<void>

Protected openUrl

  • openUrl(arg?: undefined | string): Promise<void>

Protected options

Protected preview

  • preview(widget?: Widget): Promise<void>

registerCommands

registerMenus

registerToolbarItems

Protected resetBackground

Protected serializeUri

  • serializeUri(uri: URI): string