Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE

Release with new features and bugfixes:

* https://github.com/devonfw/IDEasy/issues/2056[#2056]: Replaced progress bar with general progress information for installing plugins in VSCode
* https://github.com/devonfw/IDEasy/issues/2068[#2068]: Isolate Claude Code configuration per IDEasy project
* https://github.com/devonfw/IDEasy/issues/451[#451]: Fix macOS Gatekeeper blocking the IDEasy binary
* https://github.com/devonfw/IDEasy/issues/1937[#1937]: Link content from settings into workspaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ protected void postInstall(ToolInstallRequest request) {

/**
* Deletes all installed plugins for this {@link IdeToolCommandlet} by deleting the plugins installation folder and all plugin marker files.
*
* @param pluginsInstallationPath the {@link Path} to the plugins installation folder.
*/
private void deleteAllPlugins(Path pluginsInstallationPath) {
Expand All @@ -155,6 +156,8 @@ private void installPlugins(ProcessContext pc) {
* @param pc the {@link ProcessContext} to use.
*/
protected void installPlugins(Collection<ToolPluginDescriptor> plugins, ProcessContext pc) {
long currentPluginIndex = 1;
long totalActivePlugins = plugins.stream().filter(ToolPluginDescriptor::active).count();
for (ToolPluginDescriptor plugin : plugins) {
Path pluginMarkerFile = retrievePluginMarkerFilePath(plugin);
boolean pluginMarkerFileExists = pluginMarkerFile != null && Files.exists(pluginMarkerFile);
Expand All @@ -163,11 +166,13 @@ protected void installPlugins(Collection<ToolPluginDescriptor> plugins, ProcessC
}
if (plugin.active()) {
if (this.context.isForcePlugins() || !pluginMarkerFileExists) {
Step step = this.context.newStep("Install plugin " + plugin.name());
String progressMarker = " (" + currentPluginIndex + "/" + totalActivePlugins + ")";
Step step = this.context.newStep("Install plugin " + plugin.name() + progressMarker);
step.run(() -> doInstallPluginStep(plugin, step, pc));
} else {
LOG.debug("Skipping installation of plugin '{}' due to existing marker file: {}", plugin.name(), pluginMarkerFile);
}
currentPluginIndex++;
} else {
if (!pluginMarkerFileExists) {
handleInstallForInactivePlugin(plugin);
Expand Down
17 changes: 0 additions & 17 deletions cli/src/main/java/com/devonfw/tools/ide/tool/vscode/Vscode.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;

Expand All @@ -12,7 +11,6 @@

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
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.ProcessMode;
Expand Down Expand Up @@ -63,21 +61,6 @@ protected Path getPluginsConfigPath() {
return super.getPluginsConfigPath();
}

@Override
protected void installPlugins(Collection<ToolPluginDescriptor> plugins, ProcessContext pc) {

this.context.runWithoutLogging(() -> {
IdeProgressBar pb = this.context.newProgressBarForPlugins(plugins.size());
pc.setOutputListener((msg, err) -> {
if (msg.contains("Installing extension ")) {
pb.stepBy(1);
}
});
super.installPlugins(plugins, pc);
pb.close();
});
}

@Override
public boolean installPlugin(ToolPluginDescriptor plugin, Step step, ProcessContext pc) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void checkInstallation(IdeTestContext context) {
// commandlet - android-studio
AndroidStudio commandlet = context.getCommandletManager().getCommandlet(AndroidStudio.class);
assertThat(commandlet.getInstalledVersion().toString()).isEqualTo("2024.1.1.1");
assertThat(context).log().hasEntries(new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully ended step 'Install plugin MockedPlugin'.", true), //
assertThat(context).log().hasEntries(new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully ended step 'Install plugin MockedPlugin (1/1)'.", true), //
new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully installed android-studio in version 2024.1.1.1", true));
assertThat(context.getPluginsPath().resolve("android-studio").resolve("mockedPlugin").resolve("dev").resolve("MockedClass.class")).exists();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void testEclipse(String os) throws IOException {
assertThat(context).log().hasEntries(
new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully installed java in version 17.0.10_7", true),
new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully installed eclipse in version 2024-09", true));
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin anyedit'.");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin anyedit (1/1)'.");
assertThat(context.getPluginsPath().resolve("eclipse")).isDirectory();
assertThat(eclipse.getToolBinPath().resolve("eclipsetest")).hasContent(
"eclipse " + os + " -data " + context.getWorkspacePath() + " -keyring " + context.getUserHome().resolve(".eclipse").resolve(".keyring")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void testAdjustRequestedEditionSwitchesForUltimateWithoutConfiguredVersion() {

/**
* Tests whether IDEasy correctly switches editions when the specified version is after 2025.2.6.1
*/
*/
@Test
void testAdjustRequestedEditionSwitchesForUltimateWithVersionAboveCutoff() {

Expand Down Expand Up @@ -254,7 +254,7 @@ void testAdjustRequestedEditionDoesNotSwitchForUltimateAtCutoffVersion() {
// assert
assertThat(adjusted.getEdition().edition()).isEqualTo("ultimate");
}

/**
* Tests if the custom jvm options of the ide variable INTELLI_VM_ARGS have been set.
*/
Expand Down Expand Up @@ -290,7 +290,7 @@ private void checkInstallation(IdeTestContext context) {
new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully installed java in version 17.0.10_7", true),
new IdeLogEntry(IdeLogLevel.SUCCESS, "Successfully installed intellij in version 2023.3.3", true));
assertThat(context).logAtDebug().hasMessage("Omitting installation of inactive plugin InactivePlugin (inactivePlugin).");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin ActivePlugin'.");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin ActivePlugin (1/1)'.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void testInstallPluginsWithForce() {
new ProcessContextTestImpl(context));

//assert - Check if we skip the markerfile-check because we force the plugins to install
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin anyedit'.");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin anyedit (1/1)'.");
assertThat(context).log().hasNoMessageContaining("Skipping installation of plugin '{}' due to existing marker file: ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private void checkInstallation(IdeTestContext context) {
assertThat(commandlet.getInstalledVersion().toString()).isEqualTo("2024.3.5");
assertThat(context).logAtSuccess().hasMessageContaining("Successfully installed pycharm in version 2024.3.5");
assertThat(context).logAtDebug().hasMessage("Omitting installation of inactive plugin InactivePlugin (inactivePlugin).");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin ActivePlugin'.");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin ActivePlugin (1/1)'.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void testCheckPluginInstallation() {
commandlet.run();

assertThat(context).logAtSuccess().hasMessage("Successfully installed plugin: mockedPlugin");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin mockedPlugin (1/1)'.");

// assert
assertThat(commandlet.retrievePluginMarkerFilePath(commandlet.getPlugin("mockedPlugin"))).exists();
Expand Down Expand Up @@ -118,6 +119,7 @@ private void checkInstallation(IdeTestContext context) {

assertThat(context.getSoftwarePath().resolve("vscode/.ide.software.version")).exists().hasContent("1.92.1");
assertThat(context).logAtSuccess().hasMessageContaining("Successfully installed vscode in version 1.92.1");
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin mockedPlugin (1/1)'.");
}

@Test
Expand Down Expand Up @@ -208,8 +210,8 @@ void testVscodiumFallsBackToVscodePluginsFolder() {


/**
* Test double for {@link Vscode} that captures CLI arguments passed to {@link #runTool(ProcessContext, ProcessMode, List)}
* so tests can assert command construction without spawning an external process.
* Test double for {@link Vscode} that captures CLI arguments passed to {@link #runTool(ProcessContext, ProcessMode, List)} so tests can assert command
* construction without spawning an external process.
*/
private static class CapturingVscode extends Vscode {

Expand Down
Loading