mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
more synchronization
This commit is contained in:
@@ -174,21 +174,22 @@ public class ErrorBar extends JPanel {
|
||||
// Each problem.getSourceLine() will have an extra line added
|
||||
// because of
|
||||
// class declaration in the beginning as well as default imports
|
||||
for (Problem problem : problems) {
|
||||
if (problem.getTabIndex() == currentTab) {
|
||||
// Ratio of error line to total lines
|
||||
float y = (problem.getLineNumber() - errorCheckerService.defaultImportsOffset)
|
||||
/ ((float) totalLines);
|
||||
// Ratio multiplied by height of the error bar
|
||||
y *= fheight - 15; // -15 is just a vertical offset
|
||||
errorPoints
|
||||
.add(new ErrorMarker(problem, (int) y,
|
||||
problem.isError() ? ErrorMarker.Error
|
||||
: ErrorMarker.Warning));
|
||||
// System.out.println("Y: " + y);
|
||||
synchronized (problems) {
|
||||
for (Problem problem : problems) {
|
||||
if (problem.getTabIndex() == currentTab) {
|
||||
// Ratio of error line to total lines
|
||||
float y = (problem.getLineNumber() - errorCheckerService.defaultImportsOffset)
|
||||
/ ((float) totalLines);
|
||||
// Ratio multiplied by height of the error bar
|
||||
y *= fheight - 15; // -15 is just a vertical offset
|
||||
errorPoints
|
||||
.add(new ErrorMarker(problem, (int) y,
|
||||
problem.isError() ? ErrorMarker.Error
|
||||
: ErrorMarker.Warning));
|
||||
// System.out.println("Y: " + y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user