Skip to content

[WIP]: Theia 1.27.0 signed #1241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
30 changes: 15 additions & 15 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.6.7",
"@theia/application-package": "1.25.0",
"@theia/core": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/electron": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/markers": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/outline-view": "1.25.0",
"@theia/output": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/search-in-workspace": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/application-package": "1.27.0",
"@theia/core": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/electron": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/markers": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/outline-view": "1.27.0",
"@theia/output": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/search-in-workspace": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"@tippyjs/react": "^4.2.5",
"@types/atob": "^2.1.2",
"@types/auth0-js": "^9.14.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { MonitorViewContribution } from './serial/monitor/monitor-view-contribut
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
import { MonacoThemeRegistry } from '@theia/monaco/lib/browser/textmate/monaco-theme-registry';

@injectable()
export class ArduinoFrontendContribution
Expand Down Expand Up @@ -78,6 +79,9 @@ export class ArduinoFrontendContribution
@inject(FrontendApplicationStateService)
private readonly appStateService: FrontendApplicationStateService;

@inject(MonacoThemeRegistry)
private readonly themeRegistry: MonacoThemeRegistry;

@postConstruct()
protected async init(): Promise<void> {
if (!window.navigator.onLine) {
Expand All @@ -89,6 +93,18 @@ export class ArduinoFrontendContribution
)
);
}
this.themeRegistry.register({
id: 'arduino-theme',
label: 'Light (Arduino)',
uiTheme: 'vs',
json: require('../../src/browser/data/default.color-theme.json'),
});
this.themeRegistry.register({
id: 'arduino-theme-dark',
label: 'Dark (Arduino)',
uiTheme: 'vs-dark',
json: require('../../src/browser/data/dark.color-theme.json'),
});
}

