From 9f69d2cfb7000364acae34fbe96f16dd64652e5b Mon Sep 17 00:00:00 2001 From: Laert Llaveshi Date: Fri, 12 Jun 2026 09:13:07 +0200 Subject: [PATCH 1/2] #1966: Add path configuration for separate VSCodium plugins folder --- CHANGELOG.adoc | 1 + .../devonfw/tools/ide/tool/vscode/Vscode.java | 34 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 53a168492..e94a3954a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -15,6 +15,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/1849[#1849]: Add VSCodium support * https://github.com/devonfw/IDEasy/issues/1391[#1391]: Fix bashrc messed with terraform completions * https://github.com/devonfw/IDEasy/issues/1922[#1922]: Add Task CLI to IDEasy commandlets +* https://github.com/devonfw/IDEasy/issues/1966[#1966]: Support separate VSCodium plugins The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/45?closed=1[milestone 2026.06.001]. diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java b/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java index fff2ad923..992c2f40e 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java @@ -1,5 +1,6 @@ package com.devonfw.tools.ide.tool.vscode; +import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; @@ -14,7 +15,6 @@ import com.devonfw.tools.ide.io.IdeProgressBar; import com.devonfw.tools.ide.log.IdeLogLevel; import com.devonfw.tools.ide.process.ProcessContext; -import com.devonfw.tools.ide.process.ProcessErrorHandling; import com.devonfw.tools.ide.process.ProcessMode; import com.devonfw.tools.ide.process.ProcessResult; import com.devonfw.tools.ide.step.Step; @@ -55,13 +55,20 @@ protected String getBinaryName() { } @Override - protected void installPlugins(Collection plugins, ProcessContext pc) { - boolean isVscodium = EDITION_VSCODIUM.equals(getConfiguredEdition()); - if (isVscodium) { - this.vscodiumUnavailablePlugins.clear(); - pc.errorHandling(ProcessErrorHandling.NONE); + protected Path getPluginsConfigPath() { + + if (EDITION_VSCODIUM.equals(getConfiguredEdition())) { + Path vscodiumPluginsPath = this.context.getSettingsPath().resolve(EDITION_VSCODIUM).resolve(IdeContext.FOLDER_PLUGINS); + if (Files.isDirectory(vscodiumPluginsPath)) { + return vscodiumPluginsPath; + } } - IdeLogLevel suppressLevel = isVscodium ? IdeLogLevel.WARNING : IdeLogLevel.STEP; + return super.getPluginsConfigPath(); + } + + @Override + protected void installPlugins(Collection plugins, ProcessContext pc) { + this.context.runWithoutLogging(() -> { IdeProgressBar pb = this.context.newProgressBarForPlugins(plugins.size()); pc.setOutputListener((msg, err) -> { @@ -71,17 +78,8 @@ protected void installPlugins(Collection plugins, ProcessC }); super.installPlugins(plugins, pc); pb.close(); - }, suppressLevel); - if (isVscodium && !this.vscodiumUnavailablePlugins.isEmpty()) { - IdeLogLevel.WARNING.log(LOG, - "{} plugin(s) could not be installed on VSCodium due to not being available on open-vsx or other errors:\n - {}\n" - + "For full plugin support, set VSCODE_EDITION=vscode to use Microsoft's distribution.\n" - + "For more detailed information on why plugins failed to install, check the IDEasy logfile at {}.", - this.vscodiumUnavailablePlugins.size(), - String.join("\n - ", this.vscodiumUnavailablePlugins), - this.context.getIdeRoot().resolve(IdeContext.FOLDER_DOT_IDE).resolve(IdeContext.FOLDER_LOGS)); - } - } + }); +} @Override public boolean installPlugin(ToolPluginDescriptor plugin, Step step, ProcessContext pc) { From af6b3c17ad5c90afe70ceb5c9b06e3f039c7f624 Mon Sep 17 00:00:00 2001 From: Laert Llaveshi Date: Fri, 12 Jun 2026 09:14:15 +0200 Subject: [PATCH 2/2] #1966: Add tests and simplify VSCodium plugin handling --- .../devonfw/tools/ide/tool/vscode/Vscode.java | 20 ++++-------- .../tools/ide/tool/vscode/VscodeTest.java | 31 +++++++++++++++++++ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java b/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java index 992c2f40e..7beef9d2d 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java @@ -32,9 +32,6 @@ public class Vscode extends IdeToolCommandlet { /** The {@link #getConfiguredEdition() edition} for VSCodium. */ private static final String EDITION_VSCODIUM = "vscodium"; - /** Plugin IDs collected during {@link #installPlugins} that VSCodium was unable to install. */ - private final List vscodiumUnavailablePlugins = new ArrayList<>(); - /** * The constructor. * @@ -78,8 +75,8 @@ protected void installPlugins(Collection plugins, ProcessC }); super.installPlugins(plugins, pc); pb.close(); - }); -} + }); + } @Override public boolean installPlugin(ToolPluginDescriptor plugin, Step step, ProcessContext pc) { @@ -104,17 +101,12 @@ public boolean installPlugin(ToolPluginDescriptor plugin, Step step, ProcessCont step.success(); return true; } - if (EDITION_VSCODIUM.equals(getConfiguredEdition())) { - this.vscodiumUnavailablePlugins.add(plugin.id()); - return false; + if (versionSpecified) { + IdeLogLevel.ERROR.log(LOG, "Failed to install plugin: {} with version: {}", plugin.name(), plugin.version()); } else { - if (versionSpecified) { - IdeLogLevel.ERROR.log(LOG, "Failed to install plugin: {} with version: {}", plugin.name(), plugin.version()); - } else { - IdeLogLevel.ERROR.log(LOG, "Failed to install plugin: {}", plugin.name()); - } - return false; + IdeLogLevel.ERROR.log(LOG, "Failed to install plugin: {}", plugin.name()); } + return false; } @Override diff --git a/cli/src/test/java/com/devonfw/tools/ide/tool/vscode/VscodeTest.java b/cli/src/test/java/com/devonfw/tools/ide/tool/vscode/VscodeTest.java index b173869d7..ea29594f7 100644 --- a/cli/src/test/java/com/devonfw/tools/ide/tool/vscode/VscodeTest.java +++ b/cli/src/test/java/com/devonfw/tools/ide/tool/vscode/VscodeTest.java @@ -1,5 +1,6 @@ package com.devonfw.tools.ide.tool.vscode; +import java.nio.file.Path; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -175,6 +176,36 @@ void testVscodiumRun() { checkVscodiumInstallation(context); } + /** + * Tests that VSCodium reads its plugins from the dedicated vscodium folder when it exists. + */ + @Test + void testVscodiumUsesVscodiumPluginsFolder() { + + // arrange + IdeTestContext context = newContext(PROJECT_VSCODIUM); + Vscode vscodium = new Vscode(context); + Path vscodiumPlugins = context.getSettingsPath().resolve("vscodium/plugins"); + context.getFileAccess().mkdirs(vscodiumPlugins); + + // act + assert + assertThat(vscodium.getPluginsConfigPath()).isEqualTo(vscodiumPlugins); + } + + /** + * Tests that VSCodium falls back to the vscode folder when it has no dedicated plugins folder. + */ + @Test + void testVscodiumFallsBackToVscodePluginsFolder() { + + // arrange + IdeTestContext context = newContext(PROJECT_VSCODIUM); + Vscode vscodium = new Vscode(context); + + // act + assert + assertThat(vscodium.getPluginsConfigPath()).isEqualTo(context.getSettingsPath().resolve("vscode/plugins")); + } + /** * Test double for {@link Vscode} that captures CLI arguments passed to {@link #runTool(ProcessContext, ProcessMode, List)}