Skip to content

Commit

Permalink
Updated for latest bld snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Jul 14, 2024
1 parent a0e4e69 commit 65a6ad1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/rife/bld/idea/execution/BldExecution.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.intellij.execution.process.CapturingAnsiEscapesAwareProcessHandler;
import com.intellij.execution.process.ProcessAdapter;
import com.intellij.execution.process.ProcessEvent;
import com.intellij.execution.process.ProcessOutputType;
import com.intellij.execution.ui.ConsoleViewContentType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectUtil;
Expand Down Expand Up @@ -43,7 +44,7 @@ public static void terminateBldProcess(Project project) {
}

public static void listTasks(@NotNull Project project) {
executeCommands(project, (String[]) null);
executeCommands(project, "help", Wrapper.JSON_ARGUMENT);
}

public static void executeCommands(@NotNull Project project, String... commands) {
Expand All @@ -67,7 +68,6 @@ public static void executeCommands(@NotNull Project project, String... commands)
command_line.addParameter(project_dir.getCanonicalPath() + "/bld");
command_line.addParameter(Wrapper.BUILD_ARGUMENT);
command_line.addParameter(bldMainClass);
command_line.addParameter(Wrapper.JSON_ARGUMENT);
if (commands != null) {
command_line.addParameters(commands);
}
Expand All @@ -94,8 +94,10 @@ public static void executeCommands(@NotNull Project project, String... commands)
@Override
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
super.onTextAvailable(event, outputType);
BldConsoleManager.showTaskMessage(event.getText(), ConsoleViewContentType.NORMAL_OUTPUT, project);
output.add(event.getText());
if (!outputType.equals(ProcessOutputType.SYSTEM)) {
BldConsoleManager.showTaskMessage(event.getText(), ConsoleViewContentType.NORMAL_OUTPUT, project);
output.add(event.getText());
}
}
});

Expand Down

0 comments on commit 65a6ad1

Please sign in to comment.