()
| 57 | } |
| 58 | |
| 59 | public initView() { |
| 60 | const explorerEvent = { |
| 61 | onClick: this.onClick, |
| 62 | onCollapseChange: this.onCollapseChange, |
| 63 | onActionsContextMenuClick: this.onActionsContextMenuClick, |
| 64 | onToolbarClick: this.onToolbarClick, |
| 65 | }; |
| 66 | |
| 67 | const ExplorerView = connect(this.explorerService, Explorer); |
| 68 | |
| 69 | const id = this.builtinService.getConstants().EXPLORER_ACTIVITY_ITEM; |
| 70 | |
| 71 | if (!id) return; |
| 72 | |
| 73 | const explorePane = { |
| 74 | id, |
| 75 | title: 'EXPLORER', |
| 76 | render() { |
| 77 | return <ExplorerView {...explorerEvent} />; |
| 78 | }, |
| 79 | }; |
| 80 | const { |
| 81 | builtInExplorerActivityItem, |
| 82 | builtInExplorerFolderPanel, |
| 83 | builtInExplorerHeaderToolbar, |
| 84 | } = this.builtinService.getModules(); |
| 85 | |
| 86 | if (builtInExplorerHeaderToolbar) { |
| 87 | this.explorerService.setState({ |
| 88 | headerToolBar: builtInExplorerHeaderToolbar, |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | if (builtInExplorerActivityItem && builtInExplorerFolderPanel) { |
| 93 | this.activityBarService.add(builtInExplorerActivityItem, true); |
| 94 | this.sidebarService.add(explorePane, true); |
| 95 | |
| 96 | // add folder panel |
| 97 | this.explorerService.addPanel({ |
| 98 | ...builtInExplorerFolderPanel, |
| 99 | renderPanel: this.renderFolderTree, |
| 100 | }); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | public readonly onClick = ( |
| 105 | event: React.MouseEvent, |
nothing calls this directly
no test coverage detected