|
1 | 1 | import '../../src/browser/style/index.css';
|
2 |
| -import { |
3 |
| -Container, |
4 |
| -ContainerModule, |
5 |
| -interfaces, |
6 |
| -} from '@theia/core/shared/inversify'; |
| 2 | +import { Container, ContainerModule } from '@theia/core/shared/inversify'; |
7 | 3 | import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
|
8 | 4 | import { CommandContribution } from '@theia/core/lib/common/command';
|
9 | 5 | import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
10 | 6 | import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
11 | 7 | import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
|
12 |
| -import { |
13 |
| -FrontendApplicationContribution, |
14 |
| -FrontendApplication as TheiaFrontendApplication, |
15 |
| -} from '@theia/core/lib/browser/frontend-application'; |
| 8 | +import { FrontendApplication as TheiaFrontendApplication } from '@theia/core/lib/browser/frontend-application'; |
| 9 | +import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution'; |
16 | 10 | import { LibraryListWidget } from './library/library-list-widget';
|
17 | 11 | import { ArduinoFrontendContribution } from './arduino-frontend-contribution';
|
18 | 12 | import {
|
@@ -57,8 +51,6 @@ import {
|
57 | 51 | DockPanelRenderer as TheiaDockPanelRenderer,
|
58 | 52 | TabBarRendererFactory,
|
59 | 53 | ContextMenuRenderer,
|
60 |
| -createTreeContainer, |
61 |
| -TreeWidget, |
62 | 54 | } from '@theia/core/lib/browser';
|
63 | 55 | import { MenuContribution } from '@theia/core/lib/common/menu';
|
64 | 56 | import {
|
@@ -97,7 +89,6 @@ import {
|
97 | 89 | ArduinoDaemonPath,
|
98 | 90 | ArduinoDaemon,
|
99 | 91 | } from '../common/protocol/arduino-daemon';
|
100 |
| -import { EditorCommandContribution as TheiaEditorCommandContribution } from '@theia/editor/lib/browser'; |
101 | 92 | import {
|
102 | 93 | FrontendConnectionStatusService,
|
103 | 94 | ApplicationConnectionStatusContribution,
|
@@ -186,7 +177,6 @@ import {
|
186 | 177 | import { About } from './contributions/about';
|
187 | 178 | import { IconThemeService } from '@theia/core/lib/browser/icon-theme-service';
|
188 | 179 | import { TabBarRenderer } from './theia/core/tab-bars';
|
189 |
| -import { EditorCommandContribution } from './theia/editor/editor-command'; |
190 | 180 | import { NavigatorTabBarDecorator as TheiaNavigatorTabBarDecorator } from '@theia/navigator/lib/browser/navigator-tab-bar-decorator';
|
191 | 181 | import { NavigatorTabBarDecorator } from './theia/navigator/navigator-tab-bar-decorator';
|
192 | 182 | import { Debug, DebugDisabledStatusMessageSource } from './contributions/debug';
|
@@ -275,7 +265,7 @@ import {
|
275 | 265 | IDEUpdaterDialog,
|
276 | 266 | IDEUpdaterDialogProps,
|
277 | 267 | } from './dialogs/ide-updater/ide-updater-dialog';
|
278 |
| -import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider'; |
| 268 | +import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-source'; |
279 | 269 | import { MonitorModel } from './monitor-model';
|
280 | 270 | import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
|
281 | 271 | import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
|
@@ -295,10 +285,6 @@ import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-gen
|
295 | 285 | import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
|
296 | 286 | import { AboutDialog } from './theia/core/about-dialog';
|
297 | 287 | import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
|
298 |
| -import { |
299 |
| -SurveyNotificationService, |
300 |
| -SurveyNotificationServicePath, |
301 |
| -} from '../common/protocol/survey-service'; |
302 | 288 | import { WindowContribution } from './theia/core/window-contribution';
|
303 | 289 | import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
|
304 | 290 | import { CoreErrorHandler } from './contributions/core-error-handler';
|
@@ -381,19 +367,13 @@ import { DebugSessionWidget } from '@theia/debug/lib/browser/view/debug-session-
|
381 | 367 | import { DebugConfigurationWidget } from './theia/debug/debug-configuration-widget';
|
382 | 368 | import { DebugConfigurationWidget as TheiaDebugConfigurationWidget } from '@theia/debug/lib/browser/view/debug-configuration-widget';
|
383 | 369 | import { DebugToolBar } from '@theia/debug/lib/browser/view/debug-toolbar-widget';
|
384 |
| -import { |
385 |
| -PluginTree, |
386 |
| -PluginTreeModel, |
387 |
| -TreeViewWidgetOptions, |
388 |
| -VIEW_ITEM_CONTEXT_MENU, |
389 |
| -} from '@theia/plugin-ext/lib/main/browser/view/tree-view-widget'; |
390 |
| -import { TreeViewDecoratorService } from '@theia/plugin-ext/lib/main/browser/view/tree-view-decorator-service'; |
391 |
| -import { PLUGIN_VIEW_DATA_FACTORY_ID } from '@theia/plugin-ext/lib/main/browser/view/plugin-view-registry'; |
392 |
| -import { TreeViewWidget } from './theia/plugin-ext/tree-view-widget'; |
| 370 | + |
393 | 371 | import {
|
394 | 372 | VersionWelcomeDialog,
|
395 | 373 | VersionWelcomeDialogProps,
|
396 | 374 | } from './dialogs/version-welcome-dialog';
|
| 375 | +import { TestViewContribution as TheiaTestViewContribution } from '@theia/test/lib/browser/view/test-view-contribution'; |
| 376 | +import { TestViewContribution } from './theia/test/test-view-contribution'; |
397 | 377 |
|
398 | 378 | // Hack to fix copy/cut/paste issue after electron version update in Theia.
|
399 | 379 | // https://.com/eclipse-theia/theia/issues/12487
|
@@ -574,15 +554,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
574 | 554 | WorkspaceVariableContribution
|
575 | 555 | );
|
576 | 556 |
|
577 |
| -bind(SurveyNotificationService) |
578 |
| -.toDynamicValue((context) => { |
579 |
| -return ElectronIpcConnectionProvider.createProxy( |
580 |
| -context.container, |
581 |
| -SurveyNotificationServicePath |
582 |
| -); |
583 |
| -}) |
584 |
| -.inSingletonScope(); |
585 |
| - |
586 | 557 | // Layout and shell customizations.
|
587 | 558 | rebind(TheiaOutlineViewContribution)
|
588 | 559 | .to(OutlineViewContribution)
|
@@ -856,13 +827,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
856 | 827 | );
|
857 | 828 | });
|
858 | 829 |
|
859 |
| -// Workaround for https://.com/eclipse-theia/theia/issues/8722 |
860 |
| -// Do not trigger a save on IDE startup if `"editor.autoSave": "on"` was set as a preference. |
861 |
| -// Note: `"editor.autoSave" was renamed to `"files.autoSave" and `"on"` was replaced with three |
862 |
| -// different cases, but we treat `!== 'off'` as auto save enabled. (https://.com/eclipse-theia/theia/issues/10812) |
863 |
| -bind(EditorCommandContribution).toSelf().inSingletonScope(); |
864 |
| -rebind(TheiaEditorCommandContribution).toService(EditorCommandContribution); |
865 |
| - |
866 | 830 | // Silent the badge decoration in the Explorer view.
|
867 | 831 | bind(NavigatorTabBarDecorator).toSelf().inSingletonScope();
|
868 | 832 | rebind(TheiaNavigatorTabBarDecorator).toService(NavigatorTabBarDecorator);
|
@@ -1112,42 +1076,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
1112 | 1076 | TerminalFrontendContribution
|
1113 | 1077 | );
|
1114 | 1078 |
|
1115 |
| -bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget }); |
| 1079 | +// Hides the Test Explorer from the side-bar |
| 1080 | +bind(TestViewContribution).toSelf().inSingletonScope(); |
| 1081 | +rebind(TheiaTestViewContribution).toService(TestViewContribution); |
1116 | 1082 | });
|
1117 |
| - |
1118 |
| -// Align the viewsWelcome rendering with VS Code (https://.com/eclipse-theia/theia/issues/14309) |
1119 |
| -// Copied from Theia code but with customized TreeViewWidget with the customized viewsWelcome rendering |
1120 |
| -// https://.com/eclipse-theia/theia/blob/0c5f69455d9ee355b1a7ca510ffa63d2b20f0c77/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts#L159-L181 |
1121 |
| -function bindViewsWelcome_TheiaGH14309({ |
1122 |
| -bind, |
1123 |
| -widget, |
1124 |
| -}: { |
1125 |
| -bind: interfaces.Bind; |
1126 |
| -widget: interfaces.Newable<TreeWidget>; |
1127 |
| -}) { |
1128 |
| -bind(WidgetFactory) |
1129 |
| -.toDynamicValue(({ container }) => ({ |
1130 |
| -id: PLUGIN_VIEW_DATA_FACTORY_ID, |
1131 |
| -createWidget: (options: TreeViewWidgetOptions) => { |
1132 |
| -const props = { |
1133 |
| -contextMenuPath: VIEW_ITEM_CONTEXT_MENU, |
1134 |
| -expandOnlyOnExpansionToggleClick: true, |
1135 |
| -expansionTogglePadding: 22, |
1136 |
| -globalSelection: true, |
1137 |
| -leftPadding: 8, |
1138 |
| -search: true, |
1139 |
| -multiSelect: options.multiSelect, |
1140 |
| -}; |
1141 |
| -const child = createTreeContainer(container, { |
1142 |
| -props, |
1143 |
| -tree: PluginTree, |
1144 |
| -model: PluginTreeModel, |
1145 |
| -widget, |
1146 |
| -decoratorService: TreeViewDecoratorService, |
1147 |
| -}); |
1148 |
| -child.bind(TreeViewWidgetOptions).toConstantValue(options); |
1149 |
| -return child.get(TreeWidget); |
1150 |
| -}, |
1151 |
| -})) |
1152 |
| -.inSingletonScope(); |
1153 |
| -} |
0 commit comments