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

devonfw / IDEasy / 13772844222

10 Mar 2025 07:10PM UTC coverage: 68.619% (+0.1%) from 68.471%
13772844222

push

github

web-flow
#654: improved plugin suppport (#1085)

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

3067 of 4915 branches covered (62.4%)

Branch coverage included in aggregate %.

7934 of 11117 relevant lines covered (71.37%)

3.11 hits per line

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

0.0
cli/src/main/java/com/devonfw/tools/ide/process/EnvironmentContext.java
1
package com.devonfw.tools.ide.process;
2

3
import java.nio.file.Path;
4

5
/**
6
 * Interface for the environment context relatable in the case a tool needs to be run with an environment variable.
7
 */
8
public interface EnvironmentContext {
9

10
  /**
11
   * Sets or overrides the specified environment variable only in this context. Please note that the environment variables are initialized when the
12
   * {@link EnvironmentContext} is created. This method explicitly set an additional or overrides an existing environment and will have effect only within this
13
   * context and not change the {@link com.devonfw.tools.ide.environment.EnvironmentVariables} or {@link com.devonfw.tools.ide.common.SystemPath}.
14
   *
15
   * @param key the name of the environment variable (E.g. "PATH").
16
   * @param value the value of the environment variable.
17
   * @return this {@link EnvironmentContext} for fluent API calls.
18
   */
19
  EnvironmentContext withEnvVar(String key, String value);
20

21
  /**
22
   * Extends the "PATH" variable with the given {@link Path} entry. The new entry will be added to the beginning of the "PATH" and potentially override other
23
   * entries if it contains the same binary.
24
   *
25
   * @param path the {@link Path} pointing to the folder with the binaries to add to the "PATH" variable.
26
   * @return this {@link EnvironmentContext} for fluent API calls.
27
   */
28
  EnvironmentContext withPathEntry(Path path);
29

30
  /**
31
   * @return an empty instance of {@link EnvironmentContext} to prevent {@link NullPointerException}s.
32
   */
33
  static EnvironmentContext getEmpty() {
34

35
    return EnvironmentContextEmpty.INSTANCE;
×
36
  }
37

38
}
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

© 2025 Coveralls, Inc