Skip to content

Commit d2a6f38

Browse files
author
Akos Kitta
committed
feat: simplify board and port handling
Closes #1319 Signed-off-by: Akos Kitta <[email protected]>
1 parent e17472e commit d2a6f38

Some content is hidden

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

52 files changed

+3044
-3052
lines changed

Diff for: arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import { SketchesServiceClientImpl } from './sketches-service-client-impl';
2727
import { CoreService, CoreServicePath } from '../common/protocol/core-service';
2828
import { BoardsListWidget } from './boards/boards-list-widget';
2929
import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution';
30-
import { BoardsServiceProvider } from './boards/boards-service-provider';
30+
import {
31+
BoardListDumper,
32+
BoardsServiceProvider,
33+
} from './boards/boards-service-provider';
3134
import { WorkspaceService as TheiaWorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
3235
import { WorkspaceService } from './theia/workspace/workspace-service';
3336
import { OutlineViewContribution as TheiaOutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
@@ -61,7 +64,6 @@ import {
6164
BoardsConfigDialog,
6265
BoardsConfigDialogProps,
6366
} from './boards/boards-config-dialog';
64-
import { BoardsConfigDialogWidget } from './boards/boards-config-dialog-widget';
6567
import { ScmContribution as TheiaScmContribution } from '@theia/scm/lib/browser/scm-contribution';
6668
import { ScmContribution } from './theia/scm/scm-contribution';
6769
import { SearchInWorkspaceFrontendContribution as TheiaSearchInWorkspaceFrontendContribution } from '@theia/search-in-workspace/lib/browser/search-in-workspace-frontend-contribution';
@@ -358,7 +360,7 @@ import { UpdateArduinoState } from './contributions/update-arduino-state';
358360
import { TerminalWidgetImpl } from './theia/terminal/terminal-widget-impl';
359361
import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
360362
import { TerminalFrontendContribution } from './theia/terminal/terminal-frontend-contribution';
361-
import { TerminalFrontendContribution as TheiaTerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution'
363+
import { TerminalFrontendContribution as TheiaTerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution';
362364

363365
// Hack to fix copy/cut/paste issue after electron version update in Theia.
364366
// https://github.com/eclipse-theia/theia/issues/12487
@@ -447,6 +449,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
447449
bind(BoardsServiceProvider).toSelf().inSingletonScope();
448450
bind(FrontendApplicationContribution).toService(BoardsServiceProvider);
449451
bind(CommandContribution).toService(BoardsServiceProvider);
452+
bind(BoardListDumper).toSelf().inSingletonScope();
450453

451454
// To be able to track, and update the menu based on the core settings (aka. board details) of the currently selected board.
452455
bind(FrontendApplicationContribution)
@@ -480,7 +483,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
480483
bind(OpenHandler).toService(BoardsListWidgetFrontendContribution);
481484

482485
// Board select dialog
483-
bind(BoardsConfigDialogWidget).toSelf().inSingletonScope();
484486
bind(BoardsConfigDialog).toSelf().inSingletonScope();
485487
bind(BoardsConfigDialogProps).toConstantValue({
486488
title: nls.localize(
@@ -1034,5 +1036,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
10341036
// Patch terminal issues.
10351037
rebind(TerminalWidget).to(TerminalWidgetImpl).inTransientScope();
10361038
bind(TerminalFrontendContribution).toSelf().inSingletonScope();
1037-
rebind(TheiaTerminalFrontendContribution).toService(TerminalFrontendContribution);
1039+
rebind(TheiaTerminalFrontendContribution).toService(
1040+
TerminalFrontendContribution
1041+
);
10381042
});

0 commit comments

Comments
 (0)