Skip to content

Commit

Permalink
#888: fixed graalvm gu (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-vcapgemini authored Dec 16, 2024
1 parent 83acd3a commit 52afdd7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE

Release with new features and bugfixes:

* https://github.com/devonfw/IDEasy/issues/888[#888]: Removed gu update functionality (needs to be run manually for old versions now).
* https://github.com/devonfw/IDEasy/issues/885[#885]: Gcviewer starts in foreground fixed

The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/17?closed=1[milestone 2024.12.002].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public CliProcessException(ProcessResult processResult) {
/**
* The constructor.
*
* @param message the message to display.
* @param processResult the {@link #getProcessResult() process result}.
*/
public CliProcessException(String message, ProcessResult processResult) {
Expand Down
21 changes: 2 additions & 19 deletions cli/src/main/java/com/devonfw/tools/ide/tool/graalvm/GraalVm.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.environment.EnvironmentVariables;
import com.devonfw.tools.ide.environment.EnvironmentVariablesType;
import com.devonfw.tools.ide.process.ProcessErrorHandling;
import com.devonfw.tools.ide.process.ProcessMode;
import com.devonfw.tools.ide.step.Step;
import com.devonfw.tools.ide.tool.LocalToolCommandlet;
import com.devonfw.tools.ide.tool.ToolCommandlet;
import com.devonfw.tools.ide.tool.plugin.PluginBasedCommandlet;
import com.devonfw.tools.ide.tool.plugin.ToolPluginDescriptor;
import com.devonfw.tools.ide.version.VersionIdentifier;

/**
* {@link LocalToolCommandlet} for <a href="https://www.graalvm.org/">GraalVM</a>, an advanced JDK with ahead-of-time Native Image compilation.
*/
public class GraalVm extends PluginBasedCommandlet {
public class GraalVm extends LocalToolCommandlet {

/**
* The constructor.
Expand Down Expand Up @@ -57,18 +54,4 @@ public void postInstall() {
super.postInstall();
}

@Override
public void installPlugin(ToolPluginDescriptor plugin, Step step) {
doGuPluginCommand(plugin, "install");
}

@Override
public void uninstallPlugin(ToolPluginDescriptor plugin) {
doGuPluginCommand(plugin, "remove");
}

private void doGuPluginCommand(ToolPluginDescriptor plugin, String command) {
this.context.newProcess().errorHandling(ProcessErrorHandling.THROW_CLI).executable(getToolPath().resolve("bin").resolve("gu")).addArgs(command, plugin.name()).run(ProcessMode.DEFAULT);
}

}

0 comments on commit 52afdd7

Please sign in to comment.