Skip to content

2045: Add tool selection and version or edition configuration via gui - #2331

Open
laert-ll wants to merge 10 commits into
devonfw:mainfrom
laert-ll:feature/2045-add-tool-slection-and-version-or-edition-configuration-via-gui
Open

2045: Add tool selection and version or edition configuration via gui#2331
laert-ll wants to merge 10 commits into
devonfw:mainfrom
laert-ll:feature/2045-add-tool-slection-and-version-or-edition-configuration-via-gui

Conversation

@laert-ll

@laert-ll laert-ll commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2045

Continuation of #2080

Implemented changes:

A Tools Configuration tab that lets users manage which tools are active in their IDEasy workspace and what version/edition each one uses, all persisted to ide.properties in the project settings layer.

How it works

Opening the tab — After selecting a Project and workspace, the "Tool Config" tab is enabled, clicking it triggers a background load of listToolConfigurations, which walks the CommandletManager and reads each tool's current version and edition from the environment variables. Then the tab is populated with the list of tools

The tree view — tools are grouped by type (IDE, Global, Local, NPM, PIP, Other) and sorted alphabetically within each group. Each row has an enable checkbox, the tool name, an edition combo (if the tool has more than one configurable edition, and a version combo.

Editions — after the tab opens, a single background thread walks all tools and calls loadEditionsForTool (a repository directory scan) for each, then triggers a single toolsTree.refresh() when done. The edition combo is hidden for tools with ≤1 edition. If exactly one edition
exists and none is configured, it is auto-selected.

Versions — the version combo lazy-loads on first open to avoid fetching all tools' version lists upfront. When the user changes the edition, the version list refreshes automatically in a background thread.

Because JavaFX doesn't repaint an already-open popup after its items change, the combo is hidden and reshown to force the updated list to appear.

Validation — version input is validated on focus-lost. A free-text entry that isn't in the loaded version list gets a red border and a ✗ error icon. Blank input is normalised to * (meaning "latest"). The Save and Preview buttons are disabled until all errors are resolved.

SavingapplyAndSave writes the enabled-tools list and per-tool _VERSION / _EDITION variables into the settings environment-variables layer and calls save(). Blank version strings are normalised to null (removes the variable). The _EDITION variable is only written/cleared for
tools where supportsEdition=true.

Preview — opens a read-only TextArea showing the exact ide.properties content that would result from the current state. Includes a Save button to apply directly from the preview.


Testing instructions

ToolSettingsServiceTest` covers all public methods:

  • toToolConfiguration — name mapping, enabled/disabled, case-insensitive
    match, null enabled-tools list
  • loadEditionsForTool — happy path, unknown tool, repository exception
  • reloadVersionsForSelectedEdition — happy path, null/blank edition,
    unknown tool, repository exception
  • buildPreviewSettingsContent — version/edition present, omitted when
    null/blank, edition suppressed when supportsEdition=false, multiple
    tools, no enabled tools
  • applyAndSave — version and edition written, disabled tool clears
    existing entries, blank version clears existing entry, edition suppressed
    when supportsEdition=false, IDE_TOOLS list updated, backup created,
    no backup when file absent

Test plan

Unit tests

  • Run ToolSettingsServiceTest — all 31 tests green

Opening the dialog

  • Select a project and workspace on the main screen
  • Click Tools Config — - New Tab opens with tools already grouped and visible; no blank flash
  • After ~1–2 s, edition combos populate for tools that support them (e.g. IntelliJ)

Enabling / disabling tools

  • Uncheck a tool — row dims and version/edition combos disable
  • Re-check it — row becomes active again
  • Disabled tools must not appear in the IDE_TOOLS line after saving

Edition combo

  • For a tool with multiple editions (e.g. IntelliJ): combo is visible and
    populated after the background scan
  • For a tool with one edition: combo is hidden; edition is auto-selected
  • For a tool with no editions (e.g. mvn): no edition combo shown
  • Changing the edition triggers a version list refresh in the background

Version combo

  • Click the version dropdown before it has loaded — a short delay, then
    the popup reopens automatically with the version list
  • After an edition change, the version list updates to match

Version validation

  • Type a nonsense string into a version field, then click away —
    red border and ✗ icon appear; Save and Preview are disabled
  • Hover the ✗ icon — tooltip shows the invalid version message
  • Fix the value or clear it (normalises to *) — error clears, buttons re-enable

Preview

  • Click Preview — dialog shows ide.properties content matching current state
  • Verify disabled tools and their variables are absent from the preview
  • Click Save from within the preview — file is written, both dialogs close

Save and file output

  • After saving, open <project>/settings/ide.properties and verify:
    • IDE_TOOLS lists only enabled tools, names lowercased
    • _VERSION lines present for enabled tools with a version set
    • _EDITION lines present only for tools with supportsEdition=true
    • Variables for disabled tools are absent / removed
  • Verify ide.properties.bak was created alongside the file

Edge cases

  • Save with a tool that had a previous version entry but now has a blank
    version field — existing _VERSION line must be removed

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32461521370

Coverage decreased (-0.1%) to 72.837%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 43 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

43 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/ide/gui/MainController.java 42 69.48%
com/devonfw/tools/ide/version/VersionSegment.java 1 91.34%

Coverage Stats

Coverage Status
Relevant Lines: 17994
Covered Lines: 13662
Line Coverage: 75.93%
Relevant Branches: 7931
Covered Branches: 5221
Branch Coverage: 65.83%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@laert-ll laert-ll moved this from 🆕 New to 🏗 In progress in IDEasy board Aug 14, 2026
@laert-ll laert-ll self-assigned this Aug 14, 2026
@laert-ll
laert-ll force-pushed the feature/2045-add-tool-slection-and-version-or-edition-configuration-via-gui branch from 42e54c3 to 4fb1146 Compare August 21, 2026 06:34
@laert-ll
laert-ll marked this pull request as ready for review August 21, 2026 07:24
@laert-ll laert-ll moved this from 🏗 In progress to Team Review in IDEasy board Aug 21, 2026
@laert-ll laert-ll added enhancement New feature or request settings ide-settings repo and replated processes and features software 3rd party software (tools) GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx install installation process of IDE + tools and install commandlet uninstall uninstall tools or IDEasy itself labels Aug 21, 2026
@laert-ll laert-ll changed the title 2045: add tool slection and version or edition configuration via gui 2045: Add tool slection and version or edition configuration via gui Aug 21, 2026
@laert-ll laert-ll changed the title 2045: Add tool slection and version or edition configuration via gui 2045: Add tool selection and version or edition configuration via gui Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx install installation process of IDE + tools and install commandlet settings ide-settings repo and replated processes and features software 3rd party software (tools) uninstall uninstall tools or IDEasy itself

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Add tool selection and version/edition configuration via GUI

2 participants