use of com.google.idea.blaze.base.scope.output.IssueOutput in project intellij by bazelbuild.
the class IssueOutputLineProcessor method processLine.
@Override
public boolean processLine(String line) {
IssueOutput issue = blazeIssueParser.parseIssue(line);
if (issue != null) {
if (issue.getCategory() == IssueOutput.Category.ERROR) {
context.setHasError();
}
context.output(issue);
}
OutputType outputType = issue == null ? OutputType.NORMAL : OutputType.ERROR;
context.output(new PrintOutput(line, outputType));
return true;
}
use of com.google.idea.blaze.base.scope.output.IssueOutput in project intellij by bazelbuild.
the class ProjectViewUi method parseProjectView.
public ProjectViewSet parseProjectView(final List<IssueOutput> issues) {
final String projectViewText = projectViewEditor.getDocument().getText();
final OutputSink<IssueOutput> issueCollector = output -> {
issues.add(output);
return OutputSink.Propagation.Continue;
};
return Scope.root(context -> {
context.addOutputSink(IssueOutput.class, issueCollector);
ProjectViewParser projectViewParser = new ProjectViewParser(context, workspacePathResolver);
projectViewParser.parseProjectView(projectViewText);
return projectViewParser.getResult();
});
}
Aggregations