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);
}
}