Skip to content

#1724: Create GUI commandlet#1782

Open
laim2003 wants to merge 33 commits intodevonfw:mainfrom
laim2003:#1724-create-gui-commandlet-cleanhistory
Open

#1724: Create GUI commandlet#1782
laim2003 wants to merge 33 commits intodevonfw:mainfrom
laim2003:#1724-create-gui-commandlet-cleanhistory

Conversation

@laim2003
Copy link
Copy Markdown
Contributor

@laim2003 laim2003 commented Mar 27, 2026

This PR fixes #1724

Implemented changes:

  • Added Gui commandlet
  • Added gui-launcher module to project (in order to provide the gui module as a dependency to the cli, while not requiring the gui to automatically included in the cli release from the beginning)

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

Checklist for tool commandlets

Have you added a new «tool» as commandlet? There are the following additional checks:

  • The tool can be installed automatically (during setup via settings) or via the commandlet call
  • The tool is isolated in its IDEasy project, see Sandbox Principle
  • The new tool is added to the table of tools in LICENSE.asciidoc
  • The new commandlet is a command-wrapper for «tool»
  • Proper help texts for all supported languages are added here
  • The new commandlet installs potential dependencies automatically
  • The variables «TOOL»_VERSION and «TOOL»_EDITION are honored by your commandlet
  • The new commandlet is tested on all platforms it is available for or tested on all platforms that are in scope of the linked issue

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Mar 27, 2026
@laim2003 laim2003 self-assigned this Mar 27, 2026
@laim2003 laim2003 added enhancement New feature or request GUI Graphical User Interface of IDEasy (aka dashboard) build with JavaFx labels Mar 27, 2026
@laim2003 laim2003 moved this from 🆕 New to 🏗 In progress in IDEasy board Mar 27, 2026
@laim2003
Copy link
Copy Markdown
Contributor Author

@hohwille I had following thoughts:

  • (If i understand correctly) it doesnt make sense to add the tool to the table of components/tools as this is not a third-party based tool like others.
  • Does it make more sense to include the commandlet in com.devonfw.tools.ide.tool.gui (current state) or in com.devonfw.tools.ide.commandlet?
  • Does TOOL_VERSION etc. make sense here? The version is automatically equal to the rest of IDEasy anyway

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 27, 2026

Coverage Report for CI Build 24361163360

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.08%) to 70.386%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

12 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java 8 90.21%
com/devonfw/tools/ide/io/HttpDownloader.java 1 62.79%
com/devonfw/tools/ide/os/WindowsPathSyntax.java 1 73.01%
com/devonfw/tools/ide/tool/ide/IdeaPluginDownloader.java 1 68.09%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%

Coverage Stats

Coverage Status
Relevant Lines: 15093
Covered Lines: 11071
Line Coverage: 73.35%
Relevant Branches: 6694
Covered Branches: 4264
Branch Coverage: 63.7%
Branches in Coverage %: Yes
Coverage Strength: 3.1 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@laim2003 thanks for your PR. 👍
Since you are still in draft mode, I only did a quick scan review to give you some guiding hints.

@hohwille
Copy link
Copy Markdown
Member

Does it make more sense to include the commandlet in com.devonfw.tools.ide.tool.gui (current state) or in com.devonfw.tools.ide.commandlet?

Yes, com.devonfw.tools.ide.tool.gui makes perfectly sense to me.

@hohwille
Copy link
Copy Markdown
Member

Does TOOL_VERSION etc. make sense here? The version is automatically equal to the rest of IDEasy anyway

No, since Gui commandlet is not a ToolCommandlet lots of the DoD checklist for that does not apply here. Simply leave those unchecked and ignore them.

@laim2003 laim2003 marked this pull request as ready for review April 2, 2026 15:15
@laim2003 laim2003 marked this pull request as draft April 2, 2026 15:16
small fix in Gui.java

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
@laim2003
Copy link
Copy Markdown
Contributor Author

laim2003 commented Apr 2, 2026

TODO: GO through the .workflow files for GitHu actions and update all java versions as discussed in the daily

@laim2003 laim2003 marked this pull request as ready for review April 7, 2026 07:38
@laim2003 laim2003 moved this from 🏗 In progress to Team Review in IDEasy board Apr 7, 2026
@hohwille hohwille added this to the release:2026.04.002 milestone Apr 7, 2026
@laim2003 laim2003 marked this pull request as draft April 9, 2026 17:33
@laim2003
Copy link
Copy Markdown
Contributor Author

laim2003 commented Apr 9, 2026

Currently experiencing issues with launching the IDEs from the GUI for some reason:

java.lang.ClassNotFoundException: com.devonfw.tools.ide.log.JulConsoleHandler
java.lang.ClassNotFoundException: com.devonfw.tools.ide.log.JulConsoleHandler
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
	at java.logging/java.util.logging.LogManager.createLoggerHandlers(LogManager.java:919)
	at java.logging/java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:892)
	at java.logging/java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:2274)
	at java.logging/java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:2357)
	at java.logging/java.util.logging.Logger.getHandlers(Logger.java:2063)
	at java.logging/java.util.logging.Logger.log(Logger.java:959)

This happens when clicking the open button on one of the IDEs, however the IDE still launches even with this error.

…hanges got lost. Probably a shelving issue.)

- fixed issues with MainClass path
@laert-ll
Copy link
Copy Markdown
Contributor

I initially had trouble getting the gui commandlet to run locally. After debugging with @laim2003, we found that these commands get the program running locally:

mvn clean package -DskipTests -pl
mvn clean package -DskipTests -pl -Passembly
mkdir -p ~/projects/_ide/installation/gui-execution
cp ~/projects/«project_name»/workspaces/main/IDEasy/cli/target/package/gui-execution/pom.xml ~/projects/_ide/installation/gui-execution

This is because the file is not yet included in the current release, so these manual steps are required for now.

@laim2003
Copy link
Copy Markdown
Contributor Author

laim2003 commented Apr 10, 2026

Currently experiencing issues with launching the IDEs from the GUI for some reason:

java.lang.ClassNotFoundException: com.devonfw.tools.ide.log.JulConsoleHandler
java.lang.ClassNotFoundException: com.devonfw.tools.ide.log.JulConsoleHandler
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
	at java.logging/java.util.logging.LogManager.createLoggerHandlers(LogManager.java:919)
	at java.logging/java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:892)
	at java.logging/java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:2274)
	at java.logging/java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:2357)
	at java.logging/java.util.logging.Logger.getHandlers(Logger.java:2063)
	at java.logging/java.util.logging.Logger.log(Logger.java:959)

This happens when clicking the open button on one of the IDEs, however the IDE still launches even with this error.

this was an issue with the classpath loader. changed the way the GUI is executed and now it seems to work (at least locally). Switched from using exec:java to exec:exec with -Dexec.executable=java and -Dexec.args=-classpath %classpath com.devonfw.ide.gui.AppLauncher to include the correct classpath

@laim2003 laim2003 marked this pull request as ready for review April 10, 2026 14:29
@laim2003
Copy link
Copy Markdown
Contributor Author

laim2003 commented Apr 10, 2026

@hohwille just for my understanding: Right now, the pom.xml used to launch the gui (the flattened_pom from gui-launcher) is being copied into the target/package/installation/ folder of ide-cli during the assembly build. So if i understand correctly, the file should correctly be added to the native images when the new release is being created and therefore should be included in the next update, correct?

@laim2003 laim2003 requested review from hohwille and laert-ll April 10, 2026 14:56
@hohwille hohwille moved this from Team Review to 👀 In review in IDEasy board Apr 13, 2026
@hohwille hohwille self-assigned this Apr 13, 2026
Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@laim2003 thanks for your PR. Nice work 👍
I left some comment. One is IMHO a real bug I found, the rest are just improvements.
Please have a look and address the comments, then we can merge.

toolInstallRequest.setProcessContext(processContext);
toolInstallRequest.setRequested(
new ToolEditionAndVersion(
new ToolEdition("java", "25"),
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.

what's that?

public record ToolEdition(String tool, String edition) {

You are providing 25 as edition of Java - this can never work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How do I do this properly? Can I just put an empty string for the edition? Because if I want to use

java.installAsDependency(
        (VersionRange) toolInstallRequest.getRequested().getVersion(),
        toolInstallRequest
    );

i have to declare the Version and Edition via ToolEditionAndVersion.

"exec:exec",
"-Dexec.executable=java",
"-Dexec.classpathScope=compile",
"-Dexec.args=-classpath %classpath com.devonfw.ide.gui.AppLauncher"
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.

KISS

Suggested change
"-Dexec.args=-classpath %classpath com.devonfw.ide.gui.AppLauncher"
"-Dexec.mainClass=com.devonfw.ide.gui.AppLauncher"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using exec:java with exec.mainClass will lead to a problem:

Can't load log handler "com.devonfw.tools.ide.log.JulConsoleHandler"
java.lang.ClassNotFoundException: com.devonfw.tools.ide.log.JulConsoleHandler

When using exec:exec with -Dexec.executable=java and with defining the classpath manually, the class will be loaded correctly

pom.xml Outdated
<assembly.maven.plugin.version>3.7.1</assembly.maven.plugin.version>
<build.helper.maven.plugin.version>3.6.1</build.helper.maven.plugin.version>
<graalvm.version>24.2.1</graalvm.version>
<gui.relative_pom_path>gui-execution</gui.relative_pom_path>
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.

Wouldn't just gui be enough (KISS)? Otherwise shouldn't it be named gui-launcher since we already introduced that name?

Suggested change
<gui.relative_pom_path>gui-execution</gui.relative_pom_path>
<gui.relative_pom_path>gui</gui.relative_pom_path>

Comment on lines +25 to +52
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-gui-launcher-flattened-pom</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/package/gui</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>.flattened-pom.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
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.

Do we really need this?
It is just a copy of the same file in a different folder?
Why not referencing the original file in the antrun logic?

If I am not mistaken, the copy is not actually used by antrun but it already copies the source so IMHO this is pointless and can be removed without any other change.

Suggested change
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-gui-launcher-flattened-pom</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/package/gui</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>.flattened-pom.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i now moved this logic into the pom.xml of the ide-gui-launcher module. This way, this file will only be moved after the launcher module has been built

hohwille and others added 7 commits April 13, 2026 14:12
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
…et-cleanhistory' into devonfw#1724-create-gui-commandlet-cleanhistory
…her to the ide-gui-launcher module from ide-cli
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.

Create gui commandlet

4 participants