Skip to content

Commit acea4e2

Browse files
author
Akos Kitta
committed
Update package index on 3rd party URLs change.
Closes #637 Closes #906 Signed-off-by: Akos Kitta <[email protected]>
1 parent ea42dc5 commit acea4e2

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

+1010
-661
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
@@ -164,7 +164,7 @@ import { MonacoTextModelService } from './theia/monaco/monaco-text-model-service
164164
import { ResponseServiceImpl } from './response-service-impl';
165165
import {
166166
ResponseService,
167-
ResponseServiceArduino,
167+
ResponseServiceClient,
168168
ResponseServicePath,
169169
} from '../common/protocol/response-service';
170170
import { NotificationCenter } from './notification-center';
@@ -303,6 +303,8 @@ import { CompilerErrors } from './contributions/compiler-errors';
303303
import { WidgetManager } from './theia/core/widget-manager';
304304
import { WidgetManager as TheiaWidgetManager } from '@theia/core/lib/browser/widget-manager';
305305
import { StartupTask } from './widgets/sketchbook/startup-task';
306+
import { IndexesUpdateProgress } from './contributions/indexes-update-progress';
307+
import { Daemon } from './contributions/daemon';
306308

307309
MonacoThemingService.register({
308310
id: 'arduino-theme',
@@ -700,6 +702,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
700702
Contribution.configure(bind, Format);
701703
Contribution.configure(bind, CompilerErrors);
702704
Contribution.configure(bind, StartupTask);
705+
Contribution.configure(bind, IndexesUpdateProgress);
706+
Contribution.configure(bind, Daemon);
703707

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

723727
bind(ResponseService).toService(ResponseServiceImpl);
724-
bind(ResponseServiceArduino).toService(ResponseServiceImpl);
728+
bind(ResponseServiceClient).toService(ResponseServiceImpl);
725729

726730
bind(NotificationCenter).toSelf().inSingletonScope();
727731
bind(FrontendApplicationContribution).toService(NotificationCenter);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '../../common/protocol/boards-service';
99
import { BoardsServiceProvider } from './boards-service-provider';
1010
import { BoardsConfig } from './boards-config';
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

@@ -27,8 +27,8 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
2727
@inject(BoardsServiceProvider)
2828
protected readonly boardsServiceClient: BoardsServiceProvider;
2929

30-
@inject(ResponseServiceArduino)
31-
protected readonly responseService: ResponseServiceArduino;
30+
@inject(ResponseServiceClient)
31+
protected readonly responseService: ResponseServiceClient;
3232

3333
@inject(BoardsListWidgetFrontendContribution)
3434
protected readonly boardsManagerFrontendContribution: BoardsListWidgetFrontendContribution;

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
@@ -74,13 +74,13 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
7474
readonly onAvailablePortsChanged = this.onAvailablePortsChangedEmitter.event;
7575

7676
onStart(): void {
77-
this.notificationCenter.onAttachedBoardsChanged(
77+
this.notificationCenter.onAttachedBoardsDidChange(
7878
this.notifyAttachedBoardsChanged.bind(this)
7979
);
80-
this.notificationCenter.onPlatformInstalled(
80+
this.notificationCenter.onPlatformDidInstall(
8181
this.notifyPlatformInstalled.bind(this)
8282
);
83-
this.notificationCenter.onPlatformUninstalled(
83+
this.notificationCenter.onPlatformDidUninstall(
8484
this.notifyPlatformUninstalled.bind(this)
8585
);
8686

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)