• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 22303886886

23 Feb 2026 11:19AM UTC coverage: 70.647% (+0.2%) from 70.474%
22303886886

Pull #1714

github

web-flow
Merge f1f7e1e61 into 379acdc9d
Pull Request #1714: #404: #1713: advanced logging

4069 of 6360 branches covered (63.98%)

Branch coverage included in aggregate %.

10644 of 14466 relevant lines covered (73.58%)

3.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.17
cli/src/main/java/com/devonfw/tools/ide/tool/ide/IdeaBasedIdeToolCommandlet.java
1
package com.devonfw.tools.ide.tool.ide;
2

3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Set;
6

7
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
9

10
import com.devonfw.tools.ide.common.Tag;
11
import com.devonfw.tools.ide.context.IdeContext;
12
import com.devonfw.tools.ide.log.IdeLogLevel;
13
import com.devonfw.tools.ide.process.ProcessContext;
14
import com.devonfw.tools.ide.process.ProcessMode;
15
import com.devonfw.tools.ide.process.ProcessResult;
16
import com.devonfw.tools.ide.step.Step;
17
import com.devonfw.tools.ide.tool.plugin.ToolPluginDescriptor;
18

19
/**
20
 * {@link IdeToolCommandlet} for IDEA based commandlets like: {@link com.devonfw.tools.ide.tool.intellij.Intellij IntelliJ} and
21
 * {@link com.devonfw.tools.ide.tool.androidstudio.AndroidStudio Android Studio}.
22
 */
23
public class IdeaBasedIdeToolCommandlet extends IdeToolCommandlet {
24

25
  private static final Logger LOG = LoggerFactory.getLogger(IdeaBasedIdeToolCommandlet.class);
4✔
26

27
  /**
28
   * The constructor.
29
   *
30
   * @param context the {@link IdeContext}.
31
   * @param tool the {@link #getName() tool name}.
32
   * @param tags the {@link #getTags() tags} classifying the tool. Should be created via {@link Set#of(Object) Set.of} method.
33
   */
34
  public IdeaBasedIdeToolCommandlet(IdeContext context, String tool, Set<Tag> tags) {
35
    super(context, tool, tags);
5✔
36
  }
1✔
37

38
  @Override
39
  public boolean installPlugin(ToolPluginDescriptor plugin, final Step step, ProcessContext pc) {
40

41
    // In case of plugins with a custom repo url
42
    boolean customRepo = plugin.url() != null;
6!
43
    List<String> args = new ArrayList<>();
4✔
44
    args.add("installPlugins");
4✔
45
    args.add(plugin.id().replace("+", " "));
8✔
46
    if (customRepo) {
2!
47
      args.add(plugin.url());
5✔
48
    }
49
    ProcessResult result = runTool(pc, ProcessMode.DEFAULT, args);
6✔
50
    if (result.isSuccessful()) {
3!
51
      IdeLogLevel.SUCCESS.log(LOG, "Successfully installed plugin: {}", plugin.name());
11✔
52
      step.success();
2✔
53
      return true;
2✔
54
    } else {
55
      step.error("Failed to install plugin {} ({}): exit code was {}", plugin.name(), plugin.id(), result.getExitCode());
×
56
      return false;
×
57
    }
58
  }
59

60
  @Override
61
  public ProcessResult runTool(List<String> args) {
62
    args.add(this.context.getWorkspacePath().toString());
7✔
63
    return super.runTool(args);
4✔
64
  }
65
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc