@@ -3,7 +3,6 @@ import { FileSystem } from '@theia/filesystem/lib/common/filesystem';
3
3
import { CommandService } from '@theia/core/lib/common/command' ;
4
4
import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service' ;
5
5
import { FrontendApplication } from '@theia/core/lib/browser/frontend-application' ;
6
- import { EditorMode } from '../editor-mode' ;
7
6
import { ArduinoCommands } from '../arduino-commands' ;
8
7
9
8
@injectable ( )
@@ -18,21 +17,13 @@ export class ArduinoFrontendApplication extends FrontendApplication {
18
17
@inject ( CommandService )
19
18
protected readonly commandService : CommandService ;
20
19
21
- @inject ( EditorMode )
22
- protected readonly editorMode : EditorMode ;
23
-
24
20
protected async initializeLayout ( ) : Promise < void > {
25
21
await super . initializeLayout ( ) ;
26
- // If not in PRO mode, we open the sketch file with all the related files.
27
- // Otherwise, we reuse the workbench's restore functionality and we do not open anything at all.
28
- // TODO: check `otherwise`. Also, what if we check for opened editors, instead of blindly opening them?
29
- if ( ! this . editorMode . proMode ) {
30
- const roots = await this . workspaceService . roots ;
31
- for ( const root of roots ) {
32
- const exists = await this . fileSystem . exists ( root . uri ) ;
33
- if ( exists ) {
34
- await this . commandService . executeCommand ( ArduinoCommands . OPEN_SKETCH_FILES . id , root . uri ) ;
35
- }
22
+ const roots = await this . workspaceService . roots ;
23
+ for ( const root of roots ) {
24
+ const exists = await this . fileSystem . exists ( root . uri ) ;
25
+ if ( exists ) {
26
+ await this . commandService . executeCommand ( ArduinoCommands . OPEN_SKETCH_FILES . id , root . uri ) ;
36
27
}
37
28
}
38
29
}
0 commit comments