File tree 1 file changed +41
-1
lines changed
1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { ReactElement } from 'react' ;
2
2
import { ILocale } from 'mo/i18n' ;
3
3
import { container } from 'tsyringe' ;
4
- import * as controllers from 'mo/controller' ;
5
4
import type { Controller } from 'mo/react' ;
6
5
import { defaultExtensions } from 'mo/extensions' ;
7
6
import { GlobalEvent } from 'mo/common/event' ;
8
7
import { IConfigProps } from 'mo/provider/create' ;
9
8
import { IExtension } from 'mo/model' ;
10
9
import { STORE_KEY } from 'mo/i18n/localeService' ;
11
10
import molecule from 'mo' ;
11
+ import {
12
+ ActivityBarController ,
13
+ EditorController ,
14
+ EditorTreeController ,
15
+ ExplorerController ,
16
+ ExtensionController ,
17
+ FolderTreeController ,
18
+ LayoutController ,
19
+ MenuBarController ,
20
+ NotificationController ,
21
+ OutlineController ,
22
+ PanelController ,
23
+ ProblemsController ,
24
+ SearchController ,
25
+ SettingsController ,
26
+ SidebarController ,
27
+ StatusBarController ,
28
+ } from 'mo/controller' ;
12
29
13
30
interface IInstanceServiceProps {
14
31
getConfig : ( ) => IConfigProps ;
@@ -70,6 +87,29 @@ export default class InstanceService
70
87
) ;
71
88
this . initialLocaleService ( languages ) ;
72
89
90
+ const controllers = [
91
+ ActivityBarController ,
92
+ EditorController ,
93
+ /**
94
+ * Explorer should called before EditorTreeController,
95
+ * @refer https://github.com/DTStack/molecule/issues/829
96
+ */
97
+ ExplorerController ,
98
+ EditorTreeController ,
99
+ ExtensionController ,
100
+ FolderTreeController ,
101
+ LayoutController ,
102
+ MenuBarController ,
103
+ NotificationController ,
104
+ OutlineController ,
105
+ PanelController ,
106
+ ProblemsController ,
107
+ SearchController ,
108
+ SettingsController ,
109
+ SidebarController ,
110
+ StatusBarController ,
111
+ ] ;
112
+
73
113
// resolve all controllers, and call `initView` to inject initial values into services
74
114
Object . keys ( controllers ) . forEach ( ( key ) => {
75
115
const module = controllers [ key ] ;
You can’t perform that action at this time.
0 commit comments