Skip to content

Commit 2ebb2f9

Browse files
author
Akos Kitta
committed
Update package index on 3rd party URLs change.
Closes #637 Closes #906 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 7f2b849 commit 2ebb2f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1043
-695
lines changed

arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service
163163
import { ResponseServiceImpl } from './response-service-impl';
164164
import {
165165
ResponseService,
166-
ResponseServiceArduino,
166+
ResponseServiceClient,
167167
ResponseServicePath,
168168
} from '../common/protocol/response-service';
169169
import { NotificationCenter } from './notification-center';
@@ -302,6 +302,8 @@ import { CompilerErrors } from './contributions/compiler-errors';
302302
import { WidgetManager } from './theia/core/widget-manager';
303303
import { WidgetManager as TheiaWidgetManager } from '@theia/core/lib/browser/widget-manager';
304304
import { StartupTask } from './widgets/sketchbook/startup-task';
305+
import { IndexesUpdateProgress } from './contributions/indexes-update-progress';
306+
import { Daemon } from './contributions/daemon';
305307

306308
MonacoThemingService.register({
307309
id: 'arduino-theme',
@@ -695,6 +697,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
695697
Contribution.configure(bind, Format);
696698
Contribution.configure(bind, CompilerErrors);
697699
Contribution.configure(bind, StartupTask);
700+
Contribution.configure(bind, IndexesUpdateProgress);
701+
Contribution.configure(bind, Daemon);
698702

699703
// Disabled the quick-pick customization from Theia when multiple formatters are available.
700704
// Use the default VS Code behavior, and pick the first one. In the IDE2, clang-format has `exclusive` selectors.
@@ -716,7 +720,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
716720
});
717721

718722
bind(ResponseService).toService(ResponseServiceImpl);
719-
bind(ResponseServiceArduino).toService(ResponseServiceImpl);
723+
bind(ResponseServiceClient).toService(ResponseServiceImpl);
720724

721725
bind(NotificationCenter).toSelf().inSingletonScope();
722726
bind(FrontendApplicationContribution).toService(NotificationCenter);

arduino-ide-extension/src/browser/boards/boards-auto-installer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Port,
99
} from '../../common/protocol/boards-service';
1010
import { BoardsServiceProvider } from './boards-service-provider';
11-
import { Installable, ResponseServiceArduino } from '../../common/protocol';
11+
import { Installable, ResponseServiceClient } from '../../common/protocol';
1212
import { BoardsListWidgetFrontendContribution } from './boards-widget-frontend-contribution';
1313
import { nls } from '@theia/core/lib/common';
1414
import { NotificationCenter } from '../notification-center';
@@ -45,8 +45,8 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
4545
@inject(BoardsServiceProvider)
4646
protected readonly boardsServiceClient: BoardsServiceProvider;
4747

48-
@inject(ResponseServiceArduino)
49-
protected readonly responseService: ResponseServiceArduino;
48+
@inject(ResponseServiceClient)
49+
protected readonly responseService: ResponseServiceClient;
5050

