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

devonfw / IDEasy / 28679309219

03 Jul 2026 07:14PM UTC coverage: 71.37% (-0.01%) from 71.381%
28679309219

push

github

web-flow
#2044: hacky fix for endoption token (#2055)

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>

4717 of 7308 branches covered (64.55%)

Branch coverage included in aggregate %.

12132 of 16300 relevant lines covered (74.43%)

3.15 hits per line

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

37.5
cli/src/main/java/com/devonfw/tools/ide/commandlet/CompleteCommandlet.java
1
package com.devonfw.tools.ide.commandlet;
2

3
import java.util.List;
4

5
import com.devonfw.tools.ide.cli.CliArguments;
6
import com.devonfw.tools.ide.completion.CompletionCandidate;
7
import com.devonfw.tools.ide.context.AbstractIdeContext;
8
import com.devonfw.tools.ide.context.IdeContext;
9
import com.devonfw.tools.ide.property.StringProperty;
10

11
/**
12
 * {@link Commandlet} for auto-completion.
13
 */
14
public final class CompleteCommandlet extends Commandlet {
15

16
  /** The name of the complete commandlet. */
17
  public static final String NAME = "complete";
18

19
  /** {@link StringProperty} with the current CLI arguments to complete. */
20
  public final StringProperty args;
21

22
  /**
23
   * The constructor.
24
   *
25
   * @param context the {@link IdeContext}.
26
   */
27
  public CompleteCommandlet(IdeContext context) {
28

29
    super(context);
3✔
30
    addKeyword(getName());
4✔
31
    this.args = add(new StringProperty("", false, true, "args"));
12✔
32
  }
1✔
33

34
  @Override
35
  public String getName() {
36

37
    return NAME;
2✔
38
  }
39

40
  @Override
41
  public boolean isIdeRootRequired() {
42

43
    return false;
2✔
44
  }
45

46
  @Override
47
  public boolean isProcessableOutput() {
48

49
    return true;
×
50
  }
51

52
  @Override
53
  protected void doRun() {
54

55
    CliArguments arguments = CliArguments.ofCompletion(this.args.asArray());
×
56
    List<CompletionCandidate> candidates = ((AbstractIdeContext) this.context).complete(arguments, true);
×
57
    for (CompletionCandidate candidate : candidates) {
×
58
      System.out.print(candidate.text()); // enforce output via System.out even if logging is disabled
×
59
      System.out.print('\n'); // do not use println to prevent Carriage-Return character in bash completion on Windows
×
60
    }
×
61
  }
×
62
}
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