Skip to content

#2045: Add tool slection and version or edition configuration via gui#2080

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

#2045: Add tool slection and version or edition configuration via gui#2080
KarimALotfy wants to merge 63 commits into
devonfw:mainfrom
KarimALotfy:feature/2045-add-tool-slection-and-version-or-edition-configuration-via-gui

Conversation

@KarimALotfy

@KarimALotfy KarimALotfy commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2045

Implemented changes:

A Tools Configuration dialog 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 dialog — clicking Tools Config in the main screen triggers a background load of listToolConfigurations, which walks the CommandletManager and reads each tool's current version and edition from the environment variables. A spinner replaces the button text during this. Only once the list is ready does the dialog open, so the tree is never shown in a half-loaded state.

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 dialog 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(). A .bak copy of the existing ide.properties is created before any write. 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 32 tests green

Opening the dialog

  • Select a project and workspace on the main screen
  • Click Tools Config — button shows a spinner and becomes disabled
  • Dialog 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
  • Open the dialog, make no changes, click Cancel — ide.properties unchanged

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"

laim2003 added 30 commits March 27, 2026 17:52
- Added logging to IdeGuiStateManager.
- Added functionality, that selecting a different project now switches the IdeContext to the new project.
- Added logging to IdeGuiStateManager.
- Added functionality, that selecting a different project now switches the IdeContext to the new project.
- Added functionality, that selecting a different project now switches the IdeContext to the new project.
- added DI for IdeGuiStateManager.switchContext
…reading the list of workspaces/projects instead of reading those from the UI
…nager, when switchContext(Path rootDirectory, ...) is called.
…tateManager is now set when calling getInstance(), allowing us to provide a getInstance() method with a DI parameter
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28243045956

Coverage decreased (-0.05%) to 71.309%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

48 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/ide/gui/MainController.java 36 73.17%
com/devonfw/ide/gui/App.java 12 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 16782
Covered Lines: 12479
Line Coverage: 74.36%
Relevant Branches: 7466
Covered Branches: 4812
Branch Coverage: 64.45%
Branches in Coverage %: Yes
Coverage Strength: 3.15 hits per line

💛 - Coveralls

@KarimALotfy KarimALotfy 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 Jun 28, 2026
@KarimALotfy KarimALotfy self-assigned this Jun 29, 2026
@KarimALotfy KarimALotfy moved this from 🆕 New to 🏗 In progress in IDEasy board Jun 29, 2026
@KarimALotfy KarimALotfy added 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 uninstall uninstall tools or IDEasy itself settings ide-settings repo and replated processes and features software 3rd party software (tools) labels Jun 29, 2026
@KarimALotfy KarimALotfy moved this from 🏗 In progress to Team Review in IDEasy board Jun 29, 2026
@KarimALotfy KarimALotfy moved this from Team Review to 🏗 In progress in IDEasy board Jul 1, 2026
@KarimALotfy KarimALotfy moved this from 🏗 In progress to Team Review in IDEasy board Jul 1, 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

3 participants