async onStart(app: FrontendApplication): Promise<void> {
Expand Down
15 changes: 0 additions & 15 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import { BoardsAutoInstaller } from './boards/boards-auto-installer';
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
import { ListItemRenderer } from './widgets/component-list/list-item-renderer';
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
import { MonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
import {
ArduinoDaemonPath,
ArduinoDaemon,
Expand Down Expand Up @@ -311,20 +310,6 @@ import { CheckForUpdates } from './contributions/check-for-updates';
import { OpenBoardsConfig } from './contributions/open-boards-config';
import { SketchFilesTracker } from './contributions/sketch-files-tracker';

MonacoThemingService.register({
id: 'arduino-theme',
label: 'Light (Arduino)',
uiTheme: 'vs',
json: require('../../src/browser/data/default.color-theme.json'),
});

MonacoThemingService.register({
id: 'arduino-theme-dark',
label: 'Dark (Arduino)',
uiTheme: 'vs-dark',
json: require('../../src/browser/data/dark.color-theme.json'),
});

export default new ContainerModule((bind, unbind, isBound, rebind) => {
// Commands and toolbar items
bind(ArduinoFrontendContribution).toSelf().inSingletonScope();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,18 @@ export class SettingsComponent extends React.Component<
<select
className="theia-select"
value={
ThemeService.get()
this.props.themeService
.getThemes()
.find(({ id }) => id === this.state.themeId)?.label ||
nls.localize('arduino/common/unknown', 'Unknown')
}
onChange={this.themeDidChange}
>
{ThemeService.get()
.getThemes()
.map(({ id, label }) => (
<option key={id} value={label}>
{label}
</option>
))}
{this.props.themeService.getThemes().map(({ id, label }) => (
<option key={id} value={label}>
{label}
</option>
))}
</select>
</div>
<div className="flex-line">
Expand Down Expand Up @@ -588,7 +586,7 @@ export class SettingsComponent extends React.Component<
event: React.ChangeEvent<HTMLSelectElement>
): void => {
const { selectedIndex } = event.target.options;
const theme = ThemeService.get().getThemes()[selectedIndex];
const theme = this.props.themeService.getThemes()[selectedIndex];
if (theme) {
this.setState({ themeId: theme.id });
}
Expand Down Expand Up @@ -728,6 +726,7 @@ export namespace SettingsComponent {
readonly fileDialogService: FileDialogService;
readonly windowService: WindowService;
readonly localizationProvider: AsyncLocalizationProvider;
readonly themeService: ThemeService;
}
export type State = Settings & {
rawAdditionalUrlsValue: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { SettingsComponent } from './settings-component';
import { AsyncLocalizationProvider } from '@theia/core/lib/common/i18n/localization';
import { AdditionalUrls } from '../../../common/protocol';
import { AbstractDialog } from '../../theia/dialogs/dialogs';
import { ThemeService } from '@theia/core/lib/browser/theming';

@injectable()
export class SettingsWidget extends ReactWidget {
Expand All @@ -34,6 +35,9 @@ export class SettingsWidget extends ReactWidget {
@inject(AsyncLocalizationProvider)
protected readonly localizationProvider: AsyncLocalizationProvider;

@inject(ThemeService)
private readonly themeService: ThemeService;

protected render(): React.ReactNode {
return (
<SettingsComponent
Expand All @@ -42,6 +46,7 @@ export class SettingsWidget extends ReactWidget {
fileDialogService={this.fileDialogService}
windowService={this.windowService}
localizationProvider={this.localizationProvider}
themeService={this.themeService}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ export class SettingsService {
@inject(CommandService)
protected commandService: CommandService;

@inject(ThemeService)
private readonly themeService: ThemeService;

protected readonly onDidChangeEmitter = new Emitter<Readonly<Settings>>();
readonly onDidChange = this.onDidChangeEmitter.event;
protected readonly onDidResetEmitter = new Emitter<Readonly<Settings>>();
Expand Down Expand Up @@ -226,11 +229,7 @@ export class SettingsService {
'Invalid editor font size. It must be a positive integer.'
);
}
if (
!ThemeService.get()
.getThemes()
.find(({ id }) => id === themeId)
) {
if (!this.themeService.getThemes().find(({ id }) => id === themeId)) {
return nls.localize(
'arduino/preferences/invalid.theme',
'Invalid theme.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { ArduinoDaemon } from '../../../common/protocol';
import { NotificationCenter } from '../../notification-center';
import { nls } from '@theia/core/lib/common';
import debounce = require('lodash.debounce');

@injectable()
export class FrontendConnectionStatusService extends TheiaFrontendConnectionStatusService {
Expand All @@ -36,10 +37,11 @@ export class FrontendConnectionStatusService extends TheiaFrontendConnectionStat
this.notificationCenter.onDaemonDidStop(
() => (this.connectedPort = undefined)
);
this.wsConnectionProvider.onIncomingMessageActivity(() => {
const refresh = debounce(() => {
this.updateStatus(!!this.connectedPort);
this.schedulePing();
});
}, this.options.offlineTimeout - 10);
this.wsConnectionProvider.onIncomingMessageActivity(() => refresh());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export class DebugSessionManager extends TheiaDebugSessionManager {
}

const sessionId = await this.debug.createDebugSession(
resolved.configuration
resolved.configuration,
undefined
);
return this.doStart(sessionId, resolved);
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { injectable, inject } from '@theia/core/shared/inversify';
import {
injectable,
inject,
postConstruct,
} from '@theia/core/shared/inversify';
import { CommandService } from '@theia/core/lib/common/command';
import { OutputCommands } from '@theia/output/lib/browser/output-commands';
import { PluginInfo } from '@theia/plugin-ext/lib/common/plugin-api-rpc';
import { OutputChannelRegistryMainImpl as TheiaOutputChannelRegistryMainImpl } from '@theia/plugin-ext/lib/main/browser/output-channel-registry-main';

@injectable()
export class OutputChannelRegistryMainImpl extends TheiaOutputChannelRegistryMainImpl {
@postConstruct()
protected init(): void {
console.log('init');
}
@inject(CommandService)
protected override readonly commandService: CommandService;

Expand Down
32 changes: 16 additions & 16 deletions browser-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"version": "2.0.0-rc9",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@theia/core": "1.25.0",
"@theia/debug": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/file-search": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/messages": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/plugin-ext": "1.25.0",
"@theia/plugin-ext-vscode": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/core": "1.27.0",
"@theia/debug": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/file-search": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/messages": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/plugin-ext": "1.27.0",
"@theia/plugin-ext-vscode": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/process": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"arduino-ide-extension": "2.0.0-rc9"
},
"devDependencies": {
"@theia/cli": "1.25.0"
"@theia/cli": "1.27.0"
},
"scripts": {
"prepare": "theia build --mode development",
Expand Down
34 changes: 17 additions & 17 deletions electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
"license": "AGPL-3.0-or-later",
"main": "src-gen/frontend/electron-main.js",
"dependencies": {
"@theia/core": "1.25.0",
"@theia/debug": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/electron": "1.25.0",
"@theia/file-search": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/messages": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/plugin-ext": "1.25.0",
"@theia/plugin-ext-vscode": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/core": "1.27.0",
"@theia/debug": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/electron": "1.27.0",
"@theia/file-search": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/messages": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/plugin-ext": "1.27.0",
"@theia/plugin-ext-vscode": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/process": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"arduino-ide-extension": "2.0.0-rc9"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"electron": "^15.3.5"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions electron/build/template-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node-log-rotate": "^0.1.5"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"cross-env": "^7.0.2",
"electron-builder": "23.0.2",
"electron-notarize": "^1.1.1",
Expand Down Expand Up @@ -141,7 +141,7 @@
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix",
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.0.2-beta.4.vsix",
"vscode-arduino-tools": "https://github.com/kittaakos/vscode-arduino-tools/raw/noop-output-channel/build-artifacts/vscode-arduino-tools-0.0.2-beta.4.vsix",
"vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix",
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
"cortex-debug": "https://open-vsx.org/api/marus25/cortex-debug/0.3.10/file/marus25.cortex-debug-0.3.10.vsix",
Expand Down
19 changes: 2 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">=14.0.0 <15"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"@types/sinon": "^2.3.5",
"@types/jsdom": "^11.0.4",
"@typescript-eslint/eslint-plugin": "^4.27.0",
Expand Down Expand Up @@ -74,21 +74,6 @@
],
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix",
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.0.2-beta.4.vsix",
"vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix",
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
"cortex-debug": "https://open-vsx.org/api/marus25/cortex-debug/0.3.10/file/marus25.cortex-debug-0.3.10.vsix",
"vscode-language-pack-nl": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-nl/1.48.3/file/MS-CEINTL.vscode-language-pack-nl-1.48.3.vsix",
"vscode-language-pack-fr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-fr/1.69.0/file/MS-CEINTL.vscode-language-pack-fr-1.69.0.vsix",
"vscode-language-pack-zh-hans": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.69.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.69.0.vsix",
"vscode-language-pack-de": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-de/1.69.0/file/MS-CEINTL.vscode-language-pack-de-1.69.0.vsix",
"vscode-language-pack-ja": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ja/1.69.0/file/MS-CEINTL.vscode-language-pack-ja-1.69.0.vsix",
"vscode-language-pack-tr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-tr/1.69.0/file/MS-CEINTL.vscode-language-pack-tr-1.69.0.vsix",
"vscode-language-pack-it": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-it/1.69.0/file/MS-CEINTL.vscode-language-pack-it-1.69.0.vsix",
"vscode-language-pack-ru": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ru/1.69.0/file/MS-CEINTL.vscode-language-pack-ru-1.69.0.vsix",
"vscode-language-pack-es": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-es/1.69.0/file/MS-CEINTL.vscode-language-pack-es-1.69.0.vsix",
"vscode-language-pack-pt-BR": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-pt-BR/1.69.0/file/MS-CEINTL.vscode-language-pack-pt-BR-1.69.0.vsix",
"vscode-language-pack-cs": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-cs/1.69.0/file/MS-CEINTL.vscode-language-pack-cs-1.69.0.vsix"
"vscode-arduino-tools": "https://github.com/kittaakos/vscode-arduino-tools/raw/noop-output-channel/build-artifacts/vscode-arduino-tools-0.0.2-beta.4.vsix"
}
}
Loading