Skip to content

#2385: Cleanup of IdeLogEntry, IdeLogListener and IdeGuiLogListener - #2639

Open
NikoFoutsitzis wants to merge 40 commits into
devonfw:mainfrom
NikoFoutsitzis:cleanup/2385-IdeLogEntry-and-IdeLogListener-and-IdeGuiLogListener
Open

NikoFoutsitzis wants to merge 40 commits into
devonfw:mainfrom
NikoFoutsitzis:cleanup/2385-IdeLogEntry-and-IdeLogListener-and-IdeGuiLogListener

Conversation

@NikoFoutsitzis

Copy link
Copy Markdown
Contributor

This PR cleanup #2385

Implemented changes:

  • Changed IdeLogListener.onLog(IdeLogLevel, String, String, Object[], Throwable) to IdeLogListener.onLog(IdeLogEntry entry)
  • Changed timestamp in IdeLogEntry from long to Instant
  • IdeGuiLogListener shows each message only once now + added IdeTestGuiLogListener
  • appendOut() in ConsoleController only accepts IdeLogEntry as a parameter now, removed appendOutput(String) and appendOutput(IdeLogLevel, String) in ConsoleController

Testing instructions

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

  1. Run the test IdeTestGuiLogListener.
  2. Test should be succesfull, IdeGuiLogListener should only show each message once

@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Done in IDEasy board Oct 12, 2026
@NikoFoutsitzis

Copy link
Copy Markdown
Contributor Author

ConsolePanelTest: In the testmessage "Hello World!" was missing "!" so the test failed.

@NikoFoutsitzis NikoFoutsitzis moved this from ✅ Done to Team Review in IDEasy board Oct 12, 2026
@coveralls

coveralls commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 39765794280

Coverage decreased (-0.02%) to 74.981%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

20 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/ide/gui/core/service/CommandletService.java 13 25.0%
com/devonfw/tools/ide/log/IdeLogEntry.java 3 90.0%
com/devonfw/tools/ide/version/VersionSegment.java 2 90.29%
com/devonfw/tools/ide/log/IdeLogListenerNone.java 1 50.0%
com/devonfw/tools/ide/os/MacOsHelper.java 1 75.63%

Coverage Stats

Coverage Status
Relevant Lines: 19677
Covered Lines: 15397
Line Coverage: 78.25%
Relevant Branches: 8741
Covered Branches: 5911
Branch Coverage: 67.62%
Branches in Coverage %: Yes
Coverage Strength: 3.36 hits per line

💛 - Coveralls

@NikoFoutsitzis NikoFoutsitzis added enhancement New feature or request good first issue Good for newcomers GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx labels Oct 12, 2026
@laim2003
laim2003 requested a review from quando632 October 13, 2026 08:47

@quando632 quando632 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.

Nice work @NikoFoutsitzis! Passing the whole IdeLogEntry through onLog simplifies every listener, and IdeGuiLogListener now fixes the duplicate output at the root.
The Instant timestamp with a constant formatter and the recording ConsoleController that avoids the JavaFX toolkit in the test are clean touches as well.

Comment thread gui/src/test/java/com/devonfw/ide/gui/core/context/IdeTestGuiLogListener.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/core/service/CommandletService.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/log/IdeLogListener.java Outdated
NikoFoutsitzis and others added 5 commits October 13, 2026 15:34
…ogListener.java

Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…ConsolePanelTest.java

Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…LogListener-and-IdeGuiLogListener' into cleanup/2385-IdeLogEntry-and-IdeLogListener-and-IdeGuiLogListener
…LogListener-and-IdeGuiLogListener' into cleanup/2385-IdeLogEntry-and-IdeLogListener-and-IdeGuiLogListener

@JoelAdbu JoelAdbu 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.

@NikoFoutsitzis thank you for the PR. The cleanup looks good overall, just two minor suggestions. It would also be worth adding a small test for IdeLogEntry covering the constructor edge cases

Comment thread cli/src/main/java/com/devonfw/tools/ide/log/IdeLogEntry.java
NikoFoutsitzis and others added 6 commits October 15, 2026 08:26
…stenerTest.java

Co-authored-by: JoelAdbu <joel.adabunu@capgemini.com>
…LogListener-and-IdeGuiLogListener' into cleanup/2385-IdeLogEntry-and-IdeLogListener-and-IdeGuiLogListener
…Entry-and-IdeLogListener-and-IdeGuiLogListener

@quando632 quando632 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 @NikoFoutsitzis, all the earlier points are in and the merge onto the reworked console was done cleanly.

Comment thread cli/src/main/java/com/devonfw/tools/ide/log/IdeLogEntry.java Outdated
Comment thread gui/src/main/java/com/devonfw/ide/gui/core/service/CommandletService.java Outdated

@quando632 quando632 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 @NikoFoutsitzis, the null check, the duplicate error event and the static context cleanup are all sorted, nice work!
The merge onto the event-bus console is clean apart from one spot where the original entry got lost again.

Comment thread gui/src/main/java/com/devonfw/ide/gui/core/context/IdeGuiLogListener.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/log/IdeLogEntry.java Outdated
@laim2003 laim2003 linked an issue Oct 20, 2026 that may be closed by this pull request
5 tasks
@laim2003 laim2003 moved this from 👀 In review to Team Review in IDEasy board Oct 20, 2026

@quando632 quando632 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 @NikoFoutsitzis, the listener now forwards the original entry, CI is green again and the null-message case is covered, nice work!
Only two small test touch-ups are left.

@quando632 quando632 moved this from Team Review to 👀 In review in IDEasy board Oct 22, 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 good first issue Good for newcomers 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.

Cleanup of IdeLogEntry, IdeLogListener and IdeGuiLogListener

5 participants