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

devonfw / IDEasy / 12181235589

05 Dec 2024 01:58PM UTC coverage: 66.902% (-0.02%) from 66.917%
12181235589

push

github

web-flow
#508: enabled autocompletion for commandlet options (#833)

2527 of 4130 branches covered (61.19%)

Branch coverage included in aggregate %.

6577 of 9478 relevant lines covered (69.39%)

3.06 hits per line

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

80.0
cli/src/main/java/com/devonfw/tools/ide/property/KeywordProperty.java
1
package com.devonfw.tools.ide.property;
2

3
import com.devonfw.tools.ide.cli.CliArguments;
4
import com.devonfw.tools.ide.commandlet.Commandlet;
5
import com.devonfw.tools.ide.completion.CompletionCandidateCollector;
6
import com.devonfw.tools.ide.context.IdeContext;
7

8
/**
9
 * {@link BooleanProperty} for a keyword (e.g. "install" in "ide install mvn 3.9.4").
10
 */
11
public class KeywordProperty extends BooleanProperty {
1✔
12

13
  /**
14
   * The constructor.
15
   *
16
   * @param name the {@link #getName() property name}.
17
   * @param required the {@link #isRequired() required flag}.
18
   * @param alias the {@link #getAlias() property alias}.
19
   */
20
  public KeywordProperty(String name, boolean required, String alias) {
21

22
    super(name, required, alias);
5✔
23
    assert !name.isEmpty();
4!
24
  }
1✔
25

26
  @Override
27
  public boolean isValue() {
28

29
    return true;
2✔
30
  }
31

32
  @Override
33
  public boolean isExpectValue() {
34

35
    return false;
×
36
  }
37

38
  @Override
39
  protected boolean applyValue(String argValue, boolean lookahead, CliArguments args, IdeContext context, Commandlet commandlet,
40
      CompletionCandidateCollector collector) {
41

42
    setValue(true);
3✔
43
    return true;
2✔
44
  }
45
}
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