use of org.ballerinalang.plugins.idea.util.BallerinaExecutor in project ballerina by ballerina-lang.
the class BallerinaRunningState method startProcess.
@NotNull
@Override
protected ProcessHandler startProcess() throws ExecutionException {
BallerinaExecutor executor = patchExecutor(createCommonExecutor());
// We only need to set parameters.
GeneralCommandLine commandLine = executor.withParameterString(myConfiguration.getParams()).createCommandLine();
KillableColoredProcessHandler handler = new KillableColoredProcessHandler(commandLine, true);
ProcessTerminatedListener.attach(handler);
return handler;
}
use of org.ballerinalang.plugins.idea.util.BallerinaExecutor in project ballerina by ballerina-lang.
the class BallerinaTestRunningState method patchExecutor.
@Override
protected BallerinaExecutor patchExecutor(@NotNull BallerinaExecutor executor) throws ExecutionException {
String parameters = myConfiguration.getPackage();
BallerinaExecutor ballerinaExecutor = executor.withParameters("test").withBallerinaPath(BallerinaSdkService.getInstance(getConfiguration().getProject()).getSdkHomePath(null)).withParameterString(myConfiguration.getBallerinaToolParams()).withParameters(parameters);
// If debugging mode is running, we need to add the debugging flag.
if (isDebug()) {
ballerinaExecutor.withParameters("--debug", String.valueOf(myDebugPort));
}
return ballerinaExecutor;
}
use of org.ballerinalang.plugins.idea.util.BallerinaExecutor in project ballerina by ballerina-lang.
the class BallerinaApplicationRunningState method patchExecutor.
@Override
protected BallerinaExecutor patchExecutor(@NotNull BallerinaExecutor executor) throws ExecutionException {
RunConfigurationKind kind = getConfiguration().getRunKind();
String parameters = myConfiguration.getPackage();
if (parameters.isEmpty()) {
parameters = myConfiguration.getFilePath();
}
BallerinaExecutor ballerinaExecutor = executor.withParameters("run").withBallerinaPath(BallerinaSdkService.getInstance(getConfiguration().getProject()).getSdkHomePath(null)).withParameterString(myConfiguration.getBallerinaToolParams()).withParameters(parameters);
if (kind == RunConfigurationKind.SERVICE) {
ballerinaExecutor.withParameters("-s");
}
// If debugging mode is running, we need to add the debugging flag.
if (isDebug()) {
ballerinaExecutor.withParameters("--debug", String.valueOf(myDebugPort));
}
return ballerinaExecutor;
}
Aggregations