mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
precise error highlighting. Nailed it \m/
This commit is contained in:
@@ -775,6 +775,9 @@ public class ErrorCheckerService implements Runnable{
|
||||
}
|
||||
}
|
||||
int pkgNameOffset = ("package " + className + ";\n").length();
|
||||
// package name is added only during compile check
|
||||
if(compilationUnitState != 2) pkgNameOffset = 0;
|
||||
|
||||
for (Problem p : problemsList) {
|
||||
int prbStart = p.getIProblem().getSourceStart() - pkgNameOffset, prbEnd = p
|
||||
.getIProblem().getSourceEnd() - pkgNameOffset;
|
||||
@@ -1086,7 +1089,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
synchronized (editor.errorBar.errorPoints) {
|
||||
for (ErrorMarker emarker : editor.errorBar.errorPoints) {
|
||||
if (emarker.getProblem().getLineNumber() == editor.getTextArea()
|
||||
.getCaretLine() + 1) {
|
||||
.getCaretLine()) {
|
||||
if (emarker.getType() == ErrorMarker.Warning) {
|
||||
editor.statusMessage(emarker.getProblem().getMessage(),
|
||||
DebugEditor.STATUS_INFO);
|
||||
|
||||
Reference in New Issue
Block a user