From 369b1c779f2c8528c9bdb5b1a2a865b892b5d0a1 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 09:37:45 -0400 Subject: [PATCH 01/24] fix the non-retina version of the icons --- java/src/processing/mode/java/pdex/CompletionPanel.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/java/src/processing/mode/java/pdex/CompletionPanel.java b/java/src/processing/mode/java/pdex/CompletionPanel.java index 736d8851b..564a757c0 100644 --- a/java/src/processing/mode/java/pdex/CompletionPanel.java +++ b/java/src/processing/mode/java/pdex/CompletionPanel.java @@ -265,10 +265,6 @@ public class CompletionPanel { } - /** - * Dynamic width of completion panel - * @return - width - */ private int calcWidth() { int maxWidth = 300; float min = 0; From 880edcdc9d4e5ceb37be46529507a473f8560c2d Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 09:44:28 -0400 Subject: [PATCH 02/24] only do update click when there are updates available --- app/src/processing/app/ui/EditorFooter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java index f81e41465..2d524f988 100644 --- a/app/src/processing/app/ui/EditorFooter.java +++ b/app/src/processing/app/ui/EditorFooter.java @@ -73,7 +73,7 @@ public class EditorFooter extends Box { Color[] tabColor = new Color[2]; Color updateColor; - int updateLeft, updateRight; + int updateLeft; Editor editor; @@ -191,7 +191,7 @@ public class EditorFooter extends Box { repaint(); } } - if (x > updateLeft) { + if (updateCount > 0 && x > updateLeft) { ContributionManager.openUpdates(); } } From 65059c6183d60162236f1f0547f12e30d0a38f17 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 09:50:16 -0400 Subject: [PATCH 03/24] Handle error checker toggle --- java/src/processing/mode/java/JavaEditor.java | 3 ++- .../src/processing/mode/java/pdex/ErrorCheckerService.java | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/src/processing/mode/java/JavaEditor.java b/java/src/processing/mode/java/JavaEditor.java index 2933ae363..7fb4e60e0 100644 --- a/java/src/processing/mode/java/JavaEditor.java +++ b/java/src/processing/mode/java/JavaEditor.java @@ -2729,13 +2729,14 @@ public class JavaEditor extends Editor { } + @Override protected void applyPreferences() { super.applyPreferences(); if (jmode != null) { jmode.loadPreferences(); Messages.log("Applying prefs"); // trigger it once to refresh UI - errorCheckerService.request(); + errorCheckerService.handleErrorCheckingToggle(); } } diff --git a/java/src/processing/mode/java/pdex/ErrorCheckerService.java b/java/src/processing/mode/java/pdex/ErrorCheckerService.java index 6b54a639d..18d8581d7 100644 --- a/java/src/processing/mode/java/pdex/ErrorCheckerService.java +++ b/java/src/processing/mode/java/pdex/ErrorCheckerService.java @@ -275,7 +275,6 @@ public class ErrorCheckerService { astGenerator.buildAST(lastCodeCheckResult.sourceCode, lastCodeCheckResult.compilationUnit); } - handleErrorCheckingToggle(); while (running) { try { @@ -1556,10 +1555,10 @@ public class ErrorCheckerService { return new String(p2, 0, index); } + public void handleErrorCheckingToggle() { if (!JavaMode.errorCheckEnabled) { - Messages.log(editor.getSketch().getName() + " Error Checker paused."); - //editor.clearErrorPoints(); + Messages.log(editor.getSketch().getName() + " Error Checker disabled."); editor.getErrorPoints().clear(); lastCodeCheckResult.problems.clear(); updateErrorTable(Collections.emptyList()); @@ -1567,7 +1566,7 @@ public class ErrorCheckerService { editor.getTextArea().repaint(); editor.repaintErrorBar(); } else { - Messages.log(editor.getSketch().getName() + " Error Checker resumed."); + Messages.log(editor.getSketch().getName() + " Error Checker enabled."); request(); } } From dfabd24f57ee1d85ec54a6ac484cbe3a40b7270f Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 09:51:17 -0400 Subject: [PATCH 04/24] Set error checker listeners only once --- java/src/processing/mode/java/JavaEditor.java | 19 +++++- .../mode/java/pdex/ErrorCheckerService.java | 63 ++++--------------- 2 files changed, 30 insertions(+), 52 deletions(-) diff --git a/java/src/processing/mode/java/JavaEditor.java b/java/src/processing/mode/java/JavaEditor.java index 7fb4e60e0..2c6878815 100644 --- a/java/src/processing/mode/java/JavaEditor.java +++ b/java/src/processing/mode/java/JavaEditor.java @@ -140,8 +140,15 @@ public class JavaEditor extends Editor { hasJavaTabs = checkForJavaTabs(); //initializeErrorChecker(); - errorCheckerService = new ErrorCheckerService(this); - errorCheckerService.start(); + { // Init error checker + errorCheckerService = new ErrorCheckerService(this); + Document currentDocument = currentDocument(); + if (currentDocument != null) { + errorCheckerService.addListener(currentDocument); + } + errorCheckerService.start(); + errorCheckerService.request(); + } // hack to add a JPanel to the right-hand side of the text area JPanel textAndError = new JPanel(); @@ -2330,10 +2337,18 @@ public class JavaEditor extends Editor { */ @Override public void setCode(SketchCode code) { + + Document oldDoc = code.getDocument(); + //System.out.println("tab switch: " + code.getFileName()); // set the new document in the textarea, etc. need to do this first super.setCode(code); + Document newDoc = code.getDocument(); + if (oldDoc != newDoc && errorCheckerService != null) { + errorCheckerService.addListener(newDoc); + } + // set line background colors for tab final JavaTextArea ta = getJavaTextArea(); // can be null when setCode is called the first time (in constructor) diff --git a/java/src/processing/mode/java/pdex/ErrorCheckerService.java b/java/src/processing/mode/java/pdex/ErrorCheckerService.java index 18d8581d7..63fd3dafc 100644 --- a/java/src/processing/mode/java/pdex/ErrorCheckerService.java +++ b/java/src/processing/mode/java/pdex/ErrorCheckerService.java @@ -235,7 +235,6 @@ public class ErrorCheckerService { astGenerator = new ASTGenerator(this); errorMsgSimplifier = new ErrorMessageSimplifier(); tempErrorLog = new TreeMap<>(); - sketchChangedListener = new SketchChangedListener(); // for (final SketchCode sc : editor.getSketch().getCode()) { // sc.getDocument().addDocumentListener(sketchChangedListener); // } @@ -287,16 +286,16 @@ public class ErrorCheckerService { try { Messages.log("Starting error check"); - lastCodeCheckResult = checkCode(); + CodeCheckResult result = checkCode(); if (!JavaMode.errorCheckEnabled) { lastCodeCheckResult.problems.clear(); Messages.log("Error Check disabled, so not updating UI."); } - checkForMissingImports(); + lastCodeCheckResult = result; - updateSketchCodeListeners(); + checkForMissingImports(lastCodeCheckResult); if (JavaMode.errorCheckEnabled) { if (scheduledUiUpdate != null) { @@ -319,7 +318,6 @@ public class ErrorCheckerService { editor.updateErrorBar(result.problems); editor.getTextArea().repaint(); editor.updateErrorToggle(result.containsErrors); - updateSketchCodeListeners(); } }); } @@ -375,35 +373,15 @@ public class ErrorCheckerService { } - protected void updateSketchCodeListeners() { - for (SketchCode sc : editor.getSketch().getCode()) { - SyntaxDocument doc = (SyntaxDocument) sc.getDocument(); - if (!hasSketchChangedListener(doc)) { - doc.addDocumentListener(sketchChangedListener); - } - } + public void addListener(Document doc) { + doc.addDocumentListener(sketchChangedListener); } - boolean hasSketchChangedListener(SyntaxDocument doc) { - if (doc != null && doc.getDocumentListeners() != null) { - for (DocumentListener dl : doc.getDocumentListeners()) { - if (dl.equals(sketchChangedListener)) { - return true; - } - } - } - return false; - } - - - protected void checkForMissingImports() { - // Atomic access - CodeCheckResult lastCodeCheckResult = this.lastCodeCheckResult; - + protected void checkForMissingImports(CodeCheckResult result) { if (Preferences.getBoolean(JavaMode.SUGGEST_IMPORTS_PREF)) { - for (Problem p : lastCodeCheckResult.problems) { - if(p.getIProblem().getID() == IProblem.UndefinedType) { + for (Problem p : result.problems) { + if (p.getIProblem().getID() == IProblem.UndefinedType) { String args[] = p.getIProblem().getArguments(); if (args.length > 0) { String missingClass = args[0]; @@ -423,37 +401,22 @@ public class ErrorCheckerService { } - protected SketchChangedListener sketchChangedListener; - protected class SketchChangedListener implements DocumentListener{ - - private SketchChangedListener(){ - } - + protected final DocumentListener sketchChangedListener = new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { - if (JavaMode.errorCheckEnabled) { - request(); - //log("doc insert update, man error check.."); - } + if (JavaMode.errorCheckEnabled) request(); } @Override public void removeUpdate(DocumentEvent e) { - if (JavaMode.errorCheckEnabled){ - request(); - //log("doc remove update, man error check.."); - } + if (JavaMode.errorCheckEnabled) request(); } @Override public void changedUpdate(DocumentEvent e) { - if (JavaMode.errorCheckEnabled){ - request(); - //log("doc changed update, man error check.."); - } + if (JavaMode.errorCheckEnabled) request(); } - - } + }; public static class CodeCheckResult { From ecf565019b00be9758d8d120d72cd5f676d604ce Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 09:59:26 -0400 Subject: [PATCH 05/24] fix the About screen, add retina support --- app/src/processing/app/ui/About.java | 33 ++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/app/src/processing/app/ui/About.java b/app/src/processing/app/ui/About.java index 4eda1206f..b87b375a5 100644 --- a/app/src/processing/app/ui/About.java +++ b/app/src/processing/app/ui/About.java @@ -26,7 +26,11 @@ import java.awt.Color; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; import java.awt.Window; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -65,23 +69,38 @@ public class About extends Window { } }); + addKeyListener(new KeyAdapter() { + public void keyTyped(KeyEvent e) { + System.out.println(e); + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + dispose(); + } + } + }); + // Dimension screen = Toolkit.getScreenSize(); // setBounds((screen.width-width)/2, (screen.height-height)/2, width, height); - setLocationRelativeTo(null); + setSize(width, height); +// setLocationRelativeTo(null); + setLocationRelativeTo(frame); setVisible(true); + requestFocus(); } public void paint(Graphics g) { - g.drawImage(icon.getImage(), 0, 0, width, height, null); + Graphics2D g2 = Toolkit.prepareGraphics(g); + g2.scale(0.5, 0.5); -// Graphics2D g2 = (Graphics2D) g; // g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, -// RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); +// RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); - g.setFont(Toolkit.getSansFont(Font.PLAIN, 10)); - //g.setFont(new Font("SansSerif", Font.PLAIN, 10)); //$NON-NLS-1$ - g.setColor(Color.white); + g.drawImage(icon.getImage(), 0, 0, width, height, null); +// g.setColor(Color.ORANGE); +// g.fillRect(0, 0, width, height); + + g.setFont(Toolkit.getSansFont(12, Font.PLAIN)); + g.setColor(Color.WHITE); g.drawString(Base.getVersionName(), 26, 29); } } \ No newline at end of file From b67b0103011404d0e6c74095640580a17ab432a2 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 10:08:40 -0400 Subject: [PATCH 06/24] Do not follow symlinks when deleting directories --- app/src/processing/app/Util.java | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/app/src/processing/app/Util.java b/app/src/processing/app/Util.java index 8e51428a0..d1d1300c2 100644 --- a/app/src/processing/app/Util.java +++ b/app/src/processing/app/Util.java @@ -23,6 +23,8 @@ package processing.app; import java.io.*; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.Enumeration; import java.util.Vector; import java.util.zip.*; @@ -301,7 +303,7 @@ public class Util { /** * Remove all files in a directory and the directory itself. - * Prints error messages with failed filenames. + * Prints error messages with failed filenames. Does not follow symlinks. */ static public boolean removeDir(File dir) { return removeDir(dir, true); @@ -310,22 +312,25 @@ public class Util { /** * Remove all files in a directory and the directory itself. * Optinally prints error messages with failed filenames. + * Does not follow symlinks. */ static public boolean removeDir(File dir, boolean printErrorMessages) { if (!dir.exists()) return true; boolean result = true; - File[] files = dir.listFiles(); - if (files != null) { - for (File child : files) { - if (child.isFile()) { - boolean deleted = child.delete(); - if (!deleted && printErrorMessages) { - System.err.println("Could not delete " + child.getAbsolutePath()); + if (!Files.isSymbolicLink(dir.toPath())) { + File[] files = dir.listFiles(); + if (files != null) { + for (File child : files) { + if (child.isFile()) { + boolean deleted = child.delete(); + if (!deleted && printErrorMessages) { + System.err.println("Could not delete " + child.getAbsolutePath()); + } + result &= deleted; + } else if (child.isDirectory()) { + result &= removeDir(child, printErrorMessages); } - result &= deleted; - } else if (child.isDirectory()) { - result &= removeDir(child, printErrorMessages); } } } From 8fbdddc4295b951a6f6a2b91bbbadd1be60a6a22 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 10:32:36 -0400 Subject: [PATCH 07/24] this is problematic on non-retina displays --- app/src/processing/app/ui/About.java | 6 ++---- todo.txt | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/ui/About.java b/app/src/processing/app/ui/About.java index b87b375a5..5bedf8825 100644 --- a/app/src/processing/app/ui/About.java +++ b/app/src/processing/app/ui/About.java @@ -26,8 +26,6 @@ import java.awt.Color; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; import java.awt.Window; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -89,8 +87,8 @@ public class About extends Window { public void paint(Graphics g) { - Graphics2D g2 = Toolkit.prepareGraphics(g); - g2.scale(0.5, 0.5); +// Graphics2D g2 = Toolkit.prepareGraphics(g); +// g2.scale(0.5, 0.5); // g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, // RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); diff --git a/todo.txt b/todo.txt index fa32f37ca..bfd436b59 100644 --- a/todo.txt +++ b/todo.txt @@ -26,6 +26,8 @@ o total number of updates available is not correct? (may be fixed) o ArrayIndexOutOfBoundsException freak out when clicking the header line o think this was on name, with libraries, but not sure X should be fixed with the updates from Jakub +X error checker updates for toggle and listeners +X https://github.com/processing/processing/pull/3915 gui X distinguish errors and warnings @@ -98,6 +100,8 @@ _ mouse events (i.e. toggle breakpoint) seem to be firing twice 3.0 final _ https://github.com/processing/processing/milestones/3.0%20final +_ Windows suggests "Documents" as a new location for the sketchbook +_ maybe prevent users from accepting that? _ completion panel X what should the background color be? _ test fg/bg color on other operating systems From dc7d98e2ad0c29e57745f2afe07792cb848dc608 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 10:38:48 -0400 Subject: [PATCH 08/24] About screen looking hideous on Windwos --- app/src/processing/app/ui/About.java | 7 +++++-- todo.txt | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/ui/About.java b/app/src/processing/app/ui/About.java index 5bedf8825..a0e8b581c 100644 --- a/app/src/processing/app/ui/About.java +++ b/app/src/processing/app/ui/About.java @@ -26,6 +26,8 @@ import java.awt.Color; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; import java.awt.Window; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -90,8 +92,9 @@ public class About extends Window { // Graphics2D g2 = Toolkit.prepareGraphics(g); // g2.scale(0.5, 0.5); -// g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, -// RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g.drawImage(icon.getImage(), 0, 0, width, height, null); // g.setColor(Color.ORANGE); diff --git a/todo.txt b/todo.txt index bfd436b59..6052ee7e8 100644 --- a/todo.txt +++ b/todo.txt @@ -18,6 +18,8 @@ X https://github.com/processing/processing/issues/3895 X https://github.com/processing/processing/pull/3897 X Clean up delete dir function X https://github.com/processing/processing/pull/3910 +X don't follow symlinks when deleting directories +X https://github.com/processing/processing/pull/3916 X show number of updates available in the footer X https://github.com/processing/processing/issues/3518 X https://github.com/processing/processing/pull/3896 From 4c0def59d3b20808cf1bb93c58d6ea7c84d55970 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 10:53:03 -0400 Subject: [PATCH 10/24] alternate versions for Windows/Linux/OS X --- app/src/processing/app/ui/About.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/processing/app/ui/About.java b/app/src/processing/app/ui/About.java index a0e8b581c..a84a680c5 100644 --- a/app/src/processing/app/ui/About.java +++ b/app/src/processing/app/ui/About.java @@ -37,6 +37,7 @@ import java.awt.event.MouseEvent; import javax.swing.ImageIcon; import processing.app.Base; +import processing.app.Platform; public class About extends Window { @@ -93,7 +94,10 @@ public class About extends Window { // g2.scale(0.5, 0.5); Graphics2D g2 = (Graphics2D) g; + // OS X looks better doing its own thing, Windows and Linux need AA g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + Platform.isMacOS() ? + RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT : RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g.drawImage(icon.getImage(), 0, 0, width, height, null); From 3df9af779e1ac41bee88f72158c4a70faf1d78c3 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 11:06:57 -0400 Subject: [PATCH 11/24] Fix file counting in change detector --- app/src/processing/app/Sketch.java | 77 +++++++++++-------- app/src/processing/app/ui/ChangeDetector.java | 20 ++--- 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 8adcb7993..c3d6382f5 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -39,6 +39,7 @@ import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.*; +import java.util.ArrayList; import java.util.List; import javax.swing.*; @@ -143,44 +144,19 @@ public class Sketch { codeFolder = new File(folder, "code"); dataFolder = new File(folder, "data"); - // get list of files in the sketch folder - String list[] = folder.list(); + List filenames = new ArrayList<>(); + List extensions = new ArrayList<>(); - // reset these because load() may be called after an - // external editor event. (fix for 0099) - codeCount = 0; + getSketchCodeFiles(filenames, extensions); - code = new SketchCode[list.length]; + codeCount = filenames.size(); + code = new SketchCode[codeCount]; - String[] extensions = mode.getExtensions(); - - for (String filename : list) { - // Ignoring the dot prefix files is especially important to avoid files - // with the ._ prefix on Mac OS X. (You'll see this with Mac files on - // non-HFS drives, i.e. a thumb drive formatted FAT32.) - if (filename.startsWith(".")) continue; - - // Don't let some wacko name a directory blah.pde or bling.java. - if (new File(folder, filename).isDirectory()) continue; - - // figure out the name without any extension - String base = filename; - // now strip off the .pde and .java extensions - for (String extension : extensions) { - if (base.toLowerCase().endsWith("." + extension)) { - base = base.substring(0, base.length() - (extension.length() + 1)); - - // Don't allow people to use files with invalid names, since on load, - // it would be otherwise possible to sneak in nasty filenames. [0116] - if (isSanitaryName(base)) { - code[codeCount++] = - new SketchCode(new File(folder, filename), extension); - } - } - } + for (int i = 0; i < codeCount; i++) { + String filename = filenames.get(i); + String extension = extensions.get(i); + code[i] = new SketchCode(new File(folder, filename), extension); } - // Remove any code that wasn't proper - code = (SketchCode[]) PApplet.subset(code, 0, codeCount); // move the main class to the first tab // start at 1, if it's at zero, don't bother @@ -204,6 +180,39 @@ public class Sketch { } + public void getSketchCodeFiles(List outFilenames, + List outExtensions) { + // get list of files in the sketch folder + String list[] = folder.list(); + + for (String filename : list) { + // Ignoring the dot prefix files is especially important to avoid files + // with the ._ prefix on Mac OS X. (You'll see this with Mac files on + // non-HFS drives, i.e. a thumb drive formatted FAT32.) + if (filename.startsWith(".")) continue; + + // Don't let some wacko name a directory blah.pde or bling.java. + if (new File(folder, filename).isDirectory()) continue; + + // figure out the name without any extension + String base = filename; + // now strip off the .pde and .java extensions + for (String extension : mode.getExtensions()) { + if (base.toLowerCase().endsWith("." + extension)) { + base = base.substring(0, base.length() - (extension.length() + 1)); + + // Don't allow people to use files with invalid names, since on load, + // it would be otherwise possible to sneak in nasty filenames. [0116] + if (isSanitaryName(base)) { + if (outFilenames != null) outFilenames.add(filename); + if (outExtensions != null) outExtensions.add(extension); + } + } + } + } + } + + /** * Reload the current sketch. Used to update the text area when * an external editor is in use. diff --git a/app/src/processing/app/ui/ChangeDetector.java b/app/src/processing/app/ui/ChangeDetector.java index 081f42334..866d2ffc4 100644 --- a/app/src/processing/app/ui/ChangeDetector.java +++ b/app/src/processing/app/ui/ChangeDetector.java @@ -5,7 +5,6 @@ import java.awt.Frame; import java.awt.event.WindowEvent; import java.awt.event.WindowFocusListener; import java.io.File; -import java.io.FilenameFilter; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; @@ -79,19 +78,12 @@ public class ChangeDetector implements WindowFocusListener { private boolean checkFileCount() { // check file count first - File sketchFolder = sketch.getFolder(); - File[] sketchFiles = sketchFolder.listFiles(new FilenameFilter() { - @Override - public boolean accept(File dir, String filename) { - for (String ext : editor.getMode().getExtensions()) { - if (filename.toLowerCase().endsWith(ext.toLowerCase())) { - return true; - } - } - return false; - } - }); - int fileCount = sketchFiles.length; + + List filenames = new ArrayList<>(); + + sketch.getSketchCodeFiles(filenames, null); + + int fileCount = filenames.size(); // Was considering keeping track of the last "known" number of files // (instead of using sketch.getCodeCount() here) in case the user From 31200a154eefef98219f6325293d3ec40e2c457c Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 11:36:55 -0400 Subject: [PATCH 12/24] set background color as backup, fixes #3919 --- app/src/processing/app/ui/EditorFooter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java index 2d524f988..546e5c84d 100644 --- a/app/src/processing/app/ui/EditorFooter.java +++ b/app/src/processing/app/ui/EditorFooter.java @@ -87,6 +87,7 @@ public class EditorFooter extends Box { int imageW, imageH; Image gradient; + Color bgColor; JPanel cardPanel; CardLayout cardLayout; @@ -172,6 +173,11 @@ public class EditorFooter extends Box { updateColor = mode.getColor("footer.updates.color"); gradient = mode.makeGradient("footer", 400, HIGH); + // Set the default background color in case the window size reported + // incorrectly by the OS, or we miss an update event of some kind + // https://github.com/processing/processing/issues/3919 + bgColor = mode.getColor("footer.gradient.bottom"); + setBackground(bgColor); } From 7576cf0077e399b8ffe453fa6feb415c851017b7 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 11:37:11 -0400 Subject: [PATCH 13/24] remove unused imports --- app/src/processing/app/Util.java | 1 - java/src/processing/mode/java/pdex/ErrorCheckerService.java | 1 - 2 files changed, 2 deletions(-) diff --git a/app/src/processing/app/Util.java b/app/src/processing/app/Util.java index d1d1300c2..4dd579781 100644 --- a/app/src/processing/app/Util.java +++ b/app/src/processing/app/Util.java @@ -24,7 +24,6 @@ package processing.app; import java.io.*; import java.nio.file.Files; -import java.nio.file.Path; import java.util.Enumeration; import java.util.Vector; import java.util.zip.*; diff --git a/java/src/processing/mode/java/pdex/ErrorCheckerService.java b/java/src/processing/mode/java/pdex/ErrorCheckerService.java index 63fd3dafc..44983d4ed 100644 --- a/java/src/processing/mode/java/pdex/ErrorCheckerService.java +++ b/java/src/processing/mode/java/pdex/ErrorCheckerService.java @@ -62,7 +62,6 @@ import processing.app.Preferences; import processing.app.Sketch; import processing.app.SketchCode; import processing.app.Util; -import processing.app.syntax.SyntaxDocument; import processing.app.ui.Editor; import processing.app.ui.EditorStatus; import processing.app.ui.ErrorTable; From 23c224ef374b155cc33e2071674e8b0f5036fca3 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 11:50:38 -0400 Subject: [PATCH 14/24] cleaning up --- core/todo.txt | 24 +++++++++--------------- todo.txt | 51 +++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/core/todo.txt b/core/todo.txt index 276166288..a6c67e5b5 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -28,6 +28,9 @@ o run only the necessary pieces on the EDT o in part because FX doesn't even use the EDT o re-check the Linux frame visibility stuff X cleaned most of this as far as we can go +o Ubuntu Unity prevents full screen from working properly +X https://github.com/processing/processing/issues/3158 +X can't fix; upstream problem, added to the wiki known @@ -35,9 +38,11 @@ _ window must close when using file dialogs with OpenGL on Windows _ https://github.com/processing/processing/issues/3831 _ P2D and P3D windows behave strangely when larger than the screen size _ https://github.com/processing/processing/issues/3401 +_ window loses focus after maximizing +_ https://github.com/processing/processing/issues/3339 -3.0 final +misc _ move blending calculations from PImage into PGraphics _ tricky because that means moving blend_resize() as well _ and should that live in PGraphics or be its own class or ?? @@ -54,6 +59,7 @@ _ SVG only exports last frame _ possibly because Java2D is disposing the Graphics2D in between? _ https://github.com/processing/processing/issues/3753 + javafx _ do we really need setTextFont/Size when we already have Impl? _ need keyPressed() to do lower and upper case @@ -83,19 +89,8 @@ _ javafx not supported with ARM (so we're screwed on raspberry pi) _ https://www.linkedin.com/pulse/oracle-just-removed-javafx-support-arm-jan-snelders -opengl -_ Use PBOs for async texture copy -_ https://github.com/processing/processing/issues/3569 -_ filter(PShader) broken in HiDPI mode -_ https://github.com/processing/processing/issues/3577 -_ hard crash at 1920x1080, mirrored, Casey's GT 650M 1GB -_ window loses focus after maximizing -_ https://github.com/processing/processing/issues/3339 -_ Implement standard cursor types in OpenGL -_ https://github.com/processing/processing/issues/3554 - - opengl questions +_ hard crash at 1920x1080, mirrored, Casey's GT 650M 1GB _ issues with how JOGL handles window layout/sizing _ https://github.com/processing/processing/issues/3401 _ exitCalled() and exitActual made public by Andres, breaks Python @@ -117,8 +112,6 @@ _ AMD Radeon HD 6770M was in the Oracle bug report _ https://github.com/processing/processing/issues/2186 _ https://bugs.openjdk.java.net/browse/JDK-8027391 _ test with JG's 13" retina laptop -_ Ubuntu Unity prevents full screen from working properly -_ https://github.com/processing/processing/issues/3158 graphics @@ -658,6 +651,7 @@ _ getInt() on categorial to return index? _ getCategories() and getCategory() methods to query names? + //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// diff --git a/todo.txt b/todo.txt index 6052ee7e8..2235031dc 100644 --- a/todo.txt +++ b/todo.txt @@ -30,6 +30,10 @@ o think this was on name, with libraries, but not sure X should be fixed with the updates from Jakub X error checker updates for toggle and listeners X https://github.com/processing/processing/pull/3915 +X file file counting in the change detector +X https://github.com/processing/processing/pull/3917 +X https://github.com/processing/processing/issues/3898 +X https://github.com/processing/processing/issues/3387 gui X distinguish errors and warnings @@ -78,6 +82,10 @@ X add 2x version of the icons X change selection highlight color o put some margin around it X https://github.com/processing/processing/issues/3906 +X completion panel +X what should the background color be? +X test fg/bg color on other operating systems +J fix icon sizes/design earlier/cleaning X list with contrib types separated is really wonky @@ -88,6 +96,13 @@ X remove the dated releases from download.processing.org X new Android release (EditorButton constructor changed) o JavaEditor has several null colors, remove color support o once the design is complete and we for sure do not need color +X remove deprecated methods +X do the right thing on passing around List vs ArrayList and others +o wonder if "Save As" is causing the problems with auto-reload +X found and fixed +X look at the sound library https://github.com/wirsing/ProcessingSound +o sound is not yet supported on Windows +X implement the new gui known issues @@ -102,19 +117,16 @@ _ mouse events (i.e. toggle breakpoint) seem to be firing twice 3.0 final _ https://github.com/processing/processing/milestones/3.0%20final -_ Windows suggests "Documents" as a new location for the sketchbook +_ Windows suggests "Documents" as a new location for the 3.0 sketchbook _ maybe prevent users from accepting that? -_ completion panel -X what should the background color be? -_ test fg/bg color on other operating systems -_ fix icon sizes/design +_ https://github.com/processing/processing/issues/3920 _ import suggestions box needs design review _ https://github.com/processing/processing/issues/3407 + + +gui _ different design of squiggly line _ easy to do inside JavaTextAreaPainter.paintSquiggle() - - -gui / post 3.0 _ build custom scroll bar since the OS versions are so ugly _ see notes in the 'dialogs' section below, implement our own option panes? _ tiny trail of dots when moving the selection bar up/down on retina @@ -156,8 +168,6 @@ _ https://github.com/processing/processing/issues/2886 pde/build _ ignore-tools in build.xml not being called for some reason -_ can't install processing-java into /usr/bin with El Capitan -_ https://github.com/processing/processing/issues/3497 _ when variables used in size(), getting exceptions instead of any warning _ https://github.com/processing/processing/issues/3311 _ crashed on startup w/ JavaScript mode as default b/c PdeKeyListener not found @@ -175,11 +185,11 @@ _ update license info to state gplv2 not v3 _ run through that online license checker _ save() and saveAs() need to be refactored _ https://github.com/processing/processing/issues/3843 - - -breakage -_ remove deprecated methods -_ do the right thing on passing around List vs ArrayList and others +_ clean out the repo +_ https://github.com/processing/processing/issues/1898 +_ search the source for 'applet' references (i.e. SVG docs) +_ update list of optional JRE files +_ https://github.com/processing/processing/issues/3288 _ PreferencesFrame is a misnomer (not a frame itself) _ change to PreferencesDialog, and make it a dialog? _ move Library to LibraryContribution and into contrib? @@ -189,23 +199,12 @@ from the todo list _ reas: comments go nasty when auto-formatted _ reas: code coloring sometimes disappears _ me: undo not in the correct location -_ implement the new gui _ drop XP support (but improve Windows 8 support? ouch) _ improve error message when creating a tab with the same name _ right now it's generic, based on "a file exists" _ don't allow users to create 'blah.java' when 'blah.pde' already in sketch -3.0 beta/final -_ wonder if "Save As" is causing the problems with auto-reload -_ look at the sound library https://github.com/wirsing/ProcessingSound -_ sound is not yet supported on Windows -_ clean out the repo -_ https://github.com/processing/processing/issues/1898 -_ search the source for 'applet' references (i.e. SVG docs) -_ update list of option JRE files -_ https://github.com/processing/processing/issues/3288 - sketchbook _ Mode.rebuildLibraryList() called too many times on startup? From 497c62881867bee602f69be18212a2a5a3fbab26 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 12:03:50 -0400 Subject: [PATCH 15/24] write release notes --- build/shared/revisions.txt | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index fb11dcb96..d846e6205 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,3 +1,109 @@ +PROCESSING 3.0 (REV 0246) - 30 September 2015 + +This one is huge. + +This document covers (in detail) the individual changes between releases. +For an overview abut what's new, different, and exceptional in 3.0, read: +https://github.com/processing/processing/wiki/Changes-in-3.0 + +Most of the changes from the previous beta involve the final beautification +of the GUI, and the beatification of the error checker and auto-completion +features. + + +[ gui updates and fixes ] + ++ "Saving" messages never clear on "Save As" + https://github.com/processing/processing/issues/3861 + ++ Show number of updates available in the footer + https://github.com/processing/processing/issues/3518 + https://github.com/processing/processing/pull/3896 + https://github.com/processing/processing/pull/3901 + ++ Click the "Updates" item in the footer to open the Contribution Manager + ++ Make breakpoints more prominent + https://github.com/processing/processing/issues/3307 + ++ Implement the side gradient on the Editor + ++ Replace startup/about screen (1x and 2x versions) + https://github.com/processing/processing/issues/3665 + ++ Implement splash screen on OS X. Shout out to this article: + http://www.randelshofer.ch/oop/javasplash/javasplash.html + ++ Make the left edge of the Console match the Error List + https://github.com/processing/processing/issues/3904 + + +[ errors and warnings: the checking and completion story ] + ++ error checker/suggestions fixes + https://github.com/processing/processing/pull/3871 + https://github.com/processing/processing/pull/3879 + ++ Hide useless error in error checker + https://github.com/processing/processing/pull/3887 + ++ Error checker updates for toggle and listeners + https://github.com/processing/processing/pull/3915 + ++ If fewer lines in sketch than can be shown in window, show ticks adjacent + https://github.com/processing/processing/pull/3903 + ++ Distinguish errors and warnings in the error list + https://github.com/processing/processing/issues/3406 + ++ Clicking an error or warning should give the focus back to the editor + https://github.com/processing/processing/pull/3905 + ++ Fix placement and visual design when showing error on hover + https://github.com/processing/processing/issues/3173 + ++ Fix the design of the completions window, new icons, etc + https://github.com/processing/processing/issues/3906 + ++ Update status error/warning when changing the line + https://github.com/processing/processing/pull/3907 + + +[ contribution manager ] + ++ Contributions filter ignored after clicking Install + https://github.com/processing/processing/issues/3826 + https://github.com/processing/processing/pull/3872 + https://github.com/processing/processing/pull/3883 + ++ Exception in thread "Contribution List Downloader" + https://github.com/processing/processing/issues/3882 + https://github.com/processing/processing/pull/3884 + ++ Grab bag of Contribution Manager fixes + https://github.com/processing/processing/issues/3895 + https://github.com/processing/processing/pull/3897 + ++ ArrayIndexOutOfBoundsException freak out when clicking the header line + + +[ plumbing ] + ++ Fix nasty file counting problem in the change detector + https://github.com/processing/processing/pull/3917 + https://github.com/processing/processing/issues/3898 + https://github.com/processing/processing/issues/3387 + ++ Clean up delete dir function + https://github.com/processing/processing/pull/3910 + ++ Don't follow symlinks when deleting directories + https://github.com/processing/processing/pull/3916 + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + PROCESSING 3.0b7 (REV 0245) - 22 September 2015 It's 8:57pm and Jakub and Ben are still holed up at Fathom's studio in Boston. From 1432fb92e3d6210e5a415dc4bc6f11babe62a399 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 13:33:33 -0400 Subject: [PATCH 16/24] new icons for the debugger window --- .../processing/mode/java/VariableInspector.java | 4 ++-- java/theme/var-icons.gif | Bin 5152 -> 0 bytes 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 java/theme/var-icons.gif diff --git a/java/src/processing/mode/java/VariableInspector.java b/java/src/processing/mode/java/VariableInspector.java index d82aff12f..e9e30a4e7 100644 --- a/java/src/processing/mode/java/VariableInspector.java +++ b/java/src/processing/mode/java/VariableInspector.java @@ -465,10 +465,10 @@ public class VariableInspector extends JDialog { */ class OutlineRenderer implements RenderDataProvider { Icon[][] icons; - static final int ICON_SIZE = 16; // icon size (square, size=width=height) + static final int ICON_SIZE = 16; OutlineRenderer() { - icons = loadIcons("theme/var-icons.gif"); + icons = loadIcons("theme/variables-1x.png"); } /** diff --git a/java/theme/var-icons.gif b/java/theme/var-icons.gif deleted file mode 100644 index 1d0086a38ebb728a2a44d3b4d510cf12992fc1dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5152 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 Date: Wed, 30 Sep 2015 13:35:38 -0400 Subject: [PATCH 17/24] Fix welcome directory picker --- core/src/processing/core/PApplet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index a55efbf6f..6741c8407 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -6408,7 +6408,7 @@ public class PApplet implements PConstants { fileChooser.setDialogTitle(prompt); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (defaultSelection != null) { - fileChooser.setSelectedFile(defaultSelection); + fileChooser.setCurrentDirectory(defaultSelection); } int result = fileChooser.showOpenDialog(parentFrame); From b993c6eec8d80650e4ba472c7049eb7780afbba5 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 13:48:07 -0400 Subject: [PATCH 18/24] set a better minimum size for the number of updates available --- app/src/processing/app/ui/EditorFooter.java | 3 +++ build/shared/revisions.txt | 3 +++ todo.txt | 21 ++++++++++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java index 546e5c84d..80c5c50dc 100644 --- a/app/src/processing/app/ui/EditorFooter.java +++ b/app/src/processing/app/ui/EditorFooter.java @@ -299,6 +299,9 @@ public class EditorFooter extends Box { final String updateLabel = "Updates"; String updatesStr = "" + updateCount; double countWidth = font.getStringBounds(updatesStr, frc).getWidth(); + if (fontAscent > countWidth) { + countWidth = fontAscent; + } float diameter = (float) (countWidth * 1.65f); float ex = getWidth() - Editor.RIGHT_GUTTER - diameter; float ey = (getHeight() - diameter) / 2; diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index d846e6205..64143b349 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -37,6 +37,9 @@ features. + Make the left edge of the Console match the Error List https://github.com/processing/processing/issues/3904 ++ Windows suggests "Documents" as a new location for the 3.0 sketchbook + https://github.com/processing/processing/issues/3920 + [ errors and warnings: the checking and completion story ] diff --git a/todo.txt b/todo.txt index 2235031dc..bd36daf07 100644 --- a/todo.txt +++ b/todo.txt @@ -34,6 +34,9 @@ X file file counting in the change detector X https://github.com/processing/processing/pull/3917 X https://github.com/processing/processing/issues/3898 X https://github.com/processing/processing/issues/3387 +X Windows suggests "Documents" as a new location for the 3.0 sketchbook +X maybe prevent users from accepting that? +X https://github.com/processing/processing/issues/3920 gui X distinguish errors and warnings @@ -86,6 +89,7 @@ X completion panel X what should the background color be? X test fg/bg color on other operating systems J fix icon sizes/design +X set a better minimum size for the number of updates available earlier/cleaning X list with contrib types separated is really wonky @@ -117,14 +121,25 @@ _ mouse events (i.e. toggle breakpoint) seem to be firing twice 3.0 final _ https://github.com/processing/processing/milestones/3.0%20final -_ Windows suggests "Documents" as a new location for the 3.0 sketchbook -_ maybe prevent users from accepting that? -_ https://github.com/processing/processing/issues/3920 + + +3.0.1 +_ error checkers/suggestions not including the library path +_ https://github.com/processing/processing/issues/3924 _ import suggestions box needs design review _ https://github.com/processing/processing/issues/3407 +debug +_ debugger deadlocks when choosing "Step Into" on println() +_ https://github.com/processing/processing/issues/3923 + + gui +_ fix background color for selected lines in VariableInspector +_ https://github.com/processing/processing/issues/3925 +_ implement 2x versions of the icons for the debugger window/variable inspector +_ https://github.com/processing/processing/issues/3921 _ different design of squiggly line _ easy to do inside JavaTextAreaPainter.paintSquiggle() _ build custom scroll bar since the OS versions are so ugly From 6d7c1c79c5b591b9ff7060ae6789a75bb2a49d26 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 14:12:45 -0400 Subject: [PATCH 19/24] adding issues found during the release process --- core/todo.txt | 2 +- todo.txt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/todo.txt b/core/todo.txt index a6c67e5b5..2ec573242 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,4 +1,4 @@ -0246 the papal visit +0246 the papal visit (3.0) X implement high-performance/async image saving X Use PBOs for async texture copy X https://github.com/processing/processing/issues/3569 diff --git a/todo.txt b/todo.txt index bd36daf07..7dd7b991a 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,4 @@ -0246 the holy land +0246 the holy land (3.0) X "Saving" messages never clear on "Save As" X https://github.com/processing/processing/issues/3861 X error checker/suggestions fixes @@ -128,11 +128,15 @@ _ error checkers/suggestions not including the library path _ https://github.com/processing/processing/issues/3924 _ import suggestions box needs design review _ https://github.com/processing/processing/issues/3407 +_ update CM entries when sketchbook location changes +_ https://github.com/processing/processing/issues/3927 -debug +run/debug _ debugger deadlocks when choosing "Step Into" on println() _ https://github.com/processing/processing/issues/3923 +_ Tweak Mode sometimes freezes while running, require a force quit +_ https://github.com/processing/processing/issues/3928 gui From 8e11079886782ed977697546dc4f369c8a44b996 Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 14:42:25 -0400 Subject: [PATCH 20/24] Include Example packs into update count --- app/src/processing/app/contrib/ContributionListing.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/processing/app/contrib/ContributionListing.java b/app/src/processing/app/contrib/ContributionListing.java index 8d94f8248..cf35ff628 100644 --- a/app/src/processing/app/contrib/ContributionListing.java +++ b/app/src/processing/app/contrib/ContributionListing.java @@ -585,6 +585,11 @@ public class ContributionListing { count++; } } + for (ExamplesContribution ec : base.getExampleContribs()) { + if (hasUpdates(ec)) { + count++; + } + } return count; } From cb7aa678ee877ae36195fbffee8ff82a9fccb161 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 14:53:05 -0400 Subject: [PATCH 21/24] more error notes, force reference download for 3.0 release process --- build/build.xml | 2 +- todo.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/build.xml b/build/build.xml index 4ff38830e..0e145eb69 100644 --- a/build/build.xml +++ b/build/build.xml @@ -393,9 +393,9 @@ + Date: Wed, 30 Sep 2015 15:13:30 -0400 Subject: [PATCH 22/24] starting the next release --- app/src/processing/app/Base.java | 4 +- build/shared/revisions.txt | 2 +- core/done.txt | 35 ++++++++++ core/todo.txt | 34 +--------- done.txt | 111 +++++++++++++++++++++++++++++++ todo.txt | 110 +----------------------------- 6 files changed, 151 insertions(+), 145 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 112c96193..df06857e6 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -55,9 +55,9 @@ import processing.data.StringList; public class Base { // Added accessors for 0218 because the UpdateCheck class was not properly // updating the values, due to javac inlining the static final values. - static private final int REVISION = 246; + static private final int REVISION = 247; /** This might be replaced by main() if there's a lib/version.txt file. */ - static private String VERSION_NAME = "0246"; //$NON-NLS-1$ + static private String VERSION_NAME = "0247"; //$NON-NLS-1$ /** Set true if this a proper release rather than a numbered revision. */ /** True if heavy debugging error/log messages are enabled */ diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 64143b349..11a3ded0a 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,4 @@ -PROCESSING 3.0 (REV 0246) - 30 September 2015 +PROCESSING 3.0 (REV 0246) - 30 September 2015, 3pm ET This one is huge. diff --git a/core/done.txt b/core/done.txt index edd46e6af..6e4efb735 100644 --- a/core/done.txt +++ b/core/done.txt @@ -1,3 +1,38 @@ +0246 the papal visit (3.0) +X implement high-performance/async image saving +X Use PBOs for async texture copy +X https://github.com/processing/processing/issues/3569 +X https://github.com/processing/processing/pull/3863 +X https://github.com/processing/processing/pull/3869 +X Textures disappearing in beta 7 (might be WeakReference regression) +X https://github.com/processing/processing/issues/3858 +X https://github.com/processing/processing/pull/3874 +X https://github.com/processing/processing/pull/3875 +X Convert all documented hacky keys in OpenGL +X https://github.com/processing/processing/pull/3888 +X Frame size displays incorrectly if surface.setResizable(true) +X https://github.com/processing/processing/issues/3868 +X https://github.com/processing/processing/pull/3880 +X displayWidth, displayHeight, full screen, display number +X https://github.com/processing/processing/pull/3893 +X https://github.com/processing/processing/issues/3865 +X OpenGL with fullScreen() always opens on default display +X https://github.com/processing/processing/issues/3889 +X https://github.com/processing/processing/issues/3797 +X https://github.com/processing/processing/pull/3892 + +cleaning +o move AWT image loading into PImageAWT +o look into how GL and FX will handle from there +o run only the necessary pieces on the EDT +o in part because FX doesn't even use the EDT +o re-check the Linux frame visibility stuff +X cleaned most of this as far as we can go +o Ubuntu Unity prevents full screen from working properly +X https://github.com/processing/processing/issues/3158 +X can't fix; upstream problem, added to the wiki + + 0245 core (3.0b7) X surface.setLocation(x,y) not working with the default renderer X https://github.com/processing/processing/issues/3821 diff --git a/core/todo.txt b/core/todo.txt index 2ec573242..c230e295d 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,36 +1,4 @@ -0246 the papal visit (3.0) -X implement high-performance/async image saving -X Use PBOs for async texture copy -X https://github.com/processing/processing/issues/3569 -X https://github.com/processing/processing/pull/3863 -X https://github.com/processing/processing/pull/3869 -X Textures disappearing in beta 7 (might be WeakReference regression) -X https://github.com/processing/processing/issues/3858 -X https://github.com/processing/processing/pull/3874 -X https://github.com/processing/processing/pull/3875 -X Convert all documented hacky keys in OpenGL -X https://github.com/processing/processing/pull/3888 -X Frame size displays incorrectly if surface.setResizable(true) -X https://github.com/processing/processing/issues/3868 -X https://github.com/processing/processing/pull/3880 -X displayWidth, displayHeight, full screen, display number -X https://github.com/processing/processing/pull/3893 -X https://github.com/processing/processing/issues/3865 -X OpenGL with fullScreen() always opens on default display -X https://github.com/processing/processing/issues/3889 -X https://github.com/processing/processing/issues/3797 -X https://github.com/processing/processing/pull/3892 - -cleaning -o move AWT image loading into PImageAWT -o look into how GL and FX will handle from there -o run only the necessary pieces on the EDT -o in part because FX doesn't even use the EDT -o re-check the Linux frame visibility stuff -X cleaned most of this as far as we can go -o Ubuntu Unity prevents full screen from working properly -X https://github.com/processing/processing/issues/3158 -X can't fix; upstream problem, added to the wiki +0247 (3.0.1) known diff --git a/done.txt b/done.txt index cde20c1b0..26cc9862c 100644 --- a/done.txt +++ b/done.txt @@ -1,3 +1,114 @@ +0246 the holy land (3.0) +X "Saving" messages never clear on "Save As" +X https://github.com/processing/processing/issues/3861 +X error checker/suggestions fixes +X https://github.com/processing/processing/pull/3871 +X https://github.com/processing/processing/pull/3879 +X contributions filter is ignored after clicking Install +X https://github.com/processing/processing/issues/3826 +X https://github.com/processing/processing/pull/3872 +X https://github.com/processing/processing/pull/3883 +X Exception in thread "Contribution List Downloader" +X https://github.com/processing/processing/issues/3882 +X https://github.com/processing/processing/pull/3884 +X Hide useless error in error checker +X https://github.com/processing/processing/pull/3887 +X grab bag of CM work from Jakub +X https://github.com/processing/processing/issues/3895 +X https://github.com/processing/processing/pull/3897 +X Clean up delete dir function +X https://github.com/processing/processing/pull/3910 +X don't follow symlinks when deleting directories +X https://github.com/processing/processing/pull/3916 +X show number of updates available in the footer +X https://github.com/processing/processing/issues/3518 +X https://github.com/processing/processing/pull/3896 +X https://github.com/processing/processing/pull/3901 +o total number of updates available is not correct? (may be fixed) +o ArrayIndexOutOfBoundsException freak out when clicking the header line +o think this was on name, with libraries, but not sure +X should be fixed with the updates from Jakub +X error checker updates for toggle and listeners +X https://github.com/processing/processing/pull/3915 +X file file counting in the change detector +X https://github.com/processing/processing/pull/3917 +X https://github.com/processing/processing/issues/3898 +X https://github.com/processing/processing/issues/3387 +X Windows suggests "Documents" as a new location for the 3.0 sketchbook +X maybe prevent users from accepting that? +X https://github.com/processing/processing/issues/3920 + +gui +X distinguish errors and warnings +X https://github.com/processing/processing/issues/3406 +X make breakpoints more prominent +X https://github.com/processing/processing/issues/3307 (comp is set) +X clean up statusMessage() inside JavaEditor +o do we want to bring back the delays? +X implement side gradient on the editor +X if fewer lines in sketch than can be shown in window, show ticks adjacent +X error/warning location is awkward when no scroll bar is in use +X when only one screen-full, show ticks at exact location +X simpler/less confusing to not show at all? +X MarkerColumn.recalculateMarkerPositions() +X https://github.com/processing/processing/pull/3903 +X Update status error/warning when changing the line +X https://github.com/processing/processing/pull/3907 +X Update status error/warning when changing the line +X when moving away from an error/warning line, de-select it below +X selecting a warning should also show the warning in the status area +X https://github.com/processing/processing/pull/3907 +X clicking an error or warning should give the focus back to the editor +X https://github.com/processing/processing/pull/3905 +X replace startup/about screen (1x and 2x versions) +X change 'alpha' to correct name +X also change the revision in the "about processing" dialog +X https://github.com/processing/processing/issues/3665 +X implement splash screen on OS X +X http://www.randelshofer.ch/oop/javasplash/javasplash.html +X also implement special retina version +X Fix placement and visual design when showing error on hover +X https://github.com/processing/processing/issues/3173 +X implement custom tooltip for error/warning hover +X applies to both MarkerColumn and JavaTextAreaPainter +X make gutter of console match error list +X https://github.com/processing/processing/issues/3904 +o bring back the # of updates on the update tab +o use this instead of the 'icon' stuff? +o or in addition, since only the 'updates' tab has it +X https://github.com/processing/processing/issues/3855 +X for updates available, have it be clickable to open the manager +X fix the design of the completions window +X remove extra border around the outside +X change font +X add 2x version of the icons +X change selection highlight color +o put some margin around it +X https://github.com/processing/processing/issues/3906 +X completion panel +X what should the background color be? +X test fg/bg color on other operating systems +J fix icon sizes/design +X set a better minimum size for the number of updates available + +earlier/cleaning +X list with contrib types separated is really wonky +o do we keep the list? +o does it even work for different contrib types? +X cleaned this up in the last release +X remove the dated releases from download.processing.org +X new Android release (EditorButton constructor changed) +o JavaEditor has several null colors, remove color support +o once the design is complete and we for sure do not need color +X remove deprecated methods +X do the right thing on passing around List vs ArrayList and others +o wonder if "Save As" is causing the problems with auto-reload +X found and fixed +X look at the sound library https://github.com/wirsing/ProcessingSound +o sound is not yet supported on Windows +X implement the new gui + + 0245 (3.0b7) X add jar files from 'code' folder to the library path X Code editor wrongly detects errors for libraries in code folder diff --git a/todo.txt b/todo.txt index 6d4db7b94..e27b2b5f7 100644 --- a/todo.txt +++ b/todo.txt @@ -1,112 +1,4 @@ -0246 the holy land (3.0) -X "Saving" messages never clear on "Save As" -X https://github.com/processing/processing/issues/3861 -X error checker/suggestions fixes -X https://github.com/processing/processing/pull/3871 -X https://github.com/processing/processing/pull/3879 -X contributions filter is ignored after clicking Install -X https://github.com/processing/processing/issues/3826 -X https://github.com/processing/processing/pull/3872 -X https://github.com/processing/processing/pull/3883 -X Exception in thread "Contribution List Downloader" -X https://github.com/processing/processing/issues/3882 -X https://github.com/processing/processing/pull/3884 -X Hide useless error in error checker -X https://github.com/processing/processing/pull/3887 -X grab bag of CM work from Jakub -X https://github.com/processing/processing/issues/3895 -X https://github.com/processing/processing/pull/3897 -X Clean up delete dir function -X https://github.com/processing/processing/pull/3910 -X don't follow symlinks when deleting directories -X https://github.com/processing/processing/pull/3916 -X show number of updates available in the footer -X https://github.com/processing/processing/issues/3518 -X https://github.com/processing/processing/pull/3896 -X https://github.com/processing/processing/pull/3901 -o total number of updates available is not correct? (may be fixed) -o ArrayIndexOutOfBoundsException freak out when clicking the header line -o think this was on name, with libraries, but not sure -X should be fixed with the updates from Jakub -X error checker updates for toggle and listeners -X https://github.com/processing/processing/pull/3915 -X file file counting in the change detector -X https://github.com/processing/processing/pull/3917 -X https://github.com/processing/processing/issues/3898 -X https://github.com/processing/processing/issues/3387 -X Windows suggests "Documents" as a new location for the 3.0 sketchbook -X maybe prevent users from accepting that? -X https://github.com/processing/processing/issues/3920 - -gui -X distinguish errors and warnings -X https://github.com/processing/processing/issues/3406 -X make breakpoints more prominent -X https://github.com/processing/processing/issues/3307 (comp is set) -X clean up statusMessage() inside JavaEditor -o do we want to bring back the delays? -X implement side gradient on the editor -X if fewer lines in sketch than can be shown in window, show ticks adjacent -X error/warning location is awkward when no scroll bar is in use -X when only one screen-full, show ticks at exact location -X simpler/less confusing to not show at all? -X MarkerColumn.recalculateMarkerPositions() -X https://github.com/processing/processing/pull/3903 -X Update status error/warning when changing the line -X https://github.com/processing/processing/pull/3907 -X Update status error/warning when changing the line -X when moving away from an error/warning line, de-select it below -X selecting a warning should also show the warning in the status area -X https://github.com/processing/processing/pull/3907 -X clicking an error or warning should give the focus back to the editor -X https://github.com/processing/processing/pull/3905 -X replace startup/about screen (1x and 2x versions) -X change 'alpha' to correct name -X also change the revision in the "about processing" dialog -X https://github.com/processing/processing/issues/3665 -X implement splash screen on OS X -X http://www.randelshofer.ch/oop/javasplash/javasplash.html -X also implement special retina version -X Fix placement and visual design when showing error on hover -X https://github.com/processing/processing/issues/3173 -X implement custom tooltip for error/warning hover -X applies to both MarkerColumn and JavaTextAreaPainter -X make gutter of console match error list -X https://github.com/processing/processing/issues/3904 -o bring back the # of updates on the update tab -o use this instead of the 'icon' stuff? -o or in addition, since only the 'updates' tab has it -X https://github.com/processing/processing/issues/3855 -X for updates available, have it be clickable to open the manager -X fix the design of the completions window -X remove extra border around the outside -X change font -X add 2x version of the icons -X change selection highlight color -o put some margin around it -X https://github.com/processing/processing/issues/3906 -X completion panel -X what should the background color be? -X test fg/bg color on other operating systems -J fix icon sizes/design -X set a better minimum size for the number of updates available - -earlier/cleaning -X list with contrib types separated is really wonky -o do we keep the list? -o does it even work for different contrib types? -X cleaned this up in the last release -X remove the dated releases from download.processing.org -X new Android release (EditorButton constructor changed) -o JavaEditor has several null colors, remove color support -o once the design is complete and we for sure do not need color -X remove deprecated methods -X do the right thing on passing around List vs ArrayList and others -o wonder if "Save As" is causing the problems with auto-reload -X found and fixed -X look at the sound library https://github.com/wirsing/ProcessingSound -o sound is not yet supported on Windows -X implement the new gui +0247 (3.0.1) known issues From d19f689892328d677351af774dbedc50e096f6f6 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Sep 2015 15:15:12 -0400 Subject: [PATCH 23/24] more rollover --- todo.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/todo.txt b/todo.txt index e27b2b5f7..111c3a11b 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,9 @@ 0247 (3.0.1) +jakub +X Include Example packs into update count +X https://github.com/processing/processing/pull/3932 + known issues _ launch4j doesn't work from folders with non-native charsets @@ -11,11 +15,8 @@ _ http://www.excelsiorjet.com/kb/35/howto-create-a-single-exe-from-your-java-a _ mouse events (i.e. toggle breakpoint) seem to be firing twice -3.0 final -_ https://github.com/processing/processing/milestones/3.0%20final - - 3.0.1 +_ https://github.com/processing/processing/milestones/3.0.1 _ error checkers/suggestions not including the library path _ https://github.com/processing/processing/issues/3924 _ import suggestions box needs design review From e123e4972d69a6a713f81bf5a97623047143fdcc Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 30 Sep 2015 15:33:53 -0400 Subject: [PATCH 24/24] Shutdown error checker executor properly --- .../src/processing/mode/java/pdex/ErrorCheckerService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/src/processing/mode/java/pdex/ErrorCheckerService.java b/java/src/processing/mode/java/pdex/ErrorCheckerService.java index 44983d4ed..1fc344e99 100644 --- a/java/src/processing/mode/java/pdex/ErrorCheckerService.java +++ b/java/src/processing/mode/java/pdex/ErrorCheckerService.java @@ -249,8 +249,7 @@ public class ErrorCheckerService { private Thread errorCheckerThread; private BlockingQueue requestQueue = new ArrayBlockingQueue<>(1); - private ScheduledExecutorService scheduler = - Executors.newSingleThreadScheduledExecutor(); + private ScheduledExecutorService scheduler; volatile ScheduledFuture scheduledUiUpdate = null; volatile long nextUiUpdate = 0; @@ -346,6 +345,7 @@ public class ErrorCheckerService { public void start() { + scheduler = Executors.newSingleThreadScheduledExecutor(); errorCheckerThread = new Thread(mainLoop); errorCheckerThread.start(); } @@ -354,6 +354,9 @@ public class ErrorCheckerService { cancel(); running = false; errorCheckerThread.interrupt(); + if (scheduler != null) { + scheduler.shutdownNow(); + } }