Skip to content

#2040: Fix workspace ComboBox reset on project switch#2095

Open
KarimALotfy wants to merge 1 commit into
devonfw:mainfrom
KarimALotfy:feature/2040-workspace-selection-buggy
Open

#2040: Fix workspace ComboBox reset on project switch#2095
KarimALotfy wants to merge 1 commit into
devonfw:mainfrom
KarimALotfy:feature/2040-workspace-selection-buggy

Conversation

@KarimALotfy

Copy link
Copy Markdown
Contributor

This PR fixes #2040

Implemented changes:

  • Workspace onAction was re-registered inside setWorkspaceComboBox()
    on every project selection. Clearing the items mid-setup fired the old
    handler with a stale/null workspace, causing a FileNotFoundException
    error dialog or a NullPointerException that aborted addAll().
  • Handler is now registered once in initialize() via this::onWorkspaceSelected.

Testing instructions

  • Open GUI by running AppLauncher
  • Select a project → workspace dropdown populates, prompt text shown
  • Switch to a different project → workspace resets to prompt text, buttons re-disabled
  • Select a workspace in new project → no error dialog, correct context

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"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 30, 2026
@KarimALotfy KarimALotfy self-assigned this Jun 30, 2026
@KarimALotfy KarimALotfy moved this from 🆕 New to Team Review in IDEasy board Jun 30, 2026
@KarimALotfy KarimALotfy added GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx bugfix PR that fixes a bug issue labels Jun 30, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28436052186

Coverage increased (+0.01%) to 71.372%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 21 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

21 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/ide/gui/MainController.java 20 65.63%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%

Coverage Stats

Coverage Status
Relevant Lines: 16283
Covered Lines: 12119
Line Coverage: 74.43%
Relevant Branches: 7288
Covered Branches: 4704
Branch Coverage: 64.54%
Branches in Coverage %: Yes
Coverage Strength: 3.15 hits per line

💛 - Coveralls

@hohwille hohwille moved this from Team Review to 👀 In review in IDEasy board Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Workspace selection buggy

3 participants