Search in sources :

Example 1 with BallerinaConsoleFilter

use of org.ballerinalang.plugins.idea.runconfig.BallerinaConsoleFilter in project ballerina by ballerina-lang.

the class BallerinaExecutor method showOutput.

private void showOutput(@NotNull OSProcessHandler originalHandler, @NotNull BallerinaHistoryProcessListener historyProcessListener) {
    if (myShowOutputOnError) {
        BaseOSProcessHandler outputHandler = new KillableColoredProcessHandler(originalHandler.getProcess(), null);
        RunContentExecutor runContentExecutor = new RunContentExecutor(myProject, outputHandler).withTitle(getPresentableName()).withActivateToolWindow(myShowOutputOnError).withFilter(new BallerinaConsoleFilter(myProject, myModule, myWorkDirectory != null ? VfsUtilCore.pathToUrl(myWorkDirectory) : null));
        Disposer.register(myProject, runContentExecutor);
        runContentExecutor.run();
        historyProcessListener.apply(outputHandler);
    }
    if (myShowNotificationsOnError) {
        showNotification("Failed to run", NotificationType.ERROR);
    }
}
Also used : RunContentExecutor(com.intellij.execution.RunContentExecutor) BaseOSProcessHandler(com.intellij.execution.process.BaseOSProcessHandler) BallerinaConsoleFilter(org.ballerinalang.plugins.idea.runconfig.BallerinaConsoleFilter) KillableColoredProcessHandler(com.intellij.execution.process.KillableColoredProcessHandler)

Aggregations

RunContentExecutor (com.intellij.execution.RunContentExecutor)1 BaseOSProcessHandler (com.intellij.execution.process.BaseOSProcessHandler)1 KillableColoredProcessHandler (com.intellij.execution.process.KillableColoredProcessHandler)1 BallerinaConsoleFilter (org.ballerinalang.plugins.idea.runconfig.BallerinaConsoleFilter)1