mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Working again with optionals split.
This commit is contained in:
@@ -277,9 +277,16 @@ public class ErrorChecker {
|
||||
String q = matcher.group();
|
||||
int tabStart = in.startTabOffset + offset;
|
||||
int tabStop = tabStart + 1;
|
||||
int line = ps.tabOffsetToTabLine(in.tabIndex, tabStart);
|
||||
|
||||
// Prevent duplicate problems
|
||||
if (problems.stream().noneMatch(p -> p.getStartOffset() == tabStart)) {
|
||||
int line = ps.tabOffsetToTabLine(in.tabIndex, tabStart);
|
||||
boolean isDupe = problems.stream()
|
||||
.filter(p -> p.getTabIndex() == in.tabIndex)
|
||||
.filter(p -> p.getLineNumber() == line)
|
||||
.findAny()
|
||||
.isPresent();
|
||||
|
||||
if (isDupe) {
|
||||
String message;
|
||||
if (iproblem.getID() == IProblem.UnterminatedString) {
|
||||
message = Language.interpolate("editor.status.unterm_string_curly", q);
|
||||
|
||||
@@ -233,13 +233,13 @@ class PdeAdapter {
|
||||
new Position(
|
||||
prob.getLineNumber(),
|
||||
PdeAdapter
|
||||
.toLineCol(code.getProgram(), prob.getStartOffset())
|
||||
.toLineCol(code.getProgram(), prob.getTabStartOffset().get())
|
||||
.col - 1
|
||||
),
|
||||
new Position(
|
||||
prob.getLineNumber(),
|
||||
PdeAdapter
|
||||
.toLineCol(code.getProgram(), prob.getStopOffset())
|
||||
.toLineCol(code.getProgram(), prob.getTabStopOffset().get())
|
||||
.col - 1
|
||||
)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user