use of org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind 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;
}
use of org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind in project ballerina by ballerina-lang.
the class BallerinaApplicationSettingsEditor method applyEditorTo.
@Override
protected void applyEditorTo(@NotNull BallerinaApplicationConfiguration configuration) throws ConfigurationException {
configuration.setPackage(myPackageField.getComponent().getText());
RunConfigurationKind runKind = (RunConfigurationKind) myRunKindComboBox.getComponent().getSelectedItem();
configuration.setRunKind(runKind);
configuration.setFilePath(myFileField.getComponent().getText());
configuration.setModule(myModulesComboBox.getComponent().getSelectedModule());
configuration.setParams(myParamsField.getComponent().getText());
configuration.setBallerinaParams(myBallerinaParamsField.getComponent().getText());
configuration.setWorkingDirectory(myWorkingDirectoryField.getComponent().getText());
}
use of org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind in project ballerina by ballerina-lang.
the class BallerinaApplicationSettingsEditor method installRunKindComboBox.
private void installRunKindComboBox() {
myRunKindComboBox.getComponent().removeAllItems();
myRunKindComboBox.getComponent().setRenderer(getRunKindListCellRendererWrapper());
for (RunConfigurationKind kind : RunConfigurationKind.values()) {
myRunKindComboBox.getComponent().addItem(kind);
}
}
Aggregations