5151
@inject(BoardsListWidgetFrontendContribution)
5252
protected readonly boardsManagerFrontendContribution: BoardsListWidgetFrontendContribution;
@@ -86,7 +86,7 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
8686
// installed, though this is not strictly necessary. It's more of a
8787
// cleanup, to ensure the related variables are representative of
8888
// current state.
89-
this.notificationCenter.onPlatformInstalled((installed) => {
89+
this.notificationCenter.onPlatformDidInstall((installed) => {
9090
if (this.lastRefusedPackageId === installed.item.id) {
9191
this.clearLastRefusedPromptInfo();
9292
}

arduino-ide-extension/src/browser/boards/boards-config.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class BoardsConfig extends React.Component<
113113
);
114114
}
115115
}),
116-
this.props.notificationCenter.onAttachedBoardsChanged((event) =>
116+
this.props.notificationCenter.onAttachedBoardsDidChange((event) =>
117117
this.updatePorts(
118118
event.newState.ports,
119119
AttachedBoardsChangeEvent.diff(event).detached.ports
@@ -126,19 +126,19 @@ export class BoardsConfig extends React.Component<
126126
);
127127
}
128128
),
129-
this.props.notificationCenter.onPlatformInstalled(() =>
129+
this.props.notificationCenter.onPlatformDidInstall(() =>
130130
this.updateBoards(this.state.query)
131131
),
132-
this.props.notificationCenter.onPlatformUninstalled(() =>
132+
this.props.notificationCenter.onPlatformDidUninstall(() =>
133133
this.updateBoards(this.state.query)
134134
),
135-
this.props.notificationCenter.onIndexUpdated(() =>
135+
this.props.notificationCenter.onIndexDidUpdate(() =>
136136
this.updateBoards(this.state.query)
137137
),
138-
this.props.notificationCenter.onDaemonStarted(() =>
138+
this.props.notificationCenter.onDaemonDidStart(() =>
139139
this.updateBoards(this.state.query)
140140
),
141-
this.props.notificationCenter.onDaemonStopped(() =>
141+
this.props.notificationCenter.onDaemonDidStop(() =>
142142
this.setState({ searchResults: [] })
143143
),
144144
this.props.onFilteredTextDidChangeEvent((query) =>

arduino-ide-extension/src/browser/boards/boards-data-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class BoardsDataStore implements FrontendApplicationContribution {
3333
protected readonly onChangedEmitter = new Emitter<void>();
3434

3535
onStart(): void {
36-
this.notificationCenter.onPlatformInstalled(async ({ item }) => {
36+
this.notificationCenter.onPlatformDidInstall(async ({ item }) => {
3737
let shouldFireChanged = false;
3838
for (const fqbn of item.boards
3939
.map(({ fqbn }) => fqbn)

arduino-ide-extension/src/browser/boards/boards-list-widget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ export class BoardsListWidget extends ListWidget<BoardsPackage> {
3333
protected override init(): void {
3434
super.init();
3535
this.toDispose.pushAll([
36-
this.notificationCenter.onPlatformInstalled(() =>
36+
this.notificationCenter.onPlatformDidInstall(() =>
3737
this.refresh(undefined)
3838
),
39-
this.notificationCenter.onPlatformUninstalled(() =>
39+
this.notificationCenter.onPlatformDidUninstall(() =>
4040
this.refresh(undefined)
4141
),
4242
]);

arduino-ide-extension/src/browser/boards/boards-service-provider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
7777
private readonly _reconciled = new Deferred<void>();
7878

7979
onStart(): void {
80-
this.notificationCenter.onAttachedBoardsChanged(
80+
this.notificationCenter.onAttachedBoardsDidChange(
8181
this.notifyAttachedBoardsChanged.bind(this)
8282
);
83-
this.notificationCenter.onPlatformInstalled(
83+
this.notificationCenter.onPlatformDidInstall(
8484
this.notifyPlatformInstalled.bind(this)
8585
);
86-
this.notificationCenter.onPlatformUninstalled(
86+
this.notificationCenter.onPlatformDidUninstall(
8787
this.notifyPlatformUninstalled.bind(this)
8888
);
8989

arduino-ide-extension/src/browser/contributions/add-zip-library.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ArduinoMenus } from '../menu/arduino-menus';
77
import {
88
Installable,
99
LibraryService,
10-
ResponseServiceArduino,
10+
ResponseServiceClient,
1111
} from '../../common/protocol';
1212
import {
1313
SketchContribution,
@@ -22,8 +22,8 @@ export class AddZipLibrary extends SketchContribution {
2222
@inject(EnvVariablesServer)
2323
protected readonly envVariableServer: EnvVariablesServer;
2424

25-
@inject(ResponseServiceArduino)
26-
protected readonly responseService: ResponseServiceArduino;
25+
@inject(ResponseServiceClient)
26+
protected readonly responseService: ResponseServiceClient;
2727

2828
@inject(LibraryService)
2929
protected readonly libraryService: LibraryService;

arduino-ide-extension/src/browser/contributions/board-selection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ PID: ${PID}`;
101101
}
102102

103103
override onStart(): void {
104-
this.notificationCenter.onPlatformInstalled(() => this.updateMenus());
105-
this.notificationCenter.onPlatformUninstalled(() => this.updateMenus());
104+
this.notificationCenter.onPlatformDidInstall(() => this.updateMenus());
105+
this.notificationCenter.onPlatformDidUninstall(() => this.updateMenus());
106106
this.boardsServiceProvider.onBoardsConfigChanged(() => this.updateMenus());
107107
this.boardsServiceProvider.onAvailableBoardsChanged(() =>
108108
this.updateMenus()
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { nls } from '@theia/core';
2+
import { inject, injectable } from '@theia/core/shared/inversify';
3+
import { ArduinoDaemon } from '../../common/protocol';
4+
import { Contribution, Command, CommandRegistry } from './contribution';
5+
6+
@injectable()
7+
export class Daemon extends Contribution {
8+
@inject(ArduinoDaemon)
9+
private readonly daemon: ArduinoDaemon;
10+
11+
override registerCommands(registry: CommandRegistry): void {
12+
registry.registerCommand(Daemon.Commands.START_DAEMON, {
13+
execute: () => this.daemon.start(),
14+
});
15+
registry.registerCommand(Daemon.Commands.STOP_DAEMON, {
16+
execute: () => this.daemon.stop(),
17+
});
18+
registry.registerCommand(Daemon.Commands.RESTART_DAEMON, {
19+
execute: () => this.daemon.restart(),
20+
});
21+
}
22+
}
23+
export namespace Daemon {
24+
export namespace Commands {
25+
export const START_DAEMON: Command = {
26+
id: 'arduino-start-daemon',
27+
label: nls.localize('arduino/daemon/start', 'Start Daemon'),
28+
category: 'Arduino',
29+
};
30+
export const STOP_DAEMON: Command = {
31+
id: 'arduino-stop-daemon',
32+
label: nls.localize('arduino/daemon/stop', 'Stop Daemon'),
33+
category: 'Arduino',
34+
};
35+
export const RESTART_DAEMON: Command = {
36+
id: 'arduino-restart-daemon',
37+
label: nls.localize('arduino/daemon/restart', 'Restart Daemon'),
38+
category: 'Arduino',
39+
};
40+
}
41+
}

arduino-ide-extension/src/browser/contributions/debug.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export class Debug extends SketchContribution {
8383
this.boardsServiceProvider.onBoardsConfigChanged(({ selectedBoard }) =>
8484
this.refreshState(selectedBoard)
8585
);
86-
this.notificationCenter.onPlatformInstalled(() => this.refreshState());
87-
this.notificationCenter.onPlatformUninstalled(() => this.refreshState());
86+
this.notificationCenter.onPlatformDidInstall(() => this.refreshState());
87+
this.notificationCenter.onPlatformDidUninstall(() => this.refreshState());
8888
}
8989

9090
override onReady(): MaybePromise<void> {

0 commit comments

Comments
 (0)