-
Notifications
You must be signed in to change notification settings - Fork 60
#1724: Create GUI commandlet #1782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
laim2003
wants to merge
16
commits into
devonfw:main
Choose a base branch
from
laim2003:#1724-create-gui-commandlet-cleanhistory
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
551f6f1
#1724: initial Gui commandlet commit
laim2003 bbe114b
#1724: added Gui command and Tags/Hints
laim2003 a109b88
#1724: -implemented basic java -jar execution
laim2003 6d291af
#1724: disabled extraction of jar
laim2003 b6f79cf
- #1724: Switched Gui.java to use LocalToolCommandlet
laim2003 3d2fe9f
- #1724: Switched gui maven configuration from maven-shade (fat jar) …
laim2003 4af27c0
#1724: minor adjustments in CommandletManagerImpl.java to accomodate …
laim2003 87ebd01
#1724: fixed wrong mainClass definition
laim2003 8749556
#1724: changelog updated
laim2003 87a1c9d
#1724: fixed pom.xml jar configuration in gui module
laim2003 aa36f5b
Merge branch 'main' into #1724-create-gui-commandlet-cleanhistory
laim2003 81e6128
#1724: reverted accidental change
laim2003 8436d4c
#1724: updated gui-launcher/pom.xml
laim2003 9336bb4
#1724: updated CHANGELOG.adoc
laim2003 1252269
Merge branch 'main' into #1724-create-gui-commandlet-cleanhistory
laim2003 96d3fc8
Update cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java
laim2003 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| package com.devonfw.tools.ide.tool.gui; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| import com.devonfw.tools.ide.commandlet.Commandlet; | ||
| import com.devonfw.tools.ide.context.IdeContext; | ||
| import com.devonfw.tools.ide.process.ProcessMode; | ||
| import com.devonfw.tools.ide.tool.mvn.Mvn; | ||
| import com.devonfw.tools.ide.tool.mvn.MvnBasedLocalToolCommandlet; | ||
| import com.devonfw.tools.ide.variable.IdeVariables; | ||
|
|
||
| /** | ||
| * {@link MvnBasedLocalToolCommandlet} to launch the IDEasy GUI. | ||
| */ | ||
| public class Gui extends Commandlet { | ||
|
|
||
| private static final Logger LOG = LoggerFactory.getLogger(Gui.class); | ||
|
|
||
| private static final String POM_PATH = "gui-execution"; | ||
|
|
||
| /** | ||
| * @param context the {@link IdeContext}. | ||
| */ | ||
| public Gui(IdeContext context) { | ||
|
|
||
| super(context); | ||
| addKeyword(getName()); | ||
| } | ||
|
|
||
| @Override | ||
| public String getName() { | ||
|
|
||
| return "gui"; | ||
| } | ||
|
|
||
| @Override | ||
| protected void doRun() { | ||
|
|
||
| LOG.debug("Starting GUI via commandlet"); | ||
|
|
||
| Mvn mvn = context.getCommandletManager().getCommandlet(Mvn.class); | ||
|
|
||
| List<String> args = List.of( | ||
| "-f", | ||
| IdeVariables.IDE_ROOT.get(context).toString() + "/_ide/installation/" + POM_PATH + "/pom.xml", | ||
| "exec:java", | ||
| "-Dexec.mainClass=com.devonfw.ide.gui.AppLauncher" | ||
| ); | ||
|
|
||
| mvn.runTool(context.newProcess(), ProcessMode.DEFAULT, args); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>com.devonfw.tools.IDEasy.dev</groupId> | ||
| <artifactId>ide</artifactId> | ||
| <version>dev-SNAPSHOT</version> | ||
| </parent> | ||
| <groupId>com.devonfw.tools.IDEasy</groupId> | ||
| <artifactId>ide-gui-launcher</artifactId> | ||
| <version>${revision}</version> | ||
| <packaging>pom</packaging> | ||
| <description>Launcher for IDEasy GUI</description> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.devonfw.tools.IDEasy</groupId> | ||
| <artifactId>ide-gui</artifactId> | ||
| <version>${revision}</version> | ||
| <type>jar</type> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <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> | ||
|
|
||
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly what I was also thinking of for KISS.
However, we would need to specify the minimum Java version that is currently 21 (see our top-level pom.xml).
Otherwise projects that use a lower Java version will run our gui with that Java version what will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in commit c4cf133