Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6d8e1fe
#1688: Remove unnecessary log messages
jakozian Apr 28, 2026
a1f92f1
#1688: Add to CHANGELOG
jakozian Apr 28, 2026
3968af7
#1688: Override installation path getter to look in windows registry
jakozian Apr 28, 2026
6a1c228
#1688: Fix installation flow and thus mention exception
jakozian Apr 28, 2026
3c5b463
#861: Add to CHANGELOG
jakozian Apr 28, 2026
faa6b1b
#1869: Extract process of running reg into private method
jakozian Apr 28, 2026
53fff3f
#1869: Extend WindowsHelper interface with methods to retrieve entrie…
jakozian Apr 29, 2026
d123088
#1869: Add interface methods to WindowsHelperImpl
jakozian Apr 29, 2026
7c8f432
#1869: Add interface methods to WindowsHelperMock
jakozian Apr 29, 2026
9693b95
#1869: Add test-seam class to simulate running of reg.exe command
jakozian Apr 29, 2026
ccb14d3
#1869: Add tests for WindowsHelperImpl
jakozian Apr 29, 2026
8b4d51d
Update cli/src/main/java/com/devonfw/tools/ide/os/WindowsHelperImpl.java
jakozian May 4, 2026
a02ba1d
Merge branch 'main' into fix/#1688-remove-unnecessary-cli-message-ins…
hohwille May 4, 2026
e1e9ff9
Merge branch 'main' into fix/#1688-remove-unnecessary-cli-message-ins…
jakozian May 5, 2026
d391660
Merge branch 'main' into fix/#861-exception-when-pgadmin-install-wiza…
jakozian May 5, 2026
a35910b
#1869: Replace string with constant
jakozian May 5, 2026
68e09fc
Merge branch 'main' of https://github.com/devonfw/IDEasy into feature…
jakozian May 5, 2026
884919d
Merge branch 'fix/#1688-remove-unnecessary-cli-message-install-tool' …
jakozian May 6, 2026
ce48e7e
Merge branch 'fix/#861-exception-when-pgadmin-install-wizard-starts' …
jakozian May 6, 2026
6ed1306
#1869: Change display name to display version
jakozian May 6, 2026
2e2223a
Merge branch 'feature/#1869-improve-windows-helper-to-search-windows-…
jakozian May 6, 2026
2d40318
#1869: Change search to find exact path first and the keys in this path
jakozian May 6, 2026
8e37b3f
Merge branch 'feature/#1869-improve-windows-helper-to-search-windows-…
jakozian May 6, 2026
16446ab
#1870: Add method for windows app name to super class of global tools
jakozian May 6, 2026
0e9a9d9
#1870: Add logic to get version for global tools under windows
jakozian May 6, 2026
e05473a
#1870: Fix mock logic of runReg
jakozian May 6, 2026
fc7a0c0
Merge branch 'feature/#1869-improve-windows-helper-to-search-windows-…
jakozian May 6, 2026
72b94b5
#1870: Add check for Windows OS
jakozian May 7, 2026
655e764
#1870: Remove TODO
jakozian May 7, 2026
e96d569
#1870: Add to CHANGELOG
jakozian May 7, 2026
e08127e
#1870: Add to CHANGELOG
jakozian May 7, 2026
560adac
Merge branch 'main' into feature/#1870-generic-get-version-implementa…
hohwille May 11, 2026
42187ee
Merge branch 'main' into feature/#1870-generic-get-version-implementa…
hohwille Jun 22, 2026
c7c942a
Apply suggestion from @hohwille
hohwille Jun 22, 2026
9f16cad
Merge remote-tracking branch 'origin/main' into feature/#1870-generic…
maybeec Jul 4, 2026
8a3edd1
Merge remote-tracking branch 'upstream/main' into feature/#1870-gener…
maybeec Jul 4, 2026
50279e3
Merge branch 'main' into feature/#1870-generic-get-version-implementa…
vivu001 Jul 31, 2026
71b4e07
#1870: adapt global tool version lookup to use Windows registry insta…
vivu001 Jul 31, 2026
4c15771
Merge branch 'main' into feature/#1870-generic-get-version-implementa…
vivu001 Aug 3, 2026
8648c3b
#1870: add tests for Windows registry app name and installed version …
vivu001 Aug 3, 2026
6f2ee5b
#1870: updated CHANGELOG
vivu001 Aug 3, 2026
e6d08b3
Merge branch 'main' into feature/#1870-generic-get-version-implementa…
vivu001 Aug 4, 2026
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/1870[#1870]: Add generic get-version implementation for global tools under windows
* https://github.com/devonfw/IDEasy/issues/2187[#2187]: Start SoapUI commandlet in background
* https://github.com/devonfw/IDEasy/issues/2189[#2189]: Integrate Ruff
* https://github.com/devonfw/IDEasy/issues/2126[#2126]: Fix language selection dropdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.io.FileAccess;
import com.devonfw.tools.ide.log.IdeLogLevel;
import com.devonfw.tools.ide.os.WindowsAppInstallation;
import com.devonfw.tools.ide.os.WindowsHelper;
import com.devonfw.tools.ide.process.ProcessContext;
import com.devonfw.tools.ide.process.ProcessErrorHandling;
import com.devonfw.tools.ide.process.ProcessMode;
Expand Down Expand Up @@ -187,9 +189,23 @@ protected List<PackageManagerCommand> getInstallPackageManagerCommands() {
return List.of();
}

/**
* @return the app name to look for in the Windows registry
*/
public String getWindowsRegistryAppName() {

return this.tool;
}

@Override
public VersionIdentifier getInstalledVersion() {
//TODO: handle "get-version <globaltool>"

if (this.context.getSystemInfo().isWindows()) {
WindowsAppInstallation installation = WindowsHelper.get(this.context).getAppInstallationFromRegistry(getWindowsRegistryAppName());
if (installation != null) {
return VersionIdentifier.of(installation.version());
}
}
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,9 @@ public String getToolHelpArguments() {

return "help";
}

@Override
public String getWindowsRegistryAppName() {
return "Docker Desktop";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,9 @@ private Path getExecutableFolderFromWindowsRegistry() {
}
return null;
}

@Override
public String getWindowsRegistryAppName() {
return "pgAdmin 4v9_is1";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.context.IdeTestContext;
import com.devonfw.tools.ide.os.SystemInfoMock;
import com.devonfw.tools.ide.os.WindowsAppInstallation;
import com.devonfw.tools.ide.os.WindowsHelperMock;
import com.devonfw.tools.ide.process.ProcessResult;
import com.devonfw.tools.ide.version.VersionIdentifier;
import com.devonfw.tools.ide.tool.ToolEdition;
import com.devonfw.tools.ide.tool.ToolEditionAndVersion;

/**
* Test of {@link GlobalToolCommandlet}.
Expand All @@ -25,8 +25,8 @@ class GlobalToolCommandletTest extends AbstractIdeContextTest {
private static final String TOOL_VERSION = "1.21.0";

/**
* Dummy {@link GlobalToolCommandlet} that simulates a background GUI installer (e.g. Rancher Desktop on Windows).
* Only {@code doInstall} is overridden so the warning-check inside the real {@code install()} is exercised.
* Dummy {@link GlobalToolCommandlet} that simulates a background GUI installer (e.g. Rancher Desktop on Windows). Only {@code doInstall} is overridden so the
* warning-check inside the real {@code install()} is exercised.
*/
static class AsyncInstallerToolCommandlet extends GlobalToolCommandlet {

Expand Down Expand Up @@ -97,4 +97,50 @@ void testInstallDirectlyAlsoLogsWarningWhenInstallationIsAsynchronous() {
assertThat(context).logAtWarning()
.hasMessageContaining("rerun your 'ide' command in a new terminal session after the installation has completed.");
}

/**
* Tests that the default Windows registry app name is the tool name.
*/
@Test
void testGetWindowsRegistryAppName() {

// arrange
IdeTestContext context = newContext(PROJECT_BASIC);
AsyncInstallerToolCommandlet commandlet = new AsyncInstallerToolCommandlet(context);

// act + assert
assertThat(commandlet.getWindowsRegistryAppName()).isEqualTo(TOOL_NAME);
}

/**
* Tests that {@link GlobalToolCommandlet#getInstalledVersion()} reads the version from the Windows registry.
*/
@Test
void testGetInstalledVersionReadsVersionFromWindowsRegistry() {

// arrange
IdeTestContext context = newContext(PROJECT_BASIC);
context.setSystemInfo(SystemInfoMock.WINDOWS_X64);
WindowsHelperMock helper = (WindowsHelperMock) context.getWindowsHelper();
helper.setAppInstallationFromRegistry(TOOL_NAME, new WindowsAppInstallation("2.3.4", null, null, null));
AsyncInstallerToolCommandlet commandlet = new AsyncInstallerToolCommandlet(context);

// act + assert
assertThat(commandlet.getInstalledVersion()).isEqualTo(VersionIdentifier.of("2.3.4"));
}

/**
* Tests that {@link GlobalToolCommandlet#getInstalledVersion()} returns {@code null} when no registry entry exists.
*/
@Test
void testGetInstalledVersionReturnsNullWhenRegistryEntryIsMissing() {

// arrange
IdeTestContext context = newContext(PROJECT_BASIC);
context.setSystemInfo(SystemInfoMock.WINDOWS_X64);
AsyncInstallerToolCommandlet commandlet = new AsyncInstallerToolCommandlet(context);

// act + assert
assertThat(commandlet.getInstalledVersion()).isNull();
}
}
Loading