Skip to content

Commit 3c7f39c

Browse files
committed
misc notes and repair ConcurrentModificationException in the editor (fixes processing#3726)
1 parent 6f7053a commit 3c7f39c

5 files changed

Lines changed: 43 additions & 10 deletions

File tree

core/todo.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ X keyChar and keyCode are super wonky and unlike AWT
1414
X https://github.com/processing/processing/issues/3290
1515
X what's the way to do this after the deprecation?
1616
X if this is going to be the default renderer, has to be ironed out
17+
X FX - arc - infamous deg-rad conversion strikes again
18+
X https://github.com/processing/processing/pull/3713
19+
X FX - paths, contours, curves
20+
X https://github.com/processing/processing/pull/3715
21+
X FX - fix AIOOBE when pressing ESC on Mac
22+
X https://github.com/processing/processing/pull/3719
23+
X FX - framerate fix
24+
X https://github.com/processing/processing/pull/3724
25+
X FX - loadPixels, updatePixels, get and set optimizations
26+
X https://github.com/processing/processing/pull/3725
27+
X FX - keep track of whether pixels are up to date
28+
X https://github.com/processing/processing/pull/3716
1729

1830

1931
known issues

java/src/processing/mode/java/JavaEditor.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2514,6 +2514,16 @@ public List<LineMarker> getErrorPoints() {
25142514
}
25152515

25162516

2517+
/*
2518+
public void clearErrorPoints() {
2519+
List<LineMarker> errorPoints = getErrorPoints();
2520+
synchronized (errorPoints) { // necessary?
2521+
errorPoints.clear();
2522+
}
2523+
}
2524+
*/
2525+
2526+
25172527
public void repaintErrorBar() {
25182528
errorColumn.repaint();
25192529
}

java/src/processing/mode/java/pdex/ErrorCheckerService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,9 @@ private void updateEditorStatus() {
996996
// editor.statusNotice("Position: " +
997997
// editor.getTextArea().getCaretLine());
998998
if (JavaMode.errorCheckEnabled) {
999-
synchronized (editor.getErrorPoints()) {
1000-
for (LineMarker emarker : editor.getErrorPoints()) {
999+
List<LineMarker> errorPoints = editor.getErrorPoints();
1000+
synchronized (errorPoints) {
1001+
for (LineMarker emarker : errorPoints) {
10011002
if (emarker.getProblem().getLineNumber() == editor.getTextArea().getCaretLine()) {
10021003
if (emarker.getType() == LineMarker.WARNING) {
10031004
editor.statusMessage(emarker.getProblem().getMessage(),
@@ -1590,6 +1591,7 @@ public static String substituteUnicode(String program) {
15901591
public void handleErrorCheckingToggle() {
15911592
if (!JavaMode.errorCheckEnabled) {
15921593
Messages.log(editor.getSketch().getName() + " Error Checker paused.");
1594+
//editor.clearErrorPoints();
15931595
editor.getErrorPoints().clear();
15941596
problemsList.clear();
15951597
updateErrorTable();

java/src/processing/mode/java/pdex/JavaTextAreaPainter.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,18 @@ protected void paintErrorLine(Graphics gfx, int line, int x) {
345345
errorLineCoords.clear();
346346
// Check if current line contains an error. If it does, find if it's an
347347
// error or warning
348-
for (LineMarker emarker : getJavaEditor().getErrorPoints()) {
349-
if (emarker.getProblem().getLineNumber() == line) {
350-
notFound = false;
351-
if (emarker.getType() == LineMarker.WARNING) {
352-
isWarning = true;
348+
List<LineMarker> errorPoints = getJavaEditor().getErrorPoints();
349+
synchronized (errorPoints) {
350+
for (LineMarker emarker : errorPoints) {
351+
if (emarker.getProblem().getLineNumber() == line) {
352+
notFound = false;
353+
if (emarker.getType() == LineMarker.WARNING) {
354+
isWarning = true;
355+
}
356+
problem = emarker.getProblem();
357+
//log(problem.toString());
358+
break;
353359
}
354-
problem = emarker.getProblem();
355-
//log(problem.toString());
356-
break;
357360
}
358361
}
359362

todo.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ X problem was that the example was creating files inside Processing.app
55
X Casey reports that exported app still asks to download Java
66
X could this be a JOGL bug (linking against the app stub?)
77
X ran otool -L on the binaries and saw nothing
8+
X deal with ConcurrentModificationException in Editor
9+
X "Error repainting line range" and ConcurrentModificationException
10+
X https://github.com/processing/processing/issues/3726
811

912
gsoc
1013
X CM: Category dropdown alignment
1114
X https://github.com/processing/processing/issues/3644
1215
X https://github.com/processing/processing/pull/3666
1316
X https://github.com/processing/processing/pull/3669
17+
X finalize CM tab order
18+
X https://github.com/processing/processing/issues/3613
19+
X https://github.com/processing/processing/pull/3714
1420

1521
fixed in b5, but unconfirmed at press time
1622
X CM - Focus is shifted out of the filter field when something is searched

0 commit comments

Comments
 (0)