(int line)
| 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 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
no test coverage detected