Skip to content

#2206: Fix IDEasy title not properly shown on macOS - #2315

Open
Ali-Shariati-Najafabadi wants to merge 7 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2206-fix-macos-gui-dock-title
Open

#2206: Fix IDEasy title not properly shown on macOS#2315
Ali-Shariati-Najafabadi wants to merge 7 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2206-fix-macos-gui-dock-title

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2206

Implemented changes:

  • On macOS, ide gui now launches the JavaFX process through a symlink named IDEasy that points to the real java executable, instead of exec-ing java directly. macOS derives the Dock/menu bar title from the launched executable's filename (this GUI has no native app bundle), so this makes the title read "IDEasy" instead of "java". No-op on Windows/Linux.
  • Note: an earlier approach of setting System.setProperty("apple.awt.application.name", "IDEasy") in App.java was tried and verified (by building and running the GUI locally) to have no effect, since this GUI is pure JavaFX (Glass toolkit) and that property is only read by AWT's toolkit.

Testing instructions

  1. On macOS, run ide gui (or build the gui module and run com.devonfw.ide.gui.AppLauncher via the same exec:exec Maven invocation used by the gui commandlet).
  2. Check the Dock and the menu bar (⌘+Tab app switcher) while the GUI is running: the title now shows "IDEasy" instead of "java".
  3. Unit tests com.devonfw.tools.ide.tool.gui.GuiTest cover the executable resolution: a symlink named IDEasy is created and used on macOS, while Windows/Linux keep using the plain java executable unchanged.

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary».
  • 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 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 Aug 11, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi added macOS specific for Apple MacOS GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx bugfix PR that fixes a bug issue labels Aug 11, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🆕 New to 🏗 In progress in IDEasy board Aug 11, 2026
@coveralls

coveralls commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32151631791

Coverage increased (+0.04%) to 72.945%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 17 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

17 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/gui/Gui.java 17 39.29%

Coverage Stats

Coverage Status
Relevant Lines: 17578
Covered Lines: 13372
Line Coverage: 76.07%
Relevant Branches: 7767
Covered Branches: 5116
Branch Coverage: 65.87%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🏗 In progress to Team Review in IDEasy board Aug 13, 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 PR! 🙂 For some reason though, the title in the Dock still shows up as "java":

Image

@Ali-Shariati-Najafabadi

Copy link
Copy Markdown
Contributor Author

Thanks for your PR! 🙂 For some reason though, the title in the Dock still shows up as "java":

Image

I've pushed a fix. Tested locally and the Dock now correctly shows "IDEasy". Could you pull the latest commit and recheck on your end?

@laim2003
laim2003 self-requested a review August 24, 2026 09:49

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

Hi, thanks for the PR! Tested it on my mac and it works perfectly! Just added some thoughts that may improve this PR even more 😄

Comment thread CHANGELOG.adoc Outdated
* https://github.com/devonfw/IDEasy/issues/2292[#2292]: Questions appear twice
* https://github.com/devonfw/IDEasy/issues/825[#825]: Add commandlet for GC Log Analyzer
* https://github.com/devonfw/IDEasy/issues/1938[#1938]: GUI not launchable outside of project context
* https://github.com/devonfw/IDEasy/issues/2206[#2206]: IDEasy title not properly shown on macOS

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.

move this to 2026.08.02

// arrange
WindowsSymlinkTestHelper.assumeSymlinksSupported();
IdeTestContext context = newContext(PROJECT_BASIC, null, true);
((AbstractIdeTestContext) context).setSystemInfo(SystemInfoMock.MAC_ARM64);

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.

The cast ((AbstractIdeTestContext) context) is redundant, as IdeTestContext extends AbstractIdeTestContext

Comment on lines +162 to +169
private static void writeFile(Path file, String content) {

try {
Files.writeString(file, content);
} catch (IOException e) {
throw new IllegalStateException("Failed to write file: " + file, e);
}
}

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.

Suggested change
private static void writeFile(Path file, String content) {
try {
Files.writeString(file, content);
} catch (IOException e) {
throw new IllegalStateException("Failed to write file: " + file, e);
}
}

Redundant since we can use FileAccess's writeFileContent()

Path contentsDir = this.context.getTempPath().resolve("IDEasy.app").resolve("Contents");
Path launcher = contentsDir.resolve("MacOS").resolve("IDEasy");
this.context.getFileAccess().mkdirs(launcher.getParent());
writeFile(contentsDir.resolve("Info.plist"), GUI_INFO_PLIST);

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.

Instead of creating our own helper method, we should be able to just use writeFileContent() from our exisitng FileAccess class.

<key>CFBundleExecutable</key>
<string>IDEasy</string>
<key>CFBundleIdentifier</key>
<string>%s</string>

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.

Suggested change
<string>%s</string>
<string>com.devonfw.tools.ideasy.gui</string>

Comment on lines +115 to +116

private static final String GUI_APP_BUNDLE_ID = "com.devonfw.tools.ideasy.gui";

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.

Suggested change
private static final String GUI_APP_BUNDLE_ID = "com.devonfw.tools.ideasy.gui";

If we hardcode the APP_BUNDLE_ID anyways?, why dont we just include it in the GUI_INFO_PLIST string?

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 macOS specific for Apple MacOS

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

IDEasy title not properly shown on macOS

5 participants