mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[maven] IDEA-216278 code cleanup
GitOrigin-RevId: 998adc3c785a9dee3c0b9bac192c683360f514b3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
eb63148798
commit
178e0fd7b9
@@ -12,7 +12,6 @@ import org.jetbrains.idea.maven.execution.MavenSpyEventsBuffer;
|
||||
@ApiStatus.Experimental
|
||||
public class BuildToolConsoleProcessAdapter extends ProcessAdapter {
|
||||
private final MavenBuildEventProcessor myEventParser;
|
||||
private final boolean myProcessText;
|
||||
private final AnsiEscapeDecoder myDecoder = new AnsiEscapeDecoder();
|
||||
private final MavenSpyEventsBuffer myMavenSpyEventsBuffer;
|
||||
|
||||
@@ -20,15 +19,9 @@ public class BuildToolConsoleProcessAdapter extends ProcessAdapter {
|
||||
/**
|
||||
* @param processText to be removed after IDEA-216278
|
||||
*/
|
||||
public BuildToolConsoleProcessAdapter(MavenBuildEventProcessor eventParser, @Deprecated boolean processText) {
|
||||
public BuildToolConsoleProcessAdapter(MavenBuildEventProcessor eventParser) {
|
||||
myEventParser = eventParser;
|
||||
myProcessText = processText;
|
||||
if (processText) {
|
||||
myMavenSpyEventsBuffer = new MavenSpyEventsBuffer((l, k) -> myDecoder.escapeText(l, k, myEventParser));
|
||||
}
|
||||
else {
|
||||
myMavenSpyEventsBuffer = null;
|
||||
}
|
||||
myMavenSpyEventsBuffer = new MavenSpyEventsBuffer((l, k) -> myDecoder.escapeText(l, k, myEventParser));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,9 +31,7 @@ public class BuildToolConsoleProcessAdapter extends ProcessAdapter {
|
||||
|
||||
@Override
|
||||
public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
|
||||
if (myProcessText) {
|
||||
myMavenSpyEventsBuffer.addText(event.getText(), outputType);
|
||||
}
|
||||
myMavenSpyEventsBuffer.addText(event.getText(), outputType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -538,7 +538,7 @@ public class MavenRunConfiguration extends LocatableConfigurationBase implements
|
||||
targetFileMapper, getStartBuildEventSupplier(runner, processHandler, startBuildEvent, withResumeAction)
|
||||
);
|
||||
|
||||
processHandler.addProcessListener(new BuildToolConsoleProcessAdapter(eventProcessor, true));
|
||||
processHandler.addProcessListener(new BuildToolConsoleProcessAdapter(eventProcessor));
|
||||
DefaultExecutionResult res = new DefaultExecutionResult(consoleView, processHandler, new DefaultActionGroup());
|
||||
res.setRestartActions(new JvmToggleAutoTestAction());
|
||||
return res;
|
||||
@@ -559,7 +559,7 @@ public class MavenRunConfiguration extends LocatableConfigurationBase implements
|
||||
new MavenBuildEventProcessor(myConfiguration, buildView, descriptor, taskId, targetFileMapper, ctx ->
|
||||
new StartBuildEventImpl(descriptor, ""));
|
||||
|
||||
processHandler.addProcessListener(new BuildToolConsoleProcessAdapter(eventProcessor, true));
|
||||
processHandler.addProcessListener(new BuildToolConsoleProcessAdapter(eventProcessor));
|
||||
if (emulateTerminal()) {
|
||||
buildView.attachToProcess(processHandler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user