MCPcopy Index your code
hub / github.com/benfry/processing4 / findProblems

Method findProblems

app/src/processing/app/ui/Editor.java:2627–2640  ·  view source on GitHub ↗
(int line)

Source from the content-addressed store, hash-verified

2625
2626
2627 public List<Problem> findProblems(int line) {
2628 int currentTab = getSketch().getCurrentCodeIndex();
2629 return problems.stream()
2630 .filter(p -> p.getTabIndex() == currentTab)
2631 .filter(p -> {
2632 int pStartLine = p.getLineNumber();
2633 int lineOffset = textarea.getLineStartOffset(pStartLine);
2634 int pEndOffset = lineOffset + p.getStopOffset();
2635 int pEndLine = textarea.getLineOfOffset(pEndOffset);
2636
2637 return line >= pStartLine && line <= pEndLine;
2638 })
2639 .collect(Collectors.toList());
2640 }
2641
2642
2643 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers 3

findProblemMethod · 0.95
paintErrorLineMethod · 0.80
getToolTipTextMethod · 0.80

Calls 8

getSketchMethod · 0.95
getLineOfOffsetMethod · 0.80
getTabIndexMethod · 0.65
getLineNumberMethod · 0.65
getStopOffsetMethod · 0.65
getCurrentCodeIndexMethod · 0.45
filterMethod · 0.45
getLineStartOffsetMethod · 0.45

Tested by

no test coverage detected