diff --git a/.vscode/launch.json b/.vscode/launch.json index 802b130d6..820ba07b8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -20,7 +20,6 @@ "--no-app-auto-install", "--plugins=local-dir:../plugins", "--hosted-plugin-inspect=9339", - "--nosplash", "--content-trace", "--open-devtools" ], diff --git a/BUILDING.md b/BUILDING.md index ed13b2e93..15499bfdd 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -41,7 +41,7 @@ The _frontend_ is running as an Electron renderer process and can invoke service If you’re familiar with TypeScript, the [Theia IDE](https://theia-ide.org/), and if you want to contribute to the project, you should be able to build the Arduino IDE locally. -Please refer to the [Theia IDE prerequisites](https://github.com/theia-ide/theia/blob/master/doc/) documentation for the setup instructions. +Please refer to the [Theia IDE prerequisites](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites) documentation for the setup instructions. > **Note**: Node.js 14 must be used instead of the version 12 recommended at the link above. Once you have all the tools installed, you can build the editor following these steps @@ -89,7 +89,6 @@ This project is built on [GitHub Actions](https://github.com/arduino/arduino-ide git push origin 1.2.3 ``` - ## Notes for macOS contributors Beginning in macOS 10.14.5, the software [must be notarized to run](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution). The signing and notarization processes for the Arduino IDE are managed by our Continuous Integration (CI) workflows, implemented with GitHub Actions. On every push and pull request, the Arduino IDE is built and saved to a workflow artifact. These artifacts can be used by contributors and beta testers who don't want to set up a build system locally. For security reasons, signing and notarization are disabled for workflow runs for pull requests from forks of this repository. This means that macOS will block you from running those artifacts. diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 713c7868c..18f48dadc 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -1,6 +1,6 @@ { "name": "arduino-ide-extension", - "version": "2.0.0-rc9.1", + "version": "2.0.0-rc9.2", "description": "An extension for Theia building the Arduino IDE", "license": "AGPL-3.0-or-later", "scripts": { @@ -150,13 +150,17 @@ "frontend": "lib/browser/theia/core/browser-menu-module", "frontendElectron": "lib/electron-browser/theia/core/electron-menu-module" }, + { + "frontend": "lib/browser/theia/core/browser-window-module", + "frontendElectron": "lib/electron-browser/theia/core/electron-window-module" + }, { "electronMain": "lib/electron-main/arduino-electron-main-module" } ], "arduino": { "cli": { - "version": "0.25.1" + "version": "0.26.0-rc.1" }, "fwuploader": { "version": "2.2.0" diff --git a/arduino-ide-extension/src/browser/contributions/edit-contributions.ts b/arduino-ide-extension/src/browser/contributions/edit-contributions.ts index c66b41865..7c75c7225 100644 --- a/arduino-ide-extension/src/browser/contributions/edit-contributions.ts +++ b/arduino-ide-extension/src/browser/contributions/edit-contributions.ts @@ -141,6 +141,11 @@ ${value} label: nls.localize('arduino/editor/decreaseIndent', 'Decrease Indent'), order: '2', }); + registry.registerMenuAction(ArduinoMenus.EDIT__CODE_CONTROL_GROUP, { + commandId: EditContributions.Commands.AUTO_FORMAT.id, + label: nls.localize('arduino/editor/autoFormat', 'Auto Format'), + order: '3', + }); registry.registerMenuAction(ArduinoMenus.EDIT__FONT_CONTROL_GROUP, { commandId: EditContributions.Commands.INCREASE_FONT_SIZE.id, @@ -248,10 +253,13 @@ ${value} }); } - protected async current(): Promise { + protected async current(): Promise< + ICodeEditor | StandaloneCodeEditor | undefined + > { return ( this.codeEditorService.getFocusedCodeEditor() || - this.codeEditorService.getActiveCodeEditor() || undefined + this.codeEditorService.getActiveCodeEditor() || + undefined ); } diff --git a/arduino-ide-extension/src/browser/contributions/first-startup-installer.ts b/arduino-ide-extension/src/browser/contributions/first-startup-installer.ts index 5010c5fc9..8f469ee7d 100644 --- a/arduino-ide-extension/src/browser/contributions/first-startup-installer.ts +++ b/arduino-ide-extension/src/browser/contributions/first-startup-installer.ts @@ -43,7 +43,7 @@ export class FirstStartupInstaller extends Contribution { // If arduino:avr installation fails because it's already installed we don't want to retry on next start-up console.error(e); } else { - // But if there is any other error (e.g.: no interntet cconnection), we want to retry next time + // But if there is any other error (e.g.: no Internet connection), we want to retry next time avrPackageError = e; } } @@ -64,7 +64,7 @@ export class FirstStartupInstaller extends Contribution { // If Arduino_BuiltIn installation fails because it's already installed we don't want to retry on next start-up console.log('error installing core', e); } else { - // But if there is any other error (e.g.: no interntet cconnection), we want to retry next time + // But if there is any other error (e.g.: no Internet connection), we want to retry next time builtInLibraryError = e; } } diff --git a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx index 4a9d2f4da..21ec1586b 100644 --- a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx +++ b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx @@ -19,6 +19,7 @@ import { CommandRegistry } from '@theia/core/lib/common/command'; import { certificateList, sanifyCertString } from './utils'; import { ArduinoFirmwareUploader } from '../../../common/protocol/arduino-firmware-uploader'; import { nls } from '@theia/core/lib/common'; +import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; @injectable() export class UploadCertificateDialogWidget extends ReactWidget { @@ -37,6 +38,9 @@ export class UploadCertificateDialogWidget extends ReactWidget { @inject(ArduinoFirmwareUploader) protected readonly arduinoFirmwareUploader: ArduinoFirmwareUploader; + @inject(FrontendApplicationStateService) + private readonly appStateService: FrontendApplicationStateService; + protected certificates: string[] = []; protected updatableFqbns: string[] = []; protected availableBoards: AvailableBoard[] = []; @@ -66,10 +70,12 @@ export class UploadCertificateDialogWidget extends ReactWidget { } }); - this.arduinoFirmwareUploader.updatableBoards().then((fqbns) => { - this.updatableFqbns = fqbns; - this.update(); - }); + this.appStateService.reachedState('ready').then(() => + this.arduinoFirmwareUploader.updatableBoards().then((fqbns) => { + this.updatableFqbns = fqbns; + this.update(); + }) + ); this.boardsServiceClient.onAvailableBoardsChanged((availableBoards) => { this.availableBoards = availableBoards; diff --git a/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx b/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx index 6bbc3c4c1..dc3d00252 100644 --- a/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx +++ b/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx @@ -201,12 +201,7 @@ export class SettingsComponent extends React.Component<