diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index e802ccf1..0d47ea78 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -19,7 +19,6 @@ "@grpc/grpc-js": "^1.1.1", "@theia/application-package": "next", "@theia/core": "next", - "@theia/cpp": "next", "@theia/editor": "next", "@theia/filesystem": "next", "@theia/git": "next", @@ -28,6 +27,7 @@ "@theia/monaco": "next", "@theia/navigator": "next", "@theia/outline-view": "next", + "@theia/preferences": "next", "@theia/search-in-workspace": "next", "@theia/terminal": "next", "@theia/workspace": "next", diff --git a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts index d31020fa..326eb9d3 100644 --- a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts +++ b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts @@ -98,6 +98,8 @@ import { UploadSketch } from './contributions/upload-sketch'; import { CommonFrontendContribution } from './theia/core/common-frontend-contribution'; import { EditContributions } from './contributions/edit-contributions'; import { OpenSketchExternal } from './contributions/open-sketch-external'; +import { PreferencesContribution as TheiaPreferencesContribution } from '@theia/preferences/lib/browser/preference-contribution'; +import { PreferencesContribution } from './theia/preferences/preference-contribution'; const ElementQueries = require('css-element-queries/src/ElementQueries'); @@ -272,6 +274,7 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un rebind(TheiaWorkspaceFrontendContribution).to(WorkspaceFrontendContribution).inSingletonScope(); rebind(TheiaFileMenuContribution).to(ArduinoFileMenuContribution).inSingletonScope(); rebind(TheiaCommonFrontendContribution).to(CommonFrontendContribution).inSingletonScope(); + rebind(TheiaPreferencesContribution).to(PreferencesContribution).inSingletonScope(); // Show a disconnected status bar, when the daemon is not available bind(ApplicationConnectionStatusContribution).toSelf().inSingletonScope(); diff --git a/arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts b/arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts index e9ddfc36..577341f3 100644 --- a/arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts +++ b/arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts @@ -16,7 +16,9 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution CommonCommands.COPY_PATH, CommonCommands.FIND, CommonCommands.REPLACE, - CommonCommands.AUTO_SAVE + CommonCommands.AUTO_SAVE, + CommonCommands.SELECT_ICON_THEME, + CommonCommands.SELECT_COLOR_THEME ]) { registry.unregisterMenuAction(command); } diff --git a/arduino-ide-extension/src/browser/theia/preferences/preference-contribution.ts b/arduino-ide-extension/src/browser/theia/preferences/preference-contribution.ts new file mode 100644 index 00000000..f8d67870 --- /dev/null +++ b/arduino-ide-extension/src/browser/theia/preferences/preference-contribution.ts @@ -0,0 +1,17 @@ +import { injectable } from 'inversify'; +import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding'; +import { PreferencesContribution as TheiaPreferencesContribution } from '@theia/preferences/lib/browser/preference-contribution'; +import { CommonCommands } from '@theia/core/lib/browser'; + +@injectable() +export class PreferencesContribution extends TheiaPreferencesContribution { + + registerKeybindings(registry: KeybindingRegistry): void { + // https://github.com/eclipse-theia/theia/issues/8202 + registry.registerKeybinding({ + command: CommonCommands.OPEN_PREFERENCES.id, + keybinding: 'CtrlCmd+,', + }); + } + +} diff --git a/browser-app/package.json b/browser-app/package.json index 31abaf94..ea85501a 100644 --- a/browser-app/package.json +++ b/browser-app/package.json @@ -5,7 +5,6 @@ "license": "MIT", "dependencies": { "@theia/core": "next", - "@theia/cpp": "next", "@theia/debug": "next", "@theia/editor": "next", "@theia/file-search": "next", diff --git a/electron-app/package.json b/electron-app/package.json index f08ce8a8..a3274b39 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -6,7 +6,6 @@ "main": "src-gen/frontend/electron-main.js", "dependencies": { "@theia/core": "next", - "@theia/cpp": "next", "@theia/debug": "next", "@theia/editor": "next", "@theia/electron": "next", diff --git a/yarn.lock b/yarn.lock index e66c3d9f..8b78c836 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2105,23 +2105,6 @@ ws "^7.1.2" yargs "^11.1.0" -"@theia/cpp@next": - version "1.1.0-next.184f7751" - resolved "https://registry.yarnpkg.com/@theia/cpp/-/cpp-1.1.0-next.184f7751.tgz#96c5ca20d24e1285599d2decfa425d1100f6c8e9" - integrity sha512-TAp0TS5YCUl1z3Avl7BrZF/LrZZmbbR+oMyeOwauVKkoc05k1+fKiH8qVVLeWPkvTmnAKfB/rVxVnmCKLE+O5w== - dependencies: - "@theia/core" next - "@theia/editor" next - "@theia/filesystem" next - "@theia/languages" next - "@theia/monaco" next - "@theia/preferences" next - "@theia/process" next - "@theia/task" next - "@theia/variable-resolver" next - "@theia/workspace" next - string-argv "^0.1.1" - "@theia/debug@1.4.0-next.beb68c7f", "@theia/debug@next": version "1.4.0-next.beb68c7f" resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-1.4.0-next.beb68c7f.tgz#c20dd658b207efb5d3534497083f0f3134193f75" @@ -2458,7 +2441,7 @@ "@theia/workspace" "1.4.0-next.beb68c7f" vscode-ripgrep "^1.2.4" -"@theia/task@1.4.0-next.beb68c7f", "@theia/task@next": +"@theia/task@1.4.0-next.beb68c7f": version "1.4.0-next.beb68c7f" resolved "https://registry.yarnpkg.com/@theia/task/-/task-1.4.0-next.beb68c7f.tgz#b0b1022e8b3e69520411d583331bb00f3eaa9d3b" integrity sha512-hpg3UMeiLrh2LxzJT3mn31E8MuS7OlO5D1VIkahcPOzsHMwqRsxNCJSojpT2coVz4Z11tcdt+0Tz73dfHsSwDw== @@ -2499,7 +2482,7 @@ "@theia/core" "1.4.0-next.beb68c7f" "@theia/filesystem" "1.4.0-next.beb68c7f" -"@theia/variable-resolver@1.4.0-next.beb68c7f", "@theia/variable-resolver@next": +"@theia/variable-resolver@1.4.0-next.beb68c7f": version "1.4.0-next.beb68c7f" resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-1.4.0-next.beb68c7f.tgz#f06b2c3a3e2aa731aaa682ef62409c4e6bbb9a94" integrity sha512-TL0uYHI68Z9kRugygz3wwF+NV+FBsZA+3POxdVV4snWUSoGwmGBWBgb4NZ62Z6W4rRHgLYjs08xl62HtYT1B0Q==