@@ -5,11 +5,7 @@ import {
5
5
postConstruct ,
6
6
} from '@theia/core/shared/inversify' ;
7
7
import * as React from '@theia/core/shared/react' ;
8
- import {
9
- BoardsService ,
10
- LibraryService ,
11
- SketchesService ,
12
- } from '../common/protocol' ;
8
+ import { SketchesService } from '../common/protocol' ;
13
9
import {
14
10
MAIN_MENU_BAR ,
15
11
MenuContribution ,
@@ -19,7 +15,6 @@ import {
19
15
Dialog ,
20
16
FrontendApplication ,
21
17
FrontendApplicationContribution ,
22
- LocalStorageService ,
23
18
OnWillStopAction ,
24
19
} from '@theia/core/lib/browser' ;
25
20
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution' ;
@@ -52,8 +47,6 @@ import { MonitorViewContribution } from './serial/monitor/monitor-view-contribut
52
47
import { ArduinoToolbar } from './toolbar/arduino-toolbar' ;
53
48
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state' ;
54
49
55
- const INIT_LIBS_AND_PACKAGES = 'initializedLibsAndPackages' ;
56
-
57
50
@injectable ( )
58
51
export class ArduinoFrontendContribution
59
52
implements
@@ -66,12 +59,6 @@ export class ArduinoFrontendContribution
66
59
@inject ( MessageService )
67
60
private readonly messageService : MessageService ;
68
61
69
- @inject ( BoardsService )
70
- private readonly boardsService : BoardsService ;
71
-
72
- @inject ( LibraryService )
73
- private readonly libraryService : LibraryService ;
74
-
75
62
@inject ( BoardsServiceProvider )
76
63
private readonly boardsServiceProvider : BoardsServiceProvider ;
77
64
@@ -87,35 +74,11 @@ export class ArduinoFrontendContribution
87
74
@inject ( SketchesServiceClientImpl )
88
75
private readonly sketchServiceClient : SketchesServiceClientImpl ;
89
76
90
- @inject ( LocalStorageService )
91
- private readonly localStorageService : LocalStorageService ;
92
-
93
77
@inject ( FrontendApplicationStateService )
94
78
private readonly appStateService : FrontendApplicationStateService ;
95
79
96
80
@postConstruct ( )
97
81
protected async init ( ) : Promise < void > {
98
- const isFirstStartup = ! ( await this . localStorageService . getData (
99
- INIT_LIBS_AND_PACKAGES
100
- ) ) ;
101
- if ( isFirstStartup ) {
102
- await this . localStorageService . setData ( INIT_LIBS_AND_PACKAGES , true ) ;
103
- const avrPackage = await this . boardsService . getBoardPackage ( {
104
- id : 'arduino:avr' ,
105
- } ) ;
106
- const builtInLibrary = (
107
- await this . libraryService . search ( {
108
- query : 'Arduino_BuiltIn' ,
109
- } )
110
- ) [ 0 ] ;
111
-
112
- ! ! avrPackage && ( await this . boardsService . install ( { item : avrPackage } ) ) ;
113
- ! ! builtInLibrary &&
114
- ( await this . libraryService . install ( {
115
- item : builtInLibrary ,
116
- installDependencies : true ,
117
- } ) ) ;
118
- }
119
82
if ( ! window . navigator . onLine ) {
120
83
// tslint:disable-next-line:max-line-length
121
84
this . messageService . warn (
0 commit comments