From f711fd9fe6d821f31bf8d095bdc191a0acb15b9d Mon Sep 17 00:00:00 2001 From: Martin Fleck Date: Fri, 20 Dec 2024 14:31:44 +0100 Subject: [PATCH] Add Git and Open VSX registry ('Extension') support --- applications/browser-app/package.json | 7 ++++-- applications/electron-app/package.json | 7 ++++-- packages/product/package.json | 5 ++-- .../cross-model-frontend-application.ts | 2 ++ yarn.lock | 23 +++++++++++++++++++ 5 files changed, 38 insertions(+), 6 deletions(-) diff --git a/applications/browser-app/package.json b/applications/browser-app/package.json index a95d936..632fbf2 100644 --- a/applications/browser-app/package.json +++ b/applications/browser-app/package.json @@ -43,6 +43,7 @@ "@theia/preferences": "1.49.1", "@theia/process": "1.49.1", "@theia/terminal": "1.49.1", + "@theia/vsx-registry": "1.49.1", "@theia/workspace": "1.49.1" }, "devDependencies": { @@ -62,7 +63,8 @@ "security.workspace.trust.enabled": false, "files.associations": { "*.port": "ignore" - } + }, + "git.openRepositoryInParentFolders": "always" }, "reloadOnReconnect": true } @@ -81,7 +83,8 @@ "theiaPlugins": { "vscode.json-1.88.1": "https://open-vsx.org/api/vscode/json/1.88.1/file/vscode.json-1.88.1.vsix", "vscode.json-language-features-1.88.1": "https://open-vsx.org/api/vscode/json-language-features/1.88.1/file/vscode.json-language-features-1.88.1.vsix", - "vscode.npm-1.88.1": "https://open-vsx.org/api/vscode/npm/1.88.1/file/vscode.npm-1.88.1.vsix" + "vscode.npm-1.88.1": "https://open-vsx.org/api/vscode/npm/1.88.1/file/vscode.npm-1.88.1.vsix", + "vscode.git-1.88.1": "https://open-vsx.org/api/vscode/git/1.88.1/file/vscode.git-1.88.1.vsix" }, "theiaPluginsDir": "plugins" } diff --git a/applications/electron-app/package.json b/applications/electron-app/package.json index 973165f..22eef34 100644 --- a/applications/electron-app/package.json +++ b/applications/electron-app/package.json @@ -51,6 +51,7 @@ "@theia/preferences": "1.49.1", "@theia/process": "1.49.1", "@theia/terminal": "1.49.1", + "@theia/vsx-registry": "1.49.1", "@theia/workspace": "1.49.1" }, "devDependencies": { @@ -73,7 +74,8 @@ "security.workspace.trust.enabled": false, "files.associations": { "*.port": "ignore" - } + }, + "git.openRepositoryInParentFolders": "always" } } }, @@ -91,7 +93,8 @@ "theiaPlugins": { "vscode.json-1.88.1": "https://open-vsx.org/api/vscode/json/1.88.1/file/vscode.json-1.88.1.vsix", "vscode.json-language-features-1.88.1": "https://open-vsx.org/api/vscode/json-language-features/1.88.1/file/vscode.json-language-features-1.88.1.vsix", - "vscode.npm-1.88.1": "https://open-vsx.org/api/vscode/npm/1.88.1/file/vscode.npm-1.88.1.vsix" + "vscode.npm-1.88.1": "https://open-vsx.org/api/vscode/npm/1.88.1/file/vscode.npm-1.88.1.vsix", + "vscode.git-1.88.1": "https://open-vsx.org/api/vscode/git/1.88.1/file/vscode.git-1.88.1.vsix" }, "theiaPluginsDir": "plugins" } diff --git a/packages/product/package.json b/packages/product/package.json index 3e99531..f8fa8b4 100644 --- a/packages/product/package.json +++ b/packages/product/package.json @@ -35,8 +35,9 @@ "@theia/monaco": "1.49.1", "@theia/navigator": "1.49.1", "@theia/property-view": "1.49.1", - "@theia/workspace": "1.49.1", - "@theia/search-in-workspace": "1.49.1" + "@theia/scm": "1.49.1", + "@theia/search-in-workspace": "1.49.1", + "@theia/workspace": "1.49.1" }, "theiaExtensions": [ { diff --git a/packages/product/src/browser/cross-model-frontend-application.ts b/packages/product/src/browser/cross-model-frontend-application.ts index 66c7b66..b9740f9 100644 --- a/packages/product/src/browser/cross-model-frontend-application.ts +++ b/packages/product/src/browser/cross-model-frontend-application.ts @@ -6,6 +6,7 @@ import { inject } from '@theia/core/shared/inversify'; import { PROBLEMS_WIDGET_ID } from '@theia/markers/lib/browser/problem/problem-widget'; import { NavigatorWidgetFactory } from '@theia/navigator/lib/browser/navigator-widget-factory'; import { PropertyViewWidget } from '@theia/property-view/lib/browser/property-view-widget'; +import { SCM_VIEW_CONTAINER_ID } from '@theia/scm/lib/browser/scm-contribution'; import { SearchInWorkspaceWidget } from '@theia/search-in-workspace/lib/browser/search-in-workspace-widget'; export class CrossModelFrontendApplication extends FrontendApplication { @@ -15,6 +16,7 @@ export class CrossModelFrontendApplication extends FrontendApplication { // ignores all FrontendApplicationContribution.initializeLayout calls and focusses on a very clean interface await this.showWidget(NavigatorWidgetFactory.ID, 'left'); await this.showWidget(SearchInWorkspaceWidget.ID, 'left', false); + await this.showWidget(SCM_VIEW_CONTAINER_ID, 'left', false); await this.showWidget(PropertyViewWidget.ID, 'right'); await this.showWidget(PROBLEMS_WIDGET_ID, 'bottom'); this.shell.leftPanelHandler.resize(400); diff --git a/yarn.lock b/yarn.lock index a6be473..350fcbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3080,6 +3080,24 @@ "@theia/core" "1.49.1" tslib "^2.6.2" +"@theia/vsx-registry@1.49.1": + version "1.49.1" + resolved "https://registry.yarnpkg.com/@theia/vsx-registry/-/vsx-registry-1.49.1.tgz#759faed3678013fe169e3755a5d6c600cd8f4d70" + integrity sha512-wKycl4HFWGogCwJ0T+0JcjJdxlhJxt7BBjgSsYBz//udOhJM/MefVO8B0BFHh73W/+gG/JfL1WYCTDWNkSAukw== + dependencies: + "@theia/core" "1.49.1" + "@theia/filesystem" "1.49.1" + "@theia/navigator" "1.49.1" + "@theia/ovsx-client" "1.49.1" + "@theia/plugin-ext" "1.49.1" + "@theia/plugin-ext-vscode" "1.49.1" + "@theia/preferences" "1.49.1" + "@theia/workspace" "1.49.1" + luxon "^2.4.0" + p-debounce "^2.1.0" + semver "^7.5.4" + tslib "^2.6.2" + "@theia/workspace@1.49.1": version "1.49.1" resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-1.49.1.tgz#ba63b3d70a178fa913395784eaeb100e7e927a55" @@ -10978,6 +10996,11 @@ lru-cache@^6.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== +luxon@^2.4.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-2.5.2.tgz#17ed497f0277e72d58a4756d6a9abee4681457b6" + integrity sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA== + lz-string@^1.4.4: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"