#2045: Add tool slection and version or edition configuration via gui#2080
Open
KarimALotfy wants to merge 63 commits into
Open
Conversation
- Added testing class for modals
- Added logging to IdeGuiStateManager. - Added functionality, that selecting a different project now switches the IdeContext to the new project.
- Added testing class for modals
- Added logging to IdeGuiStateManager. - Added functionality, that selecting a different project now switches the IdeContext to the new project.
…t-for-gui' into devonfw#1785-implement-modals-in-idecontext
- Added functionality, that selecting a different project now switches the IdeContext to the new project.
…plementation' into devonfw#1802-state-management-implementation
…r other ui feature branches
- 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.
This reverts commit 6f92d93.
…plementation' into devonfw#1802-state-management-implementation
…tateManager is now set when calling getInstance(), allowing us to provide a getInstance() method with a DI parameter
… getInstance()) (see previous commit)
…can be extended by tests
…plementation' into devonfw#1802-state-management-implementation
- Add interactive i18n support: app can switch locales (English/Deutsch) via combo box - I18nService manages locale state with listener notifications for UI text updates - MainController registers locale change listener to refresh all UI labels and prompts on language switch Testing: - I18nServiceTest: verify service behavior - AppBaseTest: new interactive UI test
…/1936-improve-localization-of-gui"
Collaborator
Coverage Report for CI Build 28243045956Coverage decreased (-0.05%) to 71.309%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions48 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.propertiesin 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 theCommandletManagerand 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 singletoolsTree.refresh()when done. The edition combo is hidden for tools with ≤1 edition. If exactly one editionexists 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.Saving —
applyAndSavewrites the enabled-tools list and per-tool_VERSION/_EDITIONvariables into the settings environment-variables layer and callssave(). A.bakcopy of the existingide.propertiesis created before any write. Blank version strings are normalised tonull(removes the variable). The_EDITIONvariable is only written/cleared fortools where
supportsEdition=true.Preview — opens a read-only
TextAreashowing the exactide.propertiescontent 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-insensitivematch, null enabled-tools list
loadEditionsForTool— happy path, unknown tool, repository exceptionreloadVersionsForSelectedEdition— happy path, null/blank edition,unknown tool, repository exception
buildPreviewSettingsContent— version/edition present, omitted whennull/blank, edition suppressed when
supportsEdition=false, multipletools, no enabled tools
applyAndSave— version and edition written, disabled tool clearsexisting 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
ToolSettingsServiceTest— all 32 tests greenOpening the dialog
Enabling / disabling tools
Edition combo
populated after the background scan
Version combo
the popup reopens automatically with the version list
Version validation
red border and ✗ icon appear; Save and Preview are disabled
*) — error clears, buttons re-enablePreview
ide.propertiescontent matching current stateSave and file output
<project>/settings/ide.propertiesand verify:IDE_TOOLSlists only enabled tools, names lowercased_VERSIONlines present for enabled tools with a version set_EDITIONlines present only for tools withsupportsEdition=trueide.properties.bakwas created alongside the fileEdge cases
version field — existing
_VERSIONline must be removedide.propertiesunchangedChecklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal