-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ballerina-platform/baller…
- Loading branch information
Showing
16 changed files
with
530 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 0 additions & 144 deletions
144
...me/src/main/java/io/ballerina/runtime/observability/metrics/BallerinaMetricsObserver.java
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
...ime/src/main/java/io/ballerina/runtime/observability/tracer/BallerinaTracingObserver.java
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
...rver-commons/src/main/java/org/ballerinalang/langserver/commons/workspace/RunContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.ballerinalang.langserver.commons.workspace; | ||
|
||
import java.nio.file.Path; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* Represents the context required to run a Ballerina program using the LS workspace manager. | ||
* | ||
* @param balSourcePath Ballerina source file path to run | ||
* @param programArgs program arguments to run the program | ||
* @param env environment variables to be added to the program | ||
* @param debugPort debug port to be used for debugging (if available) | ||
* @since 2201.11.0 | ||
*/ | ||
public record RunContext(Path balSourcePath, List<String> programArgs, Map<String, String> env, Integer debugPort) { | ||
|
||
public static class Builder { | ||
|
||
private final Path sourcePath; | ||
private List<String> programArgs = new ArrayList<>(); | ||
private Map<String, String> env = Map.of(); | ||
private int debugPort = -1; | ||
|
||
public Builder(Path sourcePath) { | ||
this.sourcePath = sourcePath; | ||
} | ||
|
||
public Builder withProgramArgs(List<String> programArgs) { | ||
this.programArgs = programArgs; | ||
return this; | ||
} | ||
|
||
public Builder withEnv(Map<String, String> env) { | ||
this.env = env; | ||
return this; | ||
} | ||
|
||
public Builder withDebugPort(int debugPort) { | ||
this.debugPort = debugPort; | ||
return this; | ||
} | ||
|
||
public RunContext build() { | ||
return new RunContext(sourcePath, programArgs, env, debugPort); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.