Skip to content

Commit

Permalink
#15: Implement ToolCommandlet for Cobigen (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
CREITZ25 authored Jan 30, 2024
1 parent b6d2ecc commit ae37714
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.devonfw.tools.ide.tool.quarkus.Quarkus;
import com.devonfw.tools.ide.tool.terraform.Terraform;
import com.devonfw.tools.ide.tool.vscode.Vscode;
import com.devonfw.tools.ide.tool.cobigen.Cobigen;

/**
* Implementation of {@link CommandletManager}.
Expand Down Expand Up @@ -72,6 +73,7 @@ public CommandletManagerImpl(IdeContext context) {
add(new KotlincNative(context));
add(new Vscode(context));
add(new Azure(context));
add(new Cobigen(context));
}

private void add(Commandlet commandlet) {
Expand Down
33 changes: 33 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/cobigen/Cobigen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.devonfw.tools.ide.tool.cobigen;

import java.util.Set;

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.tool.LocalToolCommandlet;
import com.devonfw.tools.ide.tool.ToolCommandlet;
import com.devonfw.tools.ide.tool.mvn.Mvn;

/**
* {@link ToolCommandlet} for cobigen CLI (cobigen).
*/
public class Cobigen extends LocalToolCommandlet {

/**
* The constructor.
*
* @param context the {@link IdeContext}.
*/
public Cobigen(IdeContext context) {

super(context, "cobigen", Set.of(Tag.GENERATOR));
}

@Override
public boolean install(boolean silent) {

getCommandlet(Mvn.class).install();
return super.install(silent);
}

}
1 change: 1 addition & 0 deletions cli/src/main/resources/nls/Ide.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cmd-set-version=Set the version of the selected tool.
cmd-shell=Commandlet to start built-in shell with advanced auto-completion.
cmd-terraform=Tool commandlet for Terraform
cmd-vscode=Tool commandlet for Visual Studio Code (IDE)
cmd-cobigen=Tool commandlet for Cobigen
val-args=The commandline arguments to pass to the tool.
val-tool=The tool commandlet to select.
val-version=The tool version
Expand Down
1 change: 1 addition & 0 deletions cli/src/main/resources/nls/Ide_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cmd-quarkus=Werkzeug Kommando für Quarkus (Framework für Cloud-native Anwendun
cmd-set-version=Setzt die Version des selektierten Werkzeugs.
cmd-terraform=Werkzeug Kommando für Terraform.
cmd-vscode=Werkzeug Kommando für Visual Studio Code (IDE)
cmd-cobigen=Werkzeug Kommando für Cobigen.
val-args=Die Kommandozeilen-Argumente zur Übergabe an das Werkzeug.
val-tool=Das zu selektierende Werkzeug Kommando.
val-version=Die Werkzeug Version.
Expand Down

0 comments on commit ae37714

Please sign in to comment.