()
| 6 | name: 'Extends Editor Tree', |
| 7 | dispose() {}, |
| 8 | activate() { |
| 9 | molecule.editorTree.onSelect((tabId, groupId) => { |
| 10 | molecule.editor.setActive(groupId, tabId); |
| 11 | }); |
| 12 | |
| 13 | molecule.editorTree.onClose((tabId, groupId) => { |
| 14 | molecule.editor.closeTab(tabId, groupId); |
| 15 | }); |
| 16 | |
| 17 | molecule.editorTree.onCloseOthers((tabItem, groupId) => { |
| 18 | molecule.editor.closeOther(tabItem, groupId); |
| 19 | }); |
| 20 | |
| 21 | molecule.editorTree.onCloseAll((groupId) => { |
| 22 | if (groupId) { |
| 23 | molecule.editor.closeAll(groupId); |
| 24 | } else { |
| 25 | const { groups } = molecule.editor.getState(); |
| 26 | groups?.forEach((group) => { |
| 27 | molecule.editor.closeAll(group.id!); |
| 28 | }); |
| 29 | } |
| 30 | }); |
| 31 | }, |
| 32 | }; |
nothing calls this directly
no test coverage detected