Search in sources :

Example 1 with RunConfigurationKind

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;
}
Also used : BallerinaExecutor(org.ballerinalang.plugins.idea.util.BallerinaExecutor) RunConfigurationKind(org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind)

Example 2 with RunConfigurationKind

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());
}
Also used : RunConfigurationKind(org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind)

Example 3 with RunConfigurationKind

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);
    }
}
Also used : RunConfigurationKind(org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind)

Aggregations

RunConfigurationKind (org.ballerinalang.plugins.idea.runconfig.RunConfigurationKind)3 BallerinaExecutor (org.ballerinalang.plugins.idea.util.BallerinaExecutor)1