UNPKG

@yuebai008/cli

Version:

Command line interface for rapid qg-minigame development

1 lines 1.03 kB
import*as Common from"../../core/common/common.js";import*as Host from"../../core/host/host.js";import{PanelUtils}from"../../panels/utils/utils.js";import*as IconButton from"../../ui/components/icon_button/icon_button.js";import{FilteredUISourceCodeListProvider}from"./FilteredUISourceCodeListProvider.js";import{SourcesView}from"./SourcesView.js";export class OpenFileQuickOpen extends FilteredUISourceCodeListProvider{attach(){this.setDefaultScores(SourcesView.defaultUISourceCodeScores()),super.attach()}uiSourceCodeSelected(e,o,t){Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectFileFromFilePicker),e&&("number"==typeof o?Common.Revealer.reveal(e.uiLocation(o,t)):Common.Revealer.reveal(e))}filterProject(e){return!e.isServiceProject()}renderItem(e,o,t,r){super.renderItem(e,o,t,r);const i=new IconButton.Icon.Icon,s=PanelUtils.iconDataForResourceType(this.itemContentTypeAt(e));i.data={...s,width:"20px",height:"20px"},t.parentElement?.parentElement?.insertBefore(i,t.parentElement)}renderAsTwoRows(){return!0}}