Skip to content

#2401: Rework Mainwindow - #2437

Open
samuelkos17 wants to merge 22 commits into
devonfw:mainfrom
samuelkos17:feature/2401-rework-mainwindow
Open

samuelkos17 wants to merge 22 commits into
devonfw:mainfrom
samuelkos17:feature/2401-rework-mainwindow

Conversation

@samuelkos17

@samuelkos17 samuelkos17 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2401 #2402 #2433

Implemented changes:

This is quite a huge PR that completely reworked our GUI architecture, the most important changes:

  • Reworked the GUI from "MVC" to MVVM
  • Split the MainController into single modules (NavigationPanel, IdeLauncherTab)
  • Introduced Tabs
  • Introduced an EventBus
  • Removed any logic from the .fxml files
  • Introduced Services & Factories
  • Refactored the folder structure of the GUI
    • Regarding the terminology of the new folder structure:
      • Factory: Creates ViewModels & Views while containing the necessary services to do so. Initialized in App
      • Service: Encapsulates business logic and access to data or functionality independently of the UI. Initialized in App
      • Control: A self-contained UI component of the MainWindow. Extracted frm MainWindowView to improve maintainability and seperation of concerns, where introducing a dedicated View/ViewModel split would not be worthwile.
      • View: The actual UI representation without business logic. Its responsibility is to display data nd information from the ViewModel through bindings.
      • ViewModel: Acts as a bridge between the View and the Services/Factory/Data layer. It maintains the current state and contains the UI-related logic.

The Refactoring-Work isn't done with this PR though, every functionality we had before (besides the language selection) is also present in the new GUI, but the GUI architecture is still not clean enough and there are a few hacks/smells in the code that still need to be reworked. In order to not bloat this PR even further the next tasks are listed here:


Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. Run ide gui using the local dev build and test if everything works.

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 and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries 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 labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • 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 Sep 9, 2026
@samuelkos17 samuelkos17 moved this from 🆕 New to Team Review in IDEasy board Sep 9, 2026
@samuelkos17 samuelkos17 added enhancement New feature or request GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx labels Sep 9, 2026
@samuelkos17 samuelkos17 changed the title Feature/2401 rework mainwindow Feature/2401: rework mainwindow Sep 9, 2026
@samuelkos17 samuelkos17 changed the title Feature/2401: rework mainwindow #2401: Rework Mainwindow Sep 9, 2026
@coveralls

coveralls commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 35607989391

Warning

No base build found for commit 4fee91a on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 74.412%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 19244
Covered Lines: 14967
Line Coverage: 77.77%
Relevant Branches: 8546
Covered Branches: 5712
Branch Coverage: 66.84%
Branches in Coverage %: Yes
Coverage Strength: 3.33 hits per line

💛 - Coveralls

@laim2003
laim2003 self-requested a review September 9, 2026 12:12
@laim2003 laim2003 self-assigned this Sep 9, 2026
@JoelAdbu JoelAdbu self-assigned this Sep 9, 2026

@laim2003 laim2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the deep rework! It looks way better already. The architecture is now much cleaner and allows for other features to be built on top. Regarding the TabFactory/general Tab architecture I had some optimization ideas that we should think about. But anyways good work!

Comment thread gui/src/main/java/com/devonfw/ide/gui/factory/TabFactory.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/factory/TabFactory.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/core/factory/TabFactory.java
Comment thread gui/src/main/java/com/devonfw/ide/gui/ui/mainwindow/MainWindowView.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/ui/tab/launcher/IdeLauncherViewModel.java Outdated
Comment thread gui/src/test/java/com/devonfw/ide/gui/ui/mainwindow/MainWindowViewModelTest.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/factory/TabFactory.java Outdated
@JoelAdbu
JoelAdbu self-requested a review September 10, 2026 13:10
Comment thread gui/src/main/java/com/devonfw/ide/gui/ui/mainwindow/MainWindowView.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/service/CommandletService.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/App.java
Comment thread gui/src/main/java/com/devonfw/ide/gui/ui/tab/TabView.java Outdated
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch from 36f3911 to 61208de Compare September 11, 2026 07:45
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch from 61208de to 118e69e Compare September 11, 2026 07:47
@hohwille hohwille self-assigned this Sep 11, 2026
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch from 4877144 to d4ff27a Compare September 15, 2026 09:32
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch from 1201487 to e22ce9a Compare September 15, 2026 10:49
@samuelkos17 samuelkos17 moved this from Team Review to 👀 In review in IDEasy board Sep 15, 2026

@laim2003 laim2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work👍 Just changed this to approve so the merge is not blocked

@laim2003 laim2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

Comment thread gui/src/test/java/com/devonfw/ide/gui/ui/mainwindow/MainWindowViewModelTest.java Outdated

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelkos17 thanks for your PR.
I very much like your work and can already see that we achieve the lose-coupling and more modular and maintainable code this way. Great work 👍
I focused on two things that we should rather get aligned also now and not when tons of screens (aka dialogs) have been implemented (and need to be refactored):

  • packaging layout
  • dependency management to access technical components (required almost everywhere like e.g. NlsService alongside with our famous IdeContext. Just think to add another such dependency in the future. You will have to add it to many constructors everywhere causing quite some refactoring that we maybe can avoid.

Comment thread gui/src/main/java/com/devonfw/ide/gui/core/factory/TabFactory.java
Comment thread gui/src/main/java/com/devonfw/ide/gui/ui/modal/IdeDialog.java Outdated
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch 2 times, most recently from 6b37763 to ea71607 Compare September 21, 2026 13:24
@samuelkos17
samuelkos17 force-pushed the feature/2401-rework-mainwindow branch from ea71607 to bbab107 Compare September 21, 2026 13:31
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

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Rework MainWindow

5 participants