mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-14 06:46:36 +00:00
chore: use theia@1.46.1
Use changes from https://github.com/arduino/arduino-ide/pull/2362 and rebase on main branch
This commit is contained in:
parent
d298b3ffc9
commit
8053c55ec3
@ -24,28 +24,29 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.8.14",
|
"@grpc/grpc-js": "^1.8.14",
|
||||||
"@theia/application-package": "1.41.0",
|
"@theia/application-package": "1.46.1",
|
||||||
"@theia/core": "1.41.0",
|
"@theia/core": "1.46.1",
|
||||||
"@theia/debug": "1.41.0",
|
"@theia/debug": "1.46.1",
|
||||||
"@theia/editor": "1.41.0",
|
"@theia/editor": "1.46.1",
|
||||||
"@theia/electron": "1.41.0",
|
"@theia/electron": "1.46.1",
|
||||||
"@theia/filesystem": "1.41.0",
|
"@theia/filesystem": "1.46.1",
|
||||||
"@theia/keymaps": "1.41.0",
|
"@theia/keymaps": "1.46.1",
|
||||||
"@theia/markers": "1.41.0",
|
"@theia/markers": "1.46.1",
|
||||||
"@theia/messages": "1.41.0",
|
"@theia/messages": "1.46.1",
|
||||||
"@theia/monaco": "1.41.0",
|
"@theia/monaco": "1.46.1",
|
||||||
"@theia/monaco-editor-core": "1.72.3",
|
"@theia/monaco-editor-core": "1.72.3",
|
||||||
"@theia/navigator": "1.41.0",
|
"@theia/navigator": "1.46.1",
|
||||||
"@theia/outline-view": "1.41.0",
|
"@theia/outline-view": "1.46.1",
|
||||||
"@theia/output": "1.41.0",
|
"@theia/output": "1.46.1",
|
||||||
"@theia/plugin-ext": "1.41.0",
|
"@theia/plugin-ext": "1.46.1",
|
||||||
"@theia/plugin-ext-vscode": "1.41.0",
|
"@theia/plugin-ext-vscode": "1.46.1",
|
||||||
"@theia/preferences": "1.41.0",
|
"@theia/preferences": "1.46.1",
|
||||||
"@theia/scm": "1.41.0",
|
"@theia/scm": "1.46.1",
|
||||||
"@theia/search-in-workspace": "1.41.0",
|
"@theia/search-in-workspace": "1.46.1",
|
||||||
"@theia/terminal": "1.41.0",
|
"@theia/terminal": "1.46.1",
|
||||||
"@theia/typehierarchy": "1.41.0",
|
"@theia/test": "1.46.1",
|
||||||
"@theia/workspace": "1.41.0",
|
"@theia/typehierarchy": "1.46.1",
|
||||||
|
"@theia/workspace": "1.46.1",
|
||||||
"@tippyjs/react": "^4.2.5",
|
"@tippyjs/react": "^4.2.5",
|
||||||
"@types/auth0-js": "^9.21.3",
|
"@types/auth0-js": "^9.21.3",
|
||||||
"@types/btoa": "^1.2.3",
|
"@types/btoa": "^1.2.3",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
||||||
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
||||||
import { CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
|
import { CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||||
import {
|
import {
|
||||||
TabBarToolbarContribution,
|
TabBarToolbarContribution,
|
||||||
|
@ -9,10 +9,8 @@ import { CommandContribution } from '@theia/core/lib/common/command';
|
|||||||
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
||||||
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
||||||
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
|
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
|
||||||
import {
|
import { FrontendApplication as TheiaFrontendApplication } from '@theia/core/lib/browser/frontend-application';
|
||||||
FrontendApplicationContribution,
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
FrontendApplication as TheiaFrontendApplication,
|
|
||||||
} from '@theia/core/lib/browser/frontend-application';
|
|
||||||
import { LibraryListWidget } from './library/library-list-widget';
|
import { LibraryListWidget } from './library/library-list-widget';
|
||||||
import { ArduinoFrontendContribution } from './arduino-frontend-contribution';
|
import { ArduinoFrontendContribution } from './arduino-frontend-contribution';
|
||||||
import {
|
import {
|
||||||
@ -275,7 +273,7 @@ import {
|
|||||||
IDEUpdaterDialog,
|
IDEUpdaterDialog,
|
||||||
IDEUpdaterDialogProps,
|
IDEUpdaterDialogProps,
|
||||||
} from './dialogs/ide-updater/ide-updater-dialog';
|
} from './dialogs/ide-updater/ide-updater-dialog';
|
||||||
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider';
|
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-source';
|
||||||
import { MonitorModel } from './monitor-model';
|
import { MonitorModel } from './monitor-model';
|
||||||
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
|
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
|
||||||
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
|
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
|
||||||
@ -295,10 +293,6 @@ import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-gen
|
|||||||
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
|
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
|
||||||
import { AboutDialog } from './theia/core/about-dialog';
|
import { AboutDialog } from './theia/core/about-dialog';
|
||||||
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
|
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
|
||||||
import {
|
|
||||||
SurveyNotificationService,
|
|
||||||
SurveyNotificationServicePath,
|
|
||||||
} from '../common/protocol/survey-service';
|
|
||||||
import { WindowContribution } from './theia/core/window-contribution';
|
import { WindowContribution } from './theia/core/window-contribution';
|
||||||
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
|
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
|
||||||
import { CoreErrorHandler } from './contributions/core-error-handler';
|
import { CoreErrorHandler } from './contributions/core-error-handler';
|
||||||
@ -394,6 +388,8 @@ import {
|
|||||||
VersionWelcomeDialog,
|
VersionWelcomeDialog,
|
||||||
VersionWelcomeDialogProps,
|
VersionWelcomeDialogProps,
|
||||||
} from './dialogs/version-welcome-dialog';
|
} from './dialogs/version-welcome-dialog';
|
||||||
|
import { TestViewContribution as TheiaTestViewContribution } from '@theia/test/lib/browser/view/test-view-contribution';
|
||||||
|
import { TestViewContribution } from './theia/test/test-view-contribution';
|
||||||
|
|
||||||
// Hack to fix copy/cut/paste issue after electron version update in Theia.
|
// Hack to fix copy/cut/paste issue after electron version update in Theia.
|
||||||
// https://github.com/eclipse-theia/theia/issues/12487
|
// https://github.com/eclipse-theia/theia/issues/12487
|
||||||
@ -574,15 +570,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
WorkspaceVariableContribution
|
WorkspaceVariableContribution
|
||||||
);
|
);
|
||||||
|
|
||||||
bind(SurveyNotificationService)
|
|
||||||
.toDynamicValue((context) => {
|
|
||||||
return ElectronIpcConnectionProvider.createProxy(
|
|
||||||
context.container,
|
|
||||||
SurveyNotificationServicePath
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.inSingletonScope();
|
|
||||||
|
|
||||||
// Layout and shell customizations.
|
// Layout and shell customizations.
|
||||||
rebind(TheiaOutlineViewContribution)
|
rebind(TheiaOutlineViewContribution)
|
||||||
.to(OutlineViewContribution)
|
.to(OutlineViewContribution)
|
||||||
@ -1113,6 +1100,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });
|
bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });
|
||||||
|
|
||||||
|
// Hides the Test Explorer from the side-bar
|
||||||
|
bind(TestViewContribution).toSelf().inSingletonScope();
|
||||||
|
rebind(TheiaTestViewContribution).toService(TestViewContribution);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
|
// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
|
||||||
|
@ -280,14 +280,6 @@ const properties: ArduinoPreferenceSchemaProperties = {
|
|||||||
),
|
),
|
||||||
default: 'https://auth.arduino.cc/login#/register',
|
default: 'https://auth.arduino.cc/login#/register',
|
||||||
},
|
},
|
||||||
'arduino.survey.notification': {
|
|
||||||
type: 'boolean',
|
|
||||||
description: nls.localize(
|
|
||||||
'arduino/preferences/survey.notification',
|
|
||||||
'True if users should be notified if a survey is available. True by default.'
|
|
||||||
),
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
'arduino.cli.daemon.debug': {
|
'arduino.cli.daemon.debug': {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
description: nls.localize(
|
description: nls.localize(
|
||||||
@ -355,7 +347,6 @@ export interface ArduinoConfiguration {
|
|||||||
'arduino.auth.domain': string;
|
'arduino.auth.domain': string;
|
||||||
'arduino.auth.audience': string;
|
'arduino.auth.audience': string;
|
||||||
'arduino.auth.registerUri': string;
|
'arduino.auth.registerUri': string;
|
||||||
'arduino.survey.notification': boolean;
|
|
||||||
'arduino.cli.daemon.debug': boolean;
|
'arduino.cli.daemon.debug': boolean;
|
||||||
'arduino.sketch.inoBlueprint': string;
|
'arduino.sketch.inoBlueprint': string;
|
||||||
'arduino.checkForUpdates': boolean;
|
'arduino.checkForUpdates': boolean;
|
||||||
|
@ -3,7 +3,7 @@ import { Emitter } from '@theia/core/lib/common/event';
|
|||||||
import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory';
|
import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||||
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import {
|
import {
|
||||||
CommandRegistry,
|
CommandRegistry,
|
||||||
CommandContribution,
|
CommandContribution,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { MessageService } from '@theia/core/lib/common/message-service';
|
import { MessageService } from '@theia/core/lib/common/message-service';
|
||||||
import { MessageType } from '@theia/core/lib/common/message-service-protocol';
|
import { MessageType } from '@theia/core/lib/common/message-service-protocol';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||||
import { StorageService } from '@theia/core/lib/browser/storage-service';
|
import { StorageService } from '@theia/core/lib/browser/storage-service';
|
||||||
import type {
|
import type {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||||
import { StorageService } from '@theia/core/lib/browser/storage-service';
|
import { StorageService } from '@theia/core/lib/browser/storage-service';
|
||||||
import {
|
import {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { Emitter, Event } from '@theia/core/lib/common/event';
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { Dialog } from '@theia/core/lib/browser/dialogs';
|
import { Dialog } from '@theia/core/lib/browser/dialogs';
|
||||||
import type {
|
import type { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
|
||||||
FrontendApplication,
|
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
OnWillStopAction,
|
|
||||||
} from '@theia/core/lib/browser/frontend-application';
|
|
||||||
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
|
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
|
||||||
import { nls } from '@theia/core/lib/common/nls';
|
import { nls } from '@theia/core/lib/common/nls';
|
||||||
import type { MaybePromise } from '@theia/core/lib/common/types';
|
import type { MaybePromise } from '@theia/core/lib/common/types';
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
|
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
|
||||||
import {
|
import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
|
||||||
FrontendApplication,
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
FrontendApplicationContribution,
|
|
||||||
} from '@theia/core/lib/browser/frontend-application';
|
|
||||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||||
import {
|
import {
|
||||||
KeybindingContribution,
|
KeybindingContribution,
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
import { MessageService } from '@theia/core';
|
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
||||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
||||||
import { LocalStorageService } from '@theia/core/lib/browser';
|
|
||||||
import { nls } from '@theia/core/lib/common';
|
|
||||||
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
|
||||||
import { ArduinoPreferences } from '../arduino-preferences';
|
|
||||||
import { SurveyNotificationService } from '../../common/protocol/survey-service';
|
|
||||||
|
|
||||||
const SURVEY_MESSAGE = nls.localize(
|
|
||||||
'arduino/survey/surveyMessage',
|
|
||||||
'Please help us improve by answering this super short survey. We value our community and would like to get to know our supporters a little better.'
|
|
||||||
);
|
|
||||||
const DO_NOT_SHOW_AGAIN = nls.localize(
|
|
||||||
'arduino/survey/dismissSurvey',
|
|
||||||
"Don't show again"
|
|
||||||
);
|
|
||||||
const GO_TO_SURVEY = nls.localize(
|
|
||||||
'arduino/survey/answerSurvey',
|
|
||||||
'Answer survey'
|
|
||||||
);
|
|
||||||
|
|
||||||
const SURVEY_BASE_URL = 'https://surveys.hotjar.com/';
|
|
||||||
const surveyId = '17887b40-e1f0-4bd6-b9f0-a37f229ccd8b';
|
|
||||||
|
|
||||||
@injectable()
|
|
||||||
export class SurveyNotification implements FrontendApplicationContribution {
|
|
||||||
@inject(MessageService)
|
|
||||||
private readonly messageService: MessageService;
|
|
||||||
|
|
||||||
@inject(LocalStorageService)
|
|
||||||
private readonly localStorageService: LocalStorageService;
|
|
||||||
|
|
||||||
@inject(WindowService)
|
|
||||||
private readonly windowService: WindowService;
|
|
||||||
|
|
||||||
@inject(ArduinoPreferences)
|
|
||||||
private readonly arduinoPreferences: ArduinoPreferences;
|
|
||||||
|
|
||||||
@inject(SurveyNotificationService)
|
|
||||||
private readonly surveyNotificationService: SurveyNotificationService;
|
|
||||||
|
|
||||||
onStart(): void {
|
|
||||||
this.arduinoPreferences.ready.then(async () => {
|
|
||||||
if (
|
|
||||||
(await this.surveyNotificationService.isFirstInstance()) &&
|
|
||||||
this.arduinoPreferences.get('arduino.survey.notification')
|
|
||||||
) {
|
|
||||||
const surveyAnswered = await this.localStorageService.getData(
|
|
||||||
this.surveyKey(surveyId)
|
|
||||||
);
|
|
||||||
if (surveyAnswered !== undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const answer = await this.messageService.info(
|
|
||||||
SURVEY_MESSAGE,
|
|
||||||
DO_NOT_SHOW_AGAIN,
|
|
||||||
GO_TO_SURVEY
|
|
||||||
);
|
|
||||||
switch (answer) {
|
|
||||||
case GO_TO_SURVEY:
|
|
||||||
this.windowService.openNewWindow(SURVEY_BASE_URL + surveyId, {
|
|
||||||
external: true,
|
|
||||||
});
|
|
||||||
this.localStorageService.setData(this.surveyKey(surveyId), true);
|
|
||||||
break;
|
|
||||||
case DO_NOT_SHOW_AGAIN:
|
|
||||||
this.localStorageService.setData(this.surveyKey(surveyId), false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private surveyKey(id: string): string {
|
|
||||||
return `answered_survey:${id}`;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { Emitter, Event } from '@theia/core/lib/common/event';
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
||||||
import URI from '@theia/core/lib/common/uri';
|
import URI from '@theia/core/lib/common/uri';
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import {
|
import {
|
||||||
Stat,
|
Stat,
|
||||||
FileType,
|
FileType,
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
import { Emitter } from '@theia/core/lib/common/event';
|
import { Emitter } from '@theia/core/lib/common/event';
|
||||||
import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory';
|
import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import {
|
import {
|
||||||
IndexUpdateDidCompleteParams,
|
IndexUpdateDidCompleteParams,
|
||||||
IndexUpdateDidFailParams,
|
IndexUpdateDidFailParams,
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { Sketch, SketchesService } from '../common/protocol';
|
import { Sketch, SketchesService } from '../common/protocol';
|
||||||
import { ConfigServiceClient } from './config/config-service-client';
|
import { ConfigServiceClient } from './config/config-service-client';
|
||||||
import {
|
import {
|
||||||
@ -74,6 +74,7 @@ export class SketchesServiceClientImpl
|
|||||||
const sketchDirUri = this.configService.tryGetSketchDirUri();
|
const sketchDirUri = this.configService.tryGetSketchDirUri();
|
||||||
this.watchSketchbookDir(sketchDirUri);
|
this.watchSketchbookDir(sketchDirUri);
|
||||||
const refreshCurrentSketch = async () => {
|
const refreshCurrentSketch = async () => {
|
||||||
|
await this.workspaceService.ready;
|
||||||
const currentSketch = await this.loadCurrentSketch();
|
const currentSketch = await this.loadCurrentSketch();
|
||||||
const ideTempFolderUri = await this.getIdeTempFolderUriForSketch(
|
const ideTempFolderUri = await this.getIdeTempFolderUriForSketch(
|
||||||
currentSketch
|
currentSketch
|
||||||
|
@ -2,7 +2,7 @@ import {
|
|||||||
CommonCommands,
|
CommonCommands,
|
||||||
CommonFrontendContribution as TheiaCommonFrontendContribution,
|
CommonFrontendContribution as TheiaCommonFrontendContribution,
|
||||||
} from '@theia/core/lib/browser/common-frontend-contribution';
|
} from '@theia/core/lib/browser/common-frontend-contribution';
|
||||||
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application';
|
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import type { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
import type { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
||||||
import type { CommandRegistry } from '@theia/core/lib/common/command';
|
import type { CommandRegistry } from '@theia/core/lib/common/command';
|
||||||
import type { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
import type { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
ApplicationConnectionStatusContribution as TheiaApplicationConnectionStatusContribution,
|
|
||||||
ConnectionStatus,
|
ConnectionStatus,
|
||||||
|
ApplicationConnectionStatusContribution as TheiaApplicationConnectionStatusContribution,
|
||||||
FrontendConnectionStatusService as TheiaFrontendConnectionStatusService,
|
FrontendConnectionStatusService as TheiaFrontendConnectionStatusService,
|
||||||
} from '@theia/core/lib/browser/connection-status-service';
|
} from '@theia/core/lib/browser/connection-status-service';
|
||||||
import type { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import type { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/index';
|
import { WebSocketConnectionSource } from '@theia/core/lib/browser/messaging/ws-connection-source';
|
||||||
import { StatusBarAlignment } from '@theia/core/lib/browser/status-bar/status-bar';
|
import { StatusBarAlignment } from '@theia/core/lib/browser/status-bar/status-bar';
|
||||||
import { Disposable } from '@theia/core/lib/common/disposable';
|
import { Disposable } from '@theia/core/lib/common/disposable';
|
||||||
import { Emitter, Event } from '@theia/core/lib/common/event';
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
||||||
@ -114,8 +114,8 @@ export class FrontendConnectionStatusService extends TheiaFrontendConnectionStat
|
|||||||
private readonly daemonPort: DaemonPort;
|
private readonly daemonPort: DaemonPort;
|
||||||
@inject(IsOnline)
|
@inject(IsOnline)
|
||||||
private readonly isOnline: IsOnline;
|
private readonly isOnline: IsOnline;
|
||||||
@inject(WebSocketConnectionProvider)
|
@inject(WebSocketConnectionSource)
|
||||||
private readonly connectionProvider: WebSocketConnectionProvider;
|
private readonly connectionSource: WebSocketConnectionSource;
|
||||||
|
|
||||||
@postConstruct()
|
@postConstruct()
|
||||||
protected override init(): void {
|
protected override init(): void {
|
||||||
@ -128,7 +128,7 @@ export class FrontendConnectionStatusService extends TheiaFrontendConnectionStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override async performPingRequest(): Promise<void> {
|
protected override async performPingRequest(): Promise<void> {
|
||||||
if (!this.connectionProvider['socket'].connected) {
|
if (!this.connectionSource['socket'].connected) {
|
||||||
this.updateStatus(false);
|
this.updateStatus(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -171,8 +171,8 @@ export class ApplicationConnectionStatusContribution extends TheiaApplicationCon
|
|||||||
private readonly notificationManager: NotificationManager;
|
private readonly notificationManager: NotificationManager;
|
||||||
@inject(CreateFeatures)
|
@inject(CreateFeatures)
|
||||||
private readonly createFeatures: CreateFeatures;
|
private readonly createFeatures: CreateFeatures;
|
||||||
@inject(WebSocketConnectionProvider)
|
@inject(WebSocketConnectionSource)
|
||||||
private readonly connectionProvider: WebSocketConnectionProvider;
|
private readonly connectionSource: WebSocketConnectionSource;
|
||||||
|
|
||||||
private readonly offlineStatusDidChangeEmitter = new Emitter<
|
private readonly offlineStatusDidChangeEmitter = new Emitter<
|
||||||
OfflineConnectionStatus | undefined
|
OfflineConnectionStatus | undefined
|
||||||
@ -202,7 +202,7 @@ export class ApplicationConnectionStatusContribution extends TheiaApplicationCon
|
|||||||
const params = <OfflineMessageParams>{
|
const params = <OfflineMessageParams>{
|
||||||
port: this.daemonPort.port,
|
port: this.daemonPort.port,
|
||||||
online: this.isOnline.online,
|
online: this.isOnline.online,
|
||||||
backendConnected: this.connectionProvider['socket'].connected, // https://github.com/arduino/arduino-ide/issues/2081
|
backendConnected: this.connectionSource['socket'].connected, // https://github.com/arduino/arduino-ide/issues/2081
|
||||||
};
|
};
|
||||||
this._offlineStatus = offlineConnectionStatusType(params);
|
this._offlineStatus = offlineConnectionStatusType(params);
|
||||||
const { text, tooltip } = offlineMessage(params);
|
const { text, tooltip } = offlineMessage(params);
|
||||||
|
@ -20,12 +20,12 @@ export class DefaultDebugSessionFactory extends TheiaDefaultDebugSessionFactory
|
|||||||
sessionId,
|
sessionId,
|
||||||
() =>
|
() =>
|
||||||
new Promise<DebugChannel>((resolve) =>
|
new Promise<DebugChannel>((resolve) =>
|
||||||
this.connectionProvider.openChannel(
|
this.connectionProvider.listen(
|
||||||
`${DebugAdapterPath}/${sessionId}`,
|
`${DebugAdapterPath}/${sessionId}`,
|
||||||
(wsChannel) => {
|
(_, wsChannel) => {
|
||||||
resolve(new ForwardingDebugChannel(wsChannel));
|
resolve(new ForwardingDebugChannel(wsChannel));
|
||||||
},
|
},
|
||||||
{ reconnecting: false }
|
false
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
this.getTraceOutputChannel()
|
this.getTraceOutputChannel()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { ThemeService } from '@theia/core/lib/browser/theming';
|
import { ThemeService } from '@theia/core/lib/browser/theming';
|
||||||
import {
|
import {
|
||||||
Disposable,
|
Disposable,
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import type { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { Emitter, Event } from '@theia/core/lib/common/event';
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
||||||
import { injectable, interfaces } from '@theia/core/shared/inversify';
|
import { injectable, interfaces } from '@theia/core/shared/inversify';
|
||||||
import {
|
import { HostedPluginSupport as TheiaHostedPluginSupport } from '@theia/plugin-ext/lib/hosted/browser/hosted-plugin';
|
||||||
PluginContributions,
|
import type { PluginContributions } from '@theia/plugin-ext/lib/hosted/common/hosted-plugin';
|
||||||
HostedPluginSupport as TheiaHostedPluginSupport,
|
import type { HostedPluginSupport } from '../../hosted/hosted-plugin-support';
|
||||||
} from '@theia/plugin-ext/lib/hosted/browser/hosted-plugin';
|
|
||||||
import { HostedPluginSupport } from '../../hosted/hosted-plugin-support';
|
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class HostedPluginSupportImpl
|
export class HostedPluginSupportImpl
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
import { TestViewContribution as TheiaTestViewContribution } from '@theia/test/lib/browser/view/test-view-contribution';
|
||||||
|
import { injectable } from 'inversify';
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class TestViewContribution extends TheiaTestViewContribution {
|
||||||
|
override async initializeLayout(): Promise<void> {
|
||||||
|
// NOOP
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import {
|
import {
|
||||||
OpenerOptions,
|
OpenerOptions,
|
||||||
OpenHandler,
|
OpenHandler,
|
||||||
|
@ -3,7 +3,7 @@ import { CommandRegistry } from '@theia/core/lib/common/command';
|
|||||||
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
||||||
import { PreferenceService } from '@theia/core/lib/browser/preferences/preference-service';
|
import { PreferenceService } from '@theia/core/lib/browser/preferences/preference-service';
|
||||||
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
||||||
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
|
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
||||||
import { MainMenuManager } from '../../../common/main-menu-manager';
|
import { MainMenuManager } from '../../../common/main-menu-manager';
|
||||||
import { ArduinoPreferences } from '../../arduino-preferences';
|
import { ArduinoPreferences } from '../../arduino-preferences';
|
||||||
import { SketchbookWidget } from './sketchbook-widget';
|
import { SketchbookWidget } from './sketchbook-widget';
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
export const SurveyNotificationServicePath =
|
|
||||||
'/services/survey-notification-service';
|
|
||||||
export const SurveyNotificationService = Symbol('SurveyNotificationService');
|
|
||||||
|
|
||||||
export interface SurveyNotificationService {
|
|
||||||
isFirstInstance(): Promise<boolean>;
|
|
||||||
}
|
|
@ -1,5 +1,8 @@
|
|||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
import type { NewWindowOptions } from '@theia/core/lib/common/window';
|
import type {
|
||||||
|
NewWindowOptions,
|
||||||
|
WindowSearchParams,
|
||||||
|
} from '@theia/core/lib/common/window';
|
||||||
import { ElectronWindowService as TheiaElectronWindowService } from '@theia/core/lib/electron-browser/window/electron-window-service';
|
import { ElectronWindowService as TheiaElectronWindowService } from '@theia/core/lib/electron-browser/window/electron-window-service';
|
||||||
import { injectable, postConstruct } from '@theia/core/shared/inversify';
|
import { injectable, postConstruct } from '@theia/core/shared/inversify';
|
||||||
import { WindowServiceExt } from '../../../browser/theia/core/window-service-ext';
|
import { WindowServiceExt } from '../../../browser/theia/core/window-service-ext';
|
||||||
@ -17,8 +20,12 @@ export class ElectronWindowService
|
|||||||
|
|
||||||
@postConstruct()
|
@postConstruct()
|
||||||
protected override init(): void {
|
protected override init(): void {
|
||||||
// NOOP
|
// Overridden to avoid calling the zoom level listener in super.
|
||||||
// IDE2 listens on the zoom level changes in `ArduinoFrontendContribution#onStart`
|
// IDE2 listens on the zoom level changes in `ArduinoFrontendContribution#onStart`
|
||||||
|
|
||||||
|
window.electronTheiaCore.onAboutToClose(() => {
|
||||||
|
this.connectionCloseService.markForClose(this.frontendIdProvider.getId());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async isFirstWindow(): Promise<boolean> {
|
async isFirstWindow(): Promise<boolean> {
|
||||||
@ -38,11 +45,11 @@ export class ElectronWindowService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overridden to support optional task owner params and make `tsc` happy.
|
// Overridden to support optional task owner params and make `tsc` happy.
|
||||||
override reload(options?: StartupTasks): void {
|
override reload(options?: StartupTasks | WindowSearchParams): void {
|
||||||
if (hasStartupTasks(options)) {
|
if (hasStartupTasks(options)) {
|
||||||
window.electronArduino.requestReload(options);
|
window.electronArduino.requestReload(options);
|
||||||
} else {
|
} else {
|
||||||
window.electronTheiaCore.requestReload();
|
super.reload(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler';
|
||||||
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
|
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||||
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
|
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
|
||||||
import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler';
|
|
||||||
import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
|
import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
|
||||||
import {
|
import {
|
||||||
ElectronMainApplication as TheiaElectronMainApplication,
|
|
||||||
ElectronMainApplicationContribution,
|
ElectronMainApplicationContribution,
|
||||||
|
ElectronMainApplication as TheiaElectronMainApplication,
|
||||||
} from '@theia/core/lib/electron-main/electron-main-application';
|
} from '@theia/core/lib/electron-main/electron-main-application';
|
||||||
import { TheiaElectronWindow as DefaultTheiaElectronWindow } from '@theia/core/lib/electron-main/theia-electron-window';
|
import { TheiaElectronWindow as DefaultTheiaElectronWindow } from '@theia/core/lib/electron-main/theia-electron-window';
|
||||||
import { ContainerModule } from '@theia/core/shared/inversify';
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
||||||
@ -33,7 +33,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
bind(IDEUpdaterImpl).toSelf().inSingletonScope();
|
bind(IDEUpdaterImpl).toSelf().inSingletonScope();
|
||||||
bind(IDEUpdater).toService(IDEUpdaterImpl);
|
bind(IDEUpdater).toService(IDEUpdaterImpl);
|
||||||
bind(ElectronMainApplicationContribution).toService(IDEUpdater);
|
bind(ElectronMainApplicationContribution).toService(IDEUpdater);
|
||||||
bind(ElectronConnectionHandler)
|
bind(ConnectionHandler)
|
||||||
.toDynamicValue(
|
.toDynamicValue(
|
||||||
(context) =>
|
(context) =>
|
||||||
new JsonRpcConnectionHandler<IDEUpdaterClient>(
|
new JsonRpcConnectionHandler<IDEUpdaterClient>(
|
||||||
|
@ -11,16 +11,16 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { isOSX } from '@theia/core/lib/common/os';
|
import { isOSX } from '@theia/core/lib/common/os';
|
||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
import { isObject, MaybePromise, Mutable } from '@theia/core/lib/common/types';
|
import { isObject, MaybePromise, Mutable } from '@theia/core/lib/common/types';
|
||||||
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token';
|
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token';
|
||||||
import {
|
import {
|
||||||
ElectronMainExecutionParams,
|
ElectronMainCommandOptions,
|
||||||
ElectronMainApplication as TheiaElectronMainApplication,
|
ElectronMainApplication as TheiaElectronMainApplication,
|
||||||
} from '@theia/core/lib/electron-main/electron-main-application';
|
} from '@theia/core/lib/electron-main/electron-main-application';
|
||||||
import type { TheiaBrowserWindowOptions } from '@theia/core/lib/electron-main/theia-electron-window';
|
import type { TheiaBrowserWindowOptions } from '@theia/core/lib/electron-main/theia-electron-window';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
|
||||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||||
import { URI } from '@theia/core/shared/vscode-uri';
|
import { URI } from '@theia/core/shared/vscode-uri';
|
||||||
import { log as logToFile, setup as setupFileLog } from 'node-log-rotate';
|
import { log as logToFile, setup as setupFileLog } from 'node-log-rotate';
|
||||||
@ -28,6 +28,7 @@ import { fork } from 'node:child_process';
|
|||||||
import { promises as fs, readFileSync, rm, rmSync } from 'node:fs';
|
import { promises as fs, readFileSync, rm, rmSync } from 'node:fs';
|
||||||
import type { AddressInfo } from 'node:net';
|
import type { AddressInfo } from 'node:net';
|
||||||
import { isAbsolute, join, resolve } from 'node:path';
|
import { isAbsolute, join, resolve } from 'node:path';
|
||||||
|
import type { Argv } from 'yargs';
|
||||||
import { Sketch } from '../../common/protocol';
|
import { Sketch } from '../../common/protocol';
|
||||||
import {
|
import {
|
||||||
AppInfo,
|
AppInfo,
|
||||||
@ -129,6 +130,11 @@ const APP_STARTED_WITH_CONTENT_TRACE =
|
|||||||
typeof process !== 'undefined' &&
|
typeof process !== 'undefined' &&
|
||||||
process.argv.indexOf('--content-trace') !== -1;
|
process.argv.indexOf('--content-trace') !== -1;
|
||||||
|
|
||||||
|
const createYargs: (
|
||||||
|
argv?: string[],
|
||||||
|
cwd?: string
|
||||||
|
) => Argv = require('yargs/yargs');
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class ElectronMainApplication extends TheiaElectronMainApplication {
|
export class ElectronMainApplication extends TheiaElectronMainApplication {
|
||||||
@inject(IsTempSketch)
|
@inject(IsTempSketch)
|
||||||
@ -171,29 +177,59 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
private readonly scheduledDeletions: Disposable[] = [];
|
private readonly scheduledDeletions: Disposable[] = [];
|
||||||
|
|
||||||
override async start(config: FrontendApplicationConfig): Promise<void> {
|
override async start(config: FrontendApplicationConfig): Promise<void> {
|
||||||
// Explicitly set the app name to have better menu items on macOS. ("About", "Hide", and "Quit")
|
createYargs(this.argv, process.cwd())
|
||||||
// See: https://github.com/electron-userland/electron-builder/issues/2468
|
.command(
|
||||||
// Regression in Theia: https://github.com/eclipse-theia/theia/issues/8701
|
'$0 [file]',
|
||||||
console.log(`${config.applicationName} ${app.getVersion()}`);
|
false,
|
||||||
app.on('ready', () => app.setName(config.applicationName));
|
(cmd) =>
|
||||||
const cwd = process.cwd();
|
cmd
|
||||||
this.attachFileAssociations(cwd);
|
.option('electronUserData', {
|
||||||
this.useNativeWindowFrame = this.getTitleBarStyle(config) === 'native';
|
type: 'string',
|
||||||
this._config = await updateFrontendApplicationConfigFromPackageJson(config);
|
describe:
|
||||||
this._appInfo = updateAppInfo(this._appInfo, this._config);
|
'The area where the electron main process puts its data',
|
||||||
this.hookApplicationEvents();
|
})
|
||||||
const [port] = await Promise.all([this.startBackend(), app.whenReady()]);
|
.positional('file', { type: 'string' }),
|
||||||
this.startContentTracing();
|
async (args) => {
|
||||||
this._backendPort.resolve(port);
|
if (args.electronUserData) {
|
||||||
await Promise.all([
|
console.info(
|
||||||
this.attachElectronSecurityToken(port),
|
`using electron user data area : '${args.electronUserData}'`
|
||||||
this.startContributions(),
|
);
|
||||||
]);
|
await fs.mkdir(args.electronUserData, { recursive: true });
|
||||||
return this.launch({
|
app.setPath('userData', args.electronUserData);
|
||||||
secondInstance: false,
|
}
|
||||||
argv: this.processArgv.getProcessArgvWithoutBin(process.argv),
|
// Explicitly set the app name to have better menu items on macOS. ("About", "Hide", and "Quit")
|
||||||
cwd,
|
// See: https://github.com/electron-userland/electron-builder/issues/2468
|
||||||
});
|
// Regression in Theia: https://github.com/eclipse-theia/theia/issues/8701
|
||||||
|
console.log(`${config.applicationName} ${app.getVersion()}`);
|
||||||
|
app.on('ready', () => app.setName(config.applicationName));
|
||||||
|
const cwd = process.cwd();
|
||||||
|
this.attachFileAssociations(cwd);
|
||||||
|
this.useNativeWindowFrame =
|
||||||
|
this.getTitleBarStyle(config) === 'native';
|
||||||
|
this._config = await updateFrontendApplicationConfigFromPackageJson(
|
||||||
|
config
|
||||||
|
);
|
||||||
|
this._appInfo = updateAppInfo(this._appInfo, this._config);
|
||||||
|
this.hookApplicationEvents();
|
||||||
|
this.showInitialWindow();
|
||||||
|
const [port] = await Promise.all([
|
||||||
|
this.startBackend(),
|
||||||
|
app.whenReady(),
|
||||||
|
]);
|
||||||
|
this.startContentTracing();
|
||||||
|
this._backendPort.resolve(port);
|
||||||
|
await Promise.all([
|
||||||
|
this.attachElectronSecurityToken(port),
|
||||||
|
this.startContributions(),
|
||||||
|
]);
|
||||||
|
this.handleMainCommand({
|
||||||
|
file: args.file,
|
||||||
|
cwd,
|
||||||
|
secondInstance: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
private startContentTracing(): void {
|
private startContentTracing(): void {
|
||||||
@ -284,8 +320,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async launch(
|
protected override async handleMainCommand(
|
||||||
params: ElectronMainExecutionParams
|
options: ElectronMainCommandOptions
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
try {
|
try {
|
||||||
// When running on MacOS, we either have to wait until
|
// When running on MacOS, we either have to wait until
|
||||||
@ -300,7 +336,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await this.launchFromArgs(params)) {
|
if (await this.launchFromArgs(options)) {
|
||||||
// Application has received a file in its arguments and will skip the default application launch
|
// Application has received a file in its arguments and will skip the default application launch
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -314,7 +350,10 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
`Restoring workspace roots: ${workspaces.map(({ file }) => file)}`
|
`Restoring workspace roots: ${workspaces.map(({ file }) => file)}`
|
||||||
);
|
);
|
||||||
for (const workspace of workspaces) {
|
for (const workspace of workspaces) {
|
||||||
const resolvedPath = await this.resolvePath(workspace.file, params.cwd);
|
const resolvedPath = await this.resolvePath(
|
||||||
|
workspace.file,
|
||||||
|
options.cwd
|
||||||
|
);
|
||||||
if (!resolvedPath) {
|
if (!resolvedPath) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -337,15 +376,19 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
}
|
}
|
||||||
this.startup = false;
|
this.startup = false;
|
||||||
if (useDefault) {
|
if (useDefault) {
|
||||||
super.launch(params);
|
super.handleMainCommand(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private get argv(): string[] {
|
||||||
|
return this.processArgv.getProcessArgvWithoutBin(process.argv).slice();
|
||||||
|
}
|
||||||
|
|
||||||
private async launchFromArgs(
|
private async launchFromArgs(
|
||||||
params: ElectronMainExecutionParams
|
params: ElectronMainCommandOptions
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
// Copy to prevent manipulation of original array
|
// Copy to prevent manipulation of original array
|
||||||
const argCopy = [...params.argv];
|
const argCopy = [...this.argv];
|
||||||
let path: string | undefined;
|
let path: string | undefined;
|
||||||
for (const maybePath of argCopy) {
|
for (const maybePath of argCopy) {
|
||||||
const resolvedPath = await this.resolvePath(maybePath, params.cwd);
|
const resolvedPath = await this.resolvePath(maybePath, params.cwd);
|
||||||
@ -383,7 +426,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
}
|
}
|
||||||
const [uri, electronWindow] = await Promise.all([
|
const [uri, electronWindow] = await Promise.all([
|
||||||
this.createWindowUri(),
|
this.createWindowUri(),
|
||||||
this.createWindow(options),
|
this.reuseOrCreateWindow(options),
|
||||||
]);
|
]);
|
||||||
electronWindow.loadURL(uri.withFragment(encodeURI(file)).toString(true));
|
electronWindow.loadURL(uri.withFragment(encodeURI(file)).toString(true));
|
||||||
return electronWindow;
|
return electronWindow;
|
||||||
@ -483,7 +526,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
argv: string[],
|
argv: string[],
|
||||||
cwd: string
|
cwd: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (await this.launchFromArgs({ cwd, argv, secondInstance: true })) {
|
if (await this.launchFromArgs({ cwd, secondInstance: true })) {
|
||||||
// Application has received a file in its arguments
|
// Application has received a file in its arguments
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -779,7 +822,7 @@ class InterruptWorkspaceRestoreError extends Error {
|
|||||||
// but it's the `package.json` inside the `resources/app/` folder if it's the final bundled app.
|
// but it's the `package.json` inside the `resources/app/` folder if it's the final bundled app.
|
||||||
// See https://github.com/arduino/arduino-ide/pull/2144#pullrequestreview-1556343430.
|
// See https://github.com/arduino/arduino-ide/pull/2144#pullrequestreview-1556343430.
|
||||||
async function updateFrontendApplicationConfigFromPackageJson(
|
async function updateFrontendApplicationConfigFromPackageJson(
|
||||||
config: FrontendApplicationConfig
|
config: Mutable<FrontendApplicationConfig>
|
||||||
): Promise<FrontendApplicationConfig> {
|
): Promise<FrontendApplicationConfig> {
|
||||||
if (!isProductionMode) {
|
if (!isProductionMode) {
|
||||||
console.debug(
|
console.debug(
|
||||||
@ -846,7 +889,8 @@ const fallbackFrontendAppConfig: FrontendApplicationConfig = {
|
|||||||
defaultIconTheme: 'none',
|
defaultIconTheme: 'none',
|
||||||
validatePreferencesSchema: false,
|
validatePreferencesSchema: false,
|
||||||
defaultLocale: '',
|
defaultLocale: '',
|
||||||
electron: {},
|
electron: { showWindowEarly: true },
|
||||||
|
reloadOnReconnect: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
// When the package.json must go from `./lib/backend/electron-main.js` to `./package.json` when the app is webpacked.
|
// When the package.json must go from `./lib/backend/electron-main.js` to `./package.json` when the app is webpacked.
|
||||||
|
@ -8,7 +8,7 @@ import { ElectronArduinoRenderer } from '../electron-arduino';
|
|||||||
@injectable()
|
@injectable()
|
||||||
export class TheiaElectronWindow extends DefaultTheiaElectronWindow {
|
export class TheiaElectronWindow extends DefaultTheiaElectronWindow {
|
||||||
protected override reload(args?: unknown): void {
|
protected override reload(args?: unknown): void {
|
||||||
this.handleStopRequest(() => {
|
this.handleStopRequest(async () => {
|
||||||
this.applicationState = 'init';
|
this.applicationState = 'init';
|
||||||
if (hasStartupTasks(args)) {
|
if (hasStartupTasks(args)) {
|
||||||
const { webContents } = this._window;
|
const { webContents } = this._window;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
||||||
import { spawn, ChildProcess } from 'node:child_process';
|
import { spawn, ChildProcess } from 'node:child_process';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { ILogger } from '@theia/core/lib/common/logger';
|
import { ILogger } from '@theia/core/lib/common/logger';
|
||||||
import { Deferred, retry } from '@theia/core/lib/common/promise-util';
|
import { Deferred, retry } from '@theia/core/lib/common/promise-util';
|
||||||
import {
|
import {
|
||||||
|
@ -105,14 +105,9 @@ import { ClangFormatter } from './clang-formatter';
|
|||||||
import { FormatterPath } from '../common/protocol/formatter';
|
import { FormatterPath } from '../common/protocol/formatter';
|
||||||
import { HostedPluginLocalizationService } from './theia/plugin-ext/hosted-plugin-localization-service';
|
import { HostedPluginLocalizationService } from './theia/plugin-ext/hosted-plugin-localization-service';
|
||||||
import { HostedPluginLocalizationService as TheiaHostedPluginLocalizationService } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-localization-service';
|
import { HostedPluginLocalizationService as TheiaHostedPluginLocalizationService } from '@theia/plugin-ext/lib/hosted/node/hosted-plugin-localization-service';
|
||||||
import { SurveyNotificationServiceImpl } from './survey-service-impl';
|
|
||||||
import {
|
|
||||||
SurveyNotificationService,
|
|
||||||
SurveyNotificationServicePath,
|
|
||||||
} from '../common/protocol/survey-service';
|
|
||||||
import { IsTempSketch } from './is-temp-sketch';
|
import { IsTempSketch } from './is-temp-sketch';
|
||||||
import { rebindNsfwFileSystemWatcher } from './theia/filesystem/nsfw-bindings';
|
import { rebindNsfwFileSystemWatcher } from './theia/filesystem/nsfw-bindings';
|
||||||
import { MessagingContribution } from './theia/core/messaging-contribution';
|
import { WebsocketEndpoint } from './theia/core/websocket-endpoint';
|
||||||
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
||||||
import { HostedPluginReader } from './theia/plugin-ext/plugin-reader';
|
import { HostedPluginReader } from './theia/plugin-ext/plugin-reader';
|
||||||
import { HostedPluginReader as TheiaHostedPluginReader } from '@theia/plugin-ext/lib/hosted/node/plugin-reader';
|
import { HostedPluginReader as TheiaHostedPluginReader } from '@theia/plugin-ext/lib/hosted/node/plugin-reader';
|
||||||
@ -383,23 +378,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
HostedPluginLocalizationService
|
HostedPluginLocalizationService
|
||||||
);
|
);
|
||||||
|
|
||||||
// Survey notification bindings
|
|
||||||
// It's currently unused. https://github.com/arduino/arduino-ide/pull/1150
|
|
||||||
bind(SurveyNotificationServiceImpl).toSelf().inSingletonScope();
|
|
||||||
bind(SurveyNotificationService).toService(SurveyNotificationServiceImpl);
|
|
||||||
bind(ConnectionHandler)
|
|
||||||
.toDynamicValue(
|
|
||||||
({ container }) =>
|
|
||||||
new JsonRpcConnectionHandler(SurveyNotificationServicePath, () =>
|
|
||||||
container.get<SurveyNotificationService>(SurveyNotificationService)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.inSingletonScope();
|
|
||||||
|
|
||||||
bind(IsTempSketch).toSelf().inSingletonScope();
|
bind(IsTempSketch).toSelf().inSingletonScope();
|
||||||
rebind(MessagingService.Identifier)
|
rebind(MessagingService.Identifier).to(WebsocketEndpoint).inSingletonScope();
|
||||||
.to(MessagingContribution)
|
|
||||||
.inSingletonScope();
|
|
||||||
|
|
||||||
// Removed undesired contributions from VS Code extensions
|
// Removed undesired contributions from VS Code extensions
|
||||||
// Such as the RTOS view from the `cortex-debug` extension
|
// Such as the RTOS view from the `cortex-debug` extension
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||||
import { MaybePromise } from '@theia/core/lib/common/types';
|
import { MaybePromise } from '@theia/core/lib/common/types';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||||
import { constants, promises as fs } from 'node:fs';
|
import { constants, promises as fs } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { notEmpty } from '@theia/core/lib/common/objects';
|
import { notEmpty } from '@theia/core/lib/common/objects';
|
||||||
import { nls } from '@theia/core/lib/common/nls';
|
import { nls } from '@theia/core/lib/common/nls';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import {
|
import {
|
||||||
Range,
|
Range,
|
||||||
Position,
|
Position,
|
||||||
|
@ -4,7 +4,7 @@ import yaml from 'js-yaml';
|
|||||||
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
||||||
import URI from '@theia/core/lib/common/uri';
|
import URI from '@theia/core/lib/common/uri';
|
||||||
import { ILogger } from '@theia/core/lib/common/logger';
|
import { ILogger } from '@theia/core/lib/common/logger';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { Event, Emitter } from '@theia/core/lib/common/event';
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
||||||
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
||||||
import {
|
import {
|
||||||
|
@ -5,12 +5,13 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { nls } from '@theia/core/lib/common/nls';
|
import { nls } from '@theia/core/lib/common/nls';
|
||||||
import type { Mutable } from '@theia/core/lib/common/types';
|
import type { Mutable } from '@theia/core/lib/common/types';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
|
||||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||||
import * as jspb from 'google-protobuf';
|
import * as jspb from 'google-protobuf';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
import { userAbort } from '../common/nls';
|
||||||
import {
|
import {
|
||||||
UploadResponse as ApiUploadResponse,
|
UploadResponse as ApiUploadResponse,
|
||||||
OutputMessage,
|
OutputMessage,
|
||||||
@ -26,6 +27,7 @@ import {
|
|||||||
isCompileSummary,
|
isCompileSummary,
|
||||||
isUploadResponse,
|
isUploadResponse,
|
||||||
} from '../common/protocol/core-service';
|
} from '../common/protocol/core-service';
|
||||||
|
import { UserAbortApplicationError } from '../common/protocol/progressible';
|
||||||
import { ResponseService } from '../common/protocol/response-service';
|
import { ResponseService } from '../common/protocol/response-service';
|
||||||
import { firstToUpperCase, notEmpty } from '../common/utils';
|
import { firstToUpperCase, notEmpty } from '../common/utils';
|
||||||
import { BoardDiscovery, createApiPort } from './board-discovery';
|
import { BoardDiscovery, createApiPort } from './board-discovery';
|
||||||
@ -52,8 +54,6 @@ import { ExecuteWithProgress, ProgressResponse } from './grpc-progressible';
|
|||||||
import { MonitorManager } from './monitor-manager';
|
import { MonitorManager } from './monitor-manager';
|
||||||
import { ServiceError } from './service-error';
|
import { ServiceError } from './service-error';
|
||||||
import { AutoFlushingBuffer } from './utils/buffers';
|
import { AutoFlushingBuffer } from './utils/buffers';
|
||||||
import { userAbort } from '../common/nls';
|
|
||||||
import { UserAbortApplicationError } from '../common/protocol/progressible';
|
|
||||||
|
|
||||||
namespace Uploadable {
|
namespace Uploadable {
|
||||||
export type Request = UploadRequest | UploadUsingProgrammerRequest;
|
export type Request = UploadRequest | UploadUsingProgrammerRequest;
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
} from '@theia/core/shared/inversify';
|
} from '@theia/core/shared/inversify';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import {
|
import {
|
||||||
SketchRef,
|
SketchRef,
|
||||||
SketchContainer,
|
SketchContainer,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { injectable } from '@theia/core/shared/inversify';
|
import { injectable } from '@theia/core/shared/inversify';
|
||||||
import { ExecutableService } from '../common/protocol/executable-service';
|
import { ExecutableService } from '../common/protocol/executable-service';
|
||||||
import {
|
import {
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
postConstruct,
|
postConstruct,
|
||||||
} from '@theia/core/shared/inversify';
|
} from '@theia/core/shared/inversify';
|
||||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import { MonitorSettingsProvider } from './monitor-settings-provider';
|
import { MonitorSettingsProvider } from './monitor-settings-provider';
|
||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { injectable } from '@theia/core/shared/inversify';
|
import { injectable } from '@theia/core/shared/inversify';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { FileSystemExt } from '../common/protocol/filesystem-ext';
|
import { FileSystemExt } from '../common/protocol/filesystem-ext';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||||
import { promises as fs } from 'node:fs';
|
import { promises as fs } from 'node:fs';
|
||||||
import {
|
import {
|
||||||
|
@ -6,7 +6,7 @@ import { Deferred } from '@theia/core/lib/common/promise-util';
|
|||||||
import { escapeRegExpCharacters } from '@theia/core/lib/common/strings';
|
import { escapeRegExpCharacters } from '@theia/core/lib/common/strings';
|
||||||
import type { Mutable } from '@theia/core/lib/common/types';
|
import type { Mutable } from '@theia/core/lib/common/types';
|
||||||
import URI from '@theia/core/lib/common/uri';
|
import URI from '@theia/core/lib/common/uri';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
||||||
import { glob } from 'glob';
|
import { glob } from 'glob';
|
||||||
import crypto from 'node:crypto';
|
import crypto from 'node:crypto';
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
import { injectable } from '@theia/core/shared/inversify';
|
|
||||||
import { SurveyNotificationService } from '../common/protocol/survey-service';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service for checking if it is the first instance of the IDE, in this case it sets a flag to true.
|
|
||||||
* This flag is used to prevent the survey notification from being visible in every open window. It must only be shown on one window.
|
|
||||||
*/
|
|
||||||
@injectable()
|
|
||||||
export class SurveyNotificationServiceImpl
|
|
||||||
implements SurveyNotificationService
|
|
||||||
{
|
|
||||||
private surveyDidShow = false;
|
|
||||||
async isFirstInstance(): Promise<boolean> {
|
|
||||||
if (this.surveyDidShow) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
this.surveyDidShow = true;
|
|
||||||
return this.surveyDidShow;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,8 @@
|
|||||||
import { MessagingContribution as TheiaMessagingContribution } from '@theia/core/lib/node/messaging/messaging-contribution';
|
import { WebsocketEndpoint as TheiaWebsocketEndpoint } from '@theia/core/lib/node/messaging/websocket-endpoint';
|
||||||
import { injectable } from '@theia/core/shared/inversify';
|
import { injectable } from '@theia/core/shared/inversify';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class MessagingContribution extends TheiaMessagingContribution {
|
export class WebsocketEndpoint extends TheiaWebsocketEndpoint {
|
||||||
// https://github.com/eclipse-theia/theia/discussions/11543
|
// https://github.com/eclipse-theia/theia/discussions/11543
|
||||||
protected override checkAliveTimeout = process.argv.includes(
|
protected override checkAliveTimeout = process.argv.includes(
|
||||||
'--no-ping-timeout'
|
'--no-ping-timeout'
|
@ -5,7 +5,7 @@ import {
|
|||||||
import { isWindows } from '@theia/core/lib/common/os';
|
import { isWindows } from '@theia/core/lib/common/os';
|
||||||
import URI from '@theia/core/lib/common/uri';
|
import URI from '@theia/core/lib/common/uri';
|
||||||
import { BackendApplicationConfigProvider } from '@theia/core/lib/node/backend-application-config-provider';
|
import { BackendApplicationConfigProvider } from '@theia/core/lib/node/backend-application-config-provider';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
injectable,
|
injectable,
|
||||||
|
@ -83,7 +83,9 @@ const cortexDebugMapper: PluginContributionMapper = (
|
|||||||
}
|
}
|
||||||
for (const _debugger of contribution.debuggers ?? []) {
|
for (const _debugger of contribution.debuggers ?? []) {
|
||||||
if (_debugger.type === 'cortex-debug') {
|
if (_debugger.type === 'cortex-debug') {
|
||||||
for (const attributes of _debugger.configurationAttributes ?? []) {
|
for (const attributes of Object.values(
|
||||||
|
_debugger.configurationAttributes ?? {}
|
||||||
|
)) {
|
||||||
if (attributes.properties) {
|
if (attributes.properties) {
|
||||||
// Patch the cortex-debug debug config schema to allow the in-house `configId`.
|
// Patch the cortex-debug debug config schema to allow the in-house `configId`.
|
||||||
attributes.properties['configId'] = {
|
attributes.properties['configId'] = {
|
||||||
|
@ -2,7 +2,7 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { promises as fs } from 'node:fs';
|
import { promises as fs } from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import type { MaybePromise } from '@theia/core/lib/common/types';
|
import type { MaybePromise } from '@theia/core/lib/common/types';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { Container } from '@theia/core/shared/inversify';
|
import { Container } from '@theia/core/shared/inversify';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { dump, load } from 'js-yaml';
|
import { dump, load } from 'js-yaml';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||||
import { isWindows } from '@theia/core/lib/common/os';
|
import { isWindows } from '@theia/core/lib/common/os';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { Container } from '@theia/core/shared/inversify';
|
import { Container } from '@theia/core/shared/inversify';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import {
|
import {
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
import { EnvVariablesServer as TheiaEnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
import { EnvVariablesServer as TheiaEnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||||
import { waitForEvent } from '@theia/core/lib/common/promise-util';
|
import { waitForEvent } from '@theia/core/lib/common/promise-util';
|
||||||
import URI from '@theia/core/lib/common/uri';
|
import URI from '@theia/core/lib/common/uri';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { ProcessUtils } from '@theia/core/lib/node/process-utils';
|
import { ProcessUtils } from '@theia/core/lib/node/process-utils';
|
||||||
import {
|
import {
|
||||||
Container,
|
Container,
|
||||||
|
@ -2,9 +2,9 @@ import {
|
|||||||
Disposable,
|
Disposable,
|
||||||
DisposableCollection,
|
DisposableCollection,
|
||||||
} from '@theia/core/lib/common/disposable';
|
} from '@theia/core/lib/common/disposable';
|
||||||
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import { isWindows } from '@theia/core/lib/common/os';
|
import { isWindows } from '@theia/core/lib/common/os';
|
||||||
import { URI } from '@theia/core/lib/common/uri';
|
import { URI } from '@theia/core/lib/common/uri';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
|
||||||
import { Container } from '@theia/core/shared/inversify';
|
import { Container } from '@theia/core/shared/inversify';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { rejects } from 'node:assert/strict';
|
import { rejects } from 'node:assert/strict';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Mutable } from '@theia/core/lib/common/types';
|
import type { Mutable } from '@theia/core/lib/common/types';
|
||||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
||||||
import stableJsonStringify from 'fast-json-stable-stringify';
|
import stableJsonStringify from 'fast-json-stable-stringify';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import { basename, join } from 'node:path';
|
import { basename, join } from 'node:path';
|
||||||
|
@ -5,30 +5,30 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"main": "./src-gen/backend/electron-main.js",
|
"main": "./src-gen/backend/electron-main.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@theia/core": "1.41.0",
|
"@theia/core": "1.46.1",
|
||||||
"@theia/debug": "1.41.0",
|
"@theia/debug": "1.46.1",
|
||||||
"@theia/editor": "1.41.0",
|
"@theia/editor": "1.46.1",
|
||||||
"@theia/electron": "1.41.0",
|
"@theia/electron": "1.46.1",
|
||||||
"@theia/filesystem": "1.41.0",
|
"@theia/filesystem": "1.46.1",
|
||||||
"@theia/keymaps": "1.41.0",
|
"@theia/keymaps": "1.46.1",
|
||||||
"@theia/messages": "1.41.0",
|
"@theia/messages": "1.46.1",
|
||||||
"@theia/monaco": "1.41.0",
|
"@theia/monaco": "1.46.1",
|
||||||
"@theia/navigator": "1.41.0",
|
"@theia/navigator": "1.46.1",
|
||||||
"@theia/plugin-ext": "1.41.0",
|
"@theia/plugin-ext": "1.46.1",
|
||||||
"@theia/plugin-ext-vscode": "1.41.0",
|
"@theia/plugin-ext-vscode": "1.46.1",
|
||||||
"@theia/preferences": "1.41.0",
|
"@theia/preferences": "1.46.1",
|
||||||
"@theia/terminal": "1.41.0",
|
"@theia/terminal": "1.46.1",
|
||||||
"@theia/workspace": "1.41.0",
|
"@theia/workspace": "1.46.1",
|
||||||
"arduino-ide-extension": "2.3.5"
|
"arduino-ide-extension": "2.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@theia/cli": "1.41.0",
|
"@theia/cli": "1.46.1",
|
||||||
"7zip-min": "^1.4.4",
|
"7zip-min": "^1.4.4",
|
||||||
"chmodr": "^1.2.0",
|
"chmodr": "^1.2.0",
|
||||||
"compression-webpack-plugin": "^9.0.0",
|
"compression-webpack-plugin": "^9.0.0",
|
||||||
"copy-webpack-plugin": "^8.1.1",
|
"copy-webpack-plugin": "^8.1.1",
|
||||||
"dateformat": "^5.0.3",
|
"dateformat": "^5.0.3",
|
||||||
"electron": "^27.0.3",
|
"electron": "^27.3.1",
|
||||||
"electron-builder": "^24.6.4",
|
"electron-builder": "^24.6.4",
|
||||||
"electron-notarize": "^1.1.1",
|
"electron-notarize": "^1.1.1",
|
||||||
"execa": "^7.1.1",
|
"execa": "^7.1.1",
|
||||||
@ -66,6 +66,10 @@
|
|||||||
},
|
},
|
||||||
"defaultIconTheme": "none",
|
"defaultIconTheme": "none",
|
||||||
"validatePreferencesSchema": false,
|
"validatePreferencesSchema": false,
|
||||||
|
"electron": {
|
||||||
|
"showWindowEarly": true
|
||||||
|
},
|
||||||
|
"reloadOnReconnect": true,
|
||||||
"preferences": {
|
"preferences": {
|
||||||
"window.title": "${rootName}${activeEditorShort}${appName}",
|
"window.title": "${rootName}${activeEditorShort}${appName}",
|
||||||
"files.autoSave": "afterDelay",
|
"files.autoSave": "afterDelay",
|
||||||
@ -195,29 +199,29 @@
|
|||||||
},
|
},
|
||||||
"theiaPluginsDir": "plugins",
|
"theiaPluginsDir": "plugins",
|
||||||
"theiaPlugins": {
|
"theiaPlugins": {
|
||||||
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.52.1/file/vscode.cpp-1.52.1.vsix",
|
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.83.1/file/vscode.cpp-1.83.1.vsix",
|
||||||
"vscode-arduino-api": "https://github.com/dankeboy36/vscode-arduino-api/releases/download/0.1.2/vscode-arduino-api-0.1.2.vsix",
|
"vscode-arduino-api": "https://github.com/dankeboy36/vscode-arduino-api/releases/download/0.1.2/vscode-arduino-api-0.1.2.vsix",
|
||||||
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.3.vsix",
|
"vscode-arduino-tools": "https://downloads.arduino.cc/vscode-arduino-tools/vscode-arduino-tools-0.1.3.vsix",
|
||||||
"vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.46.1/file/vscode.json-1.46.1.vsix",
|
"vscode-builtin-json": "https://open-vsx.org/api/vscode/json/1.83.1/file/vscode.json-1.83.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",
|
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.83.1/file/vscode.json-language-features-1.83.1.vsix",
|
||||||
"cortex-debug": "https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix",
|
"cortex-debug": "https://downloads.arduino.cc/marus25.cortex-debug/marus25.cortex-debug-1.5.1.vsix",
|
||||||
"vscode-language-pack-bg": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-bg/1.48.3/file/MS-CEINTL.vscode-language-pack-bg-1.48.3.vsix",
|
"vscode-language-pack-bg": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-bg/1.48.3/file/MS-CEINTL.vscode-language-pack-bg-1.48.3.vsix",
|
||||||
"vscode-language-pack-cs": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-cs/1.80.0/file/MS-CEINTL.vscode-language-pack-cs-1.80.0.vsix",
|
"vscode-language-pack-cs": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-cs/1.85.0/file/MS-CEINTL.vscode-language-pack-cs-1.85.0.vsix",
|
||||||
"vscode-language-pack-de": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-de/1.80.0/file/MS-CEINTL.vscode-language-pack-de-1.80.0.vsix",
|
"vscode-language-pack-de": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-de/1.85.0/file/MS-CEINTL.vscode-language-pack-de-1.85.0.vsix",
|
||||||
"vscode-language-pack-es": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-es/1.80.0/file/MS-CEINTL.vscode-language-pack-es-1.80.0.vsix",
|
"vscode-language-pack-es": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-es/1.85.0/file/MS-CEINTL.vscode-language-pack-es-1.85.0.vsix",
|
||||||
"vscode-language-pack-fr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-fr/1.80.0/file/MS-CEINTL.vscode-language-pack-fr-1.80.0.vsix",
|
"vscode-language-pack-fr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-fr/1.85.0/file/MS-CEINTL.vscode-language-pack-fr-1.85.0.vsix",
|
||||||
"vscode-language-pack-hu": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-hu/1.48.3/file/MS-CEINTL.vscode-language-pack-hu-1.48.3.vsix",
|
"vscode-language-pack-hu": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-hu/1.48.3/file/MS-CEINTL.vscode-language-pack-hu-1.48.3.vsix",
|
||||||
"vscode-language-pack-it": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-it/1.80.0/file/MS-CEINTL.vscode-language-pack-it-1.80.0.vsix",
|
"vscode-language-pack-it": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-it/1.85.0/file/MS-CEINTL.vscode-language-pack-it-1.85.0.vsix",
|
||||||
"vscode-language-pack-ja": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ja/1.80.0/file/MS-CEINTL.vscode-language-pack-ja-1.80.0.vsix",
|
"vscode-language-pack-ja": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ja/1.85.0/file/MS-CEINTL.vscode-language-pack-ja-1.85.0.vsix",
|
||||||
"vscode-language-pack-ko": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ko/1.80.0/file/MS-CEINTL.vscode-language-pack-ko-1.80.0.vsix",
|
"vscode-language-pack-ko": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ko/1.85.0/file/MS-CEINTL.vscode-language-pack-ko-1.85.0.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-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-pl": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-pl/1.80.0/file/MS-CEINTL.vscode-language-pack-pl-1.80.0.vsix",
|
"vscode-language-pack-pl": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-pl/1.85.0/file/MS-CEINTL.vscode-language-pack-pl-1.85.0.vsix",
|
||||||
"vscode-language-pack-pt-BR": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-pt-BR/1.80.0/file/MS-CEINTL.vscode-language-pack-pt-BR-1.80.0.vsix",
|
"vscode-language-pack-pt-BR": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-pt-BR/1.85.0/file/MS-CEINTL.vscode-language-pack-pt-BR-1.85.0.vsix",
|
||||||
"vscode-language-pack-ru": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ru/1.80.0/file/MS-CEINTL.vscode-language-pack-ru-1.80.0.vsix",
|
"vscode-language-pack-ru": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-ru/1.85.0/file/MS-CEINTL.vscode-language-pack-ru-1.85.0.vsix",
|
||||||
"vscode-language-pack-tr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-tr/1.80.0/file/MS-CEINTL.vscode-language-pack-tr-1.80.0.vsix",
|
"vscode-language-pack-tr": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-tr/1.85.0/file/MS-CEINTL.vscode-language-pack-tr-1.85.0.vsix",
|
||||||
"vscode-language-pack-uk": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-uk/1.48.3/file/MS-CEINTL.vscode-language-pack-uk-1.48.3.vsix",
|
"vscode-language-pack-uk": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-uk/1.48.3/file/MS-CEINTL.vscode-language-pack-uk-1.48.3.vsix",
|
||||||
"vscode-language-pack-zh-hans": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.80.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.80.0.vsix",
|
"vscode-language-pack-zh-hans": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.85.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.85.0.vsix",
|
||||||
"vscode-language-pack-zh-hant": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hant/1.80.0/file/MS-CEINTL.vscode-language-pack-zh-hant-1.80.0.vsix"
|
"vscode-language-pack-zh-hant": "https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hant/1.85.0/file/MS-CEINTL.vscode-language-pack-zh-hant-1.85.0.vsix"
|
||||||
},
|
},
|
||||||
"mocha": {
|
"mocha": {
|
||||||
"reporter": "spec",
|
"reporter": "spec",
|
||||||
|
@ -415,7 +415,6 @@
|
|||||||
},
|
},
|
||||||
"sketchbook.location": "Sketchbook location",
|
"sketchbook.location": "Sketchbook location",
|
||||||
"sketchbook.showAllFiles": "True to show all sketch files inside the sketch. It is false by default.",
|
"sketchbook.showAllFiles": "True to show all sketch files inside the sketch. It is false by default.",
|
||||||
"survey.notification": "True if users should be notified if a survey is available. True by default.",
|
|
||||||
"unofficialBoardSupport": "Click for a list of unofficial board support URLs",
|
"unofficialBoardSupport": "Click for a list of unofficial board support URLs",
|
||||||
"upload": "upload",
|
"upload": "upload",
|
||||||
"upload.autoVerify": "True if the IDE should automatically verify the code before the upload. True by default. When this value is false, IDE does not recompile the code before uploading the binary to the board. It's highly advised to only set this value to false if you know what you are doing.",
|
"upload.autoVerify": "True if the IDE should automatically verify the code before the upload. True by default. When this value is false, IDE does not recompile the code before uploading the binary to the board. It's highly advised to only set this value to false if you know what you are doing.",
|
||||||
@ -490,11 +489,6 @@
|
|||||||
"newCloudSketch": "New Cloud Sketch",
|
"newCloudSketch": "New Cloud Sketch",
|
||||||
"newSketch": "New Sketch"
|
"newSketch": "New Sketch"
|
||||||
},
|
},
|
||||||
"survey": {
|
|
||||||
"answerSurvey": "Answer survey",
|
|
||||||
"dismissSurvey": "Don't show again",
|
|
||||||
"surveyMessage": "Please help us improve by answering this super short survey. We value our community and would like to get to know our supporters a little better."
|
|
||||||
},
|
|
||||||
"theme": {
|
"theme": {
|
||||||
"currentThemeNotFound": "Could not find the currently selected theme: {0}. Arduino IDE has picked a built-in theme compatible with the missing one.",
|
"currentThemeNotFound": "Could not find the currently selected theme: {0}. Arduino IDE has picked a built-in theme compatible with the missing one.",
|
||||||
"dark": "Dark",
|
"dark": "Dark",
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"**/ip": "^2.0.1"
|
"**/ip": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@theia/cli": "1.41.0",
|
"@theia/cli": "1.46.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
||||||
"@typescript-eslint/parser": "^5.59.0",
|
"@typescript-eslint/parser": "^5.59.0",
|
||||||
"@xhmikosr/downloader": "^13.0.1",
|
"@xhmikosr/downloader": "^13.0.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user