|
1 | 1 | import * as remote from '@theia/core/electron-shared/@electron/remote';
|
2 | 2 | import { inject, injectable } from '@theia/core/shared/inversify';
|
3 |
| -import { Command, CommandRegistry } from '@theia/core/lib/common/command'; |
| 3 | +import { CommandRegistry } from '@theia/core/lib/common/command'; |
4 | 4 | import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
5 | 5 | import { PreferenceService } from '@theia/core/lib/browser/preferences/preference-service';
|
6 | 6 | import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
@@ -29,7 +29,6 @@ import {
|
29 | 29 | } from '../../../common/protocol/sketches-service-client-impl';
|
30 | 30 | import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
31 | 31 | import { URI } from '../../contributions/contribution';
|
32 |
| -import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; |
33 | 32 | import { EditorManager } from '@theia/editor/lib/browser';
|
34 | 33 | import { SketchControl } from '../../contributions/sketch-control';
|
35 | 34 | import { CloudSketchbookCommands } from '../cloud-sketchbook/cloud-sketchbook-contributions';
|
@@ -71,12 +70,6 @@ export class SketchbookWidgetContribution
|
71 | 70 | @inject(FileService)
|
72 | 71 | protected readonly fileService: FileService;
|
73 | 72 |
|
74 |
| - @inject(CommandRegistry) |
75 |
| - protected readonly commandRegistry: CommandRegistry; |
76 |
| - |
77 |
| - @inject(FrontendApplicationStateService) |
78 |
| - private readonly app: FrontendApplicationStateService; |
79 |
| - |
80 | 73 | @inject(EditorManager)
|
81 | 74 | protected readonly editorManager: EditorManager;
|
82 | 75 |
|
@@ -108,12 +101,6 @@ export class SketchbookWidgetContribution
|
108 | 101 | this.mainMenuManager.update();
|
109 | 102 | }
|
110 | 103 | });
|
111 |
| - |
112 |
| - this.app.reachedState('ready').then(() => this.onReady()); |
113 |
| - } |
114 |
| - |
115 |
| - onReady(): void { |
116 |
| - this.runEncodedCommands(); |
117 | 104 | }
|
118 | 105 |
|
119 | 106 | async initializeLayout(): Promise<void> {
|
@@ -272,18 +259,4 @@ export class SketchbookWidgetContribution
|
272 | 259 | }
|
273 | 260 | });
|
274 | 261 | }
|
275 |
| - |
276 |
| - protected runEncodedCommands(): void { |
277 |
| - const params = new URLSearchParams(window.location.search); |
278 |
| - const encoded = params.get('commands'); |
279 |
| - if (!encoded) return; |
280 |
| - |
281 |
| - const commands = JSON.parse(decodeURIComponent(encoded)); |
282 |
| - |
283 |
| - if (Array.isArray(commands)) { |
284 |
| - commands.forEach((c: Command) => { |
285 |
| - this.commandRegistry.executeCommand(c.id); |
286 |
| - }); |
287 |
| - } |
288 |
| - } |
289 | 262 | }
|
0 commit comments