use of org.sonarlint.intellij.ui.nodes.LabelNode in project sonarlint-intellij by SonarSource.
the class FlowsTreeModelBuilder method setMultipleFlows.
private void setMultipleFlows(List<LiveIssue.Flow> flows, RangeMarker rangeMarker, @Nullable String message) {
summary = new SummaryNode();
LocationNode primaryLocation = new LocationNode(rangeMarker, message);
summary.add(primaryLocation);
int i = 1;
for (LiveIssue.Flow f : flows) {
LabelNode label = new LabelNode("Flow " + i);
primaryLocation.add(label);
List<LiveIssue.IssueLocation> reversedLocations = new ArrayList<>(f.locations());
Collections.reverse(reversedLocations);
int j = 1;
for (LiveIssue.IssueLocation location : reversedLocations) {
LocationNode locationNode = new LocationNode(j, location.location(), location.message());
label.add(locationNode);
j++;
}
i++;
}
model.setRoot(summary);
}
Aggregations