From ada4423aa9f12761613c239910adbe1d593cf441 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 31 Jul 2014 21:18:46 -0400 Subject: [PATCH] deal with some warnings and other notes --- .../com/oracle/appbundler/BundleDocument.java | 2 +- core/todo.txt | 1 + .../glw/src/processing/glw/PNEWT.java | 2 +- .../pdf/src/processing/pdf/PGraphicsPDF.java | 6 +++-- .../mode/experimental/ASTGenerator.java | 4 +-- .../mode/experimental/Debugger.java | 2 +- .../processing/mode/experimental/Utils.java | 2 +- .../mode/experimental/VariableInspector.java | 4 +-- .../mode/experimental/VariableNode.java | 2 +- todo.txt | 25 +++++++++++-------- 10 files changed, 29 insertions(+), 21 deletions(-) diff --git a/build/macosx/appbundler/src/com/oracle/appbundler/BundleDocument.java b/build/macosx/appbundler/src/com/oracle/appbundler/BundleDocument.java index 2f0a01fdf..94fdde05e 100644 --- a/build/macosx/appbundler/src/com/oracle/appbundler/BundleDocument.java +++ b/build/macosx/appbundler/src/com/oracle/appbundler/BundleDocument.java @@ -38,7 +38,7 @@ public class BundleDocument { private String[] extensions; private boolean isPackage = false; - private String capitalizeFirst(String string) { + static private String capitalizeFirst(String string) { char[] stringArray = string.toCharArray(); stringArray[0] = Character.toUpperCase(stringArray[0]); return new String(stringArray); diff --git a/core/todo.txt b/core/todo.txt index 290d32746..9edc000c9 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -92,6 +92,7 @@ _ no high-dpi support for core on Windows _ https://github.com/processing/processing/issues/2411 _ retina sketches slow to start _ https://github.com/processing/processing/issues/2357 +_ glw? lwjgl? retina jogl? cantfix diff --git a/java/libraries/glw/src/processing/glw/PNEWT.java b/java/libraries/glw/src/processing/glw/PNEWT.java index 08d3de581..c633bac47 100644 --- a/java/libraries/glw/src/processing/glw/PNEWT.java +++ b/java/libraries/glw/src/processing/glw/PNEWT.java @@ -174,7 +174,7 @@ public class PNEWT extends PJOGL { } - private void displayWindows() { + static private void displayWindows() { int totalCount = 0; int realizedCount = 0; for (GLWindow win: GLW.windows.values()) { diff --git a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java index 69e02d1f8..9de7ec65e 100644 --- a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java +++ b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java @@ -647,8 +647,10 @@ public class PGraphicsPDF extends PGraphicsJava2D { // fontList = new String[entries.size()]; fontList = new String[map.size()]; int count = 0; - for (Object entry : map.entrySet()) { - fontList[count++] = (String) ((Map.Entry) entry).getKey(); + for (Object key : map.keySet()) { +// for (Object entry : map.entrySet()) { +// fontList[count++] = (String) ((Map.Entry) entry).getKey(); + fontList[count++] = (String) key; } // Iterator it = entries.iterator(); // int count = 0; diff --git a/pdex/src/processing/mode/experimental/ASTGenerator.java b/pdex/src/processing/mode/experimental/ASTGenerator.java index ea47a91d3..1fdf69e0b 100644 --- a/pdex/src/processing/mode/experimental/ASTGenerator.java +++ b/pdex/src/processing/mode/experimental/ASTGenerator.java @@ -561,7 +561,7 @@ public class ASTGenerator { } else { // or in a predefined class? - Class tehClass = findClassIfExists(((SimpleName) astNode).toString()); + Class tehClass = findClassIfExists(((SimpleName) astNode).toString()); if (tehClass != null) { return new ClassMember(tehClass); } @@ -587,7 +587,7 @@ public class ASTGenerator { /*The type wasn't found in local code, so it might be something like * log(), or maybe belonging to super class, etc. */ - Class tehClass = findClassIfExists(((SimpleName)fa.getExpression()).toString()); + Class tehClass = findClassIfExists(((SimpleName)fa.getExpression()).toString()); if (tehClass != null) { // Method Expression is a simple name and wasn't located locally, but found in a class // so look for method in this class. diff --git a/pdex/src/processing/mode/experimental/Debugger.java b/pdex/src/processing/mode/experimental/Debugger.java index 7f19d0622..908fa73f7 100755 --- a/pdex/src/processing/mode/experimental/Debugger.java +++ b/pdex/src/processing/mode/experimental/Debugger.java @@ -1116,7 +1116,7 @@ public class Debugger implements VMEventListener { for (Field f : type.visibleFields()) { System.out.println(f.typeName() + " " + f.name() + " = " + thisObject.getValue(f)); } - } else { + } else { // TODO [this is not reachable - fry] System.out.println("can't get this (in native or static method)"); } } diff --git a/pdex/src/processing/mode/experimental/Utils.java b/pdex/src/processing/mode/experimental/Utils.java index 7992676dc..d1bcced2f 100644 --- a/pdex/src/processing/mode/experimental/Utils.java +++ b/pdex/src/processing/mode/experimental/Utils.java @@ -213,7 +213,7 @@ public class Utils { } public void minDistInGrid(int g[][], int i, int j, int fi, int fj, - char s1[], char s2[], ArrayList set) { + char s1[], char s2[], ArrayList set) { // if(i < s1.length)System.out.print(s1[i] + " <->"); // if(j < s2.length)System.out.print(s2[j]); if (i < s1.length && j < s2.length) { diff --git a/pdex/src/processing/mode/experimental/VariableInspector.java b/pdex/src/processing/mode/experimental/VariableInspector.java index e80f9e579..f17ef30d3 100755 --- a/pdex/src/processing/mode/experimental/VariableInspector.java +++ b/pdex/src/processing/mode/experimental/VariableInspector.java @@ -74,7 +74,7 @@ public class VariableInspector extends javax.swing.JFrame { protected List declaredThisFields; // declared i.e. non-inherited fields of this protected DebugEditor editor; // the editor protected Debugger dbg; // the debugger - protected List expandedNodes = new ArrayList(); // list of expanded tree paths. (using list to maintain the order of expansion) + protected List expandedNodes = new ArrayList<>(); // list of expanded tree paths. (using list to maintain the order of expansion) protected boolean p5mode = true; // processing / "advanced" mode flag (currently not used /** @@ -515,7 +515,7 @@ public class VariableInspector extends javax.swing.JFrame { // first remove all children of collapsed path // this makes sure children do not appear before parents in the list. // (children can't be expanded before their parents) - List removalList = new ArrayList(); + List removalList = new ArrayList<>(); for (TreePath path : expandedNodes) { if (path.getParentPath().equals(tee.getPath())) { removalList.add(path); diff --git a/pdex/src/processing/mode/experimental/VariableNode.java b/pdex/src/processing/mode/experimental/VariableNode.java index 66b0575d7..42944cdc3 100755 --- a/pdex/src/processing/mode/experimental/VariableNode.java +++ b/pdex/src/processing/mode/experimental/VariableNode.java @@ -53,7 +53,7 @@ public class VariableNode implements MutableTreeNode { protected String type; protected String name; protected Value value; - protected List children = new ArrayList(); + protected List children = new ArrayList<>(); protected MutableTreeNode parent; /** diff --git a/todo.txt b/todo.txt index bf095a65b..ce2cda767 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,11 @@ 0230 pde (3.0a3) +earlier +X repo cleanup +X remove non-web stuff from web +X remove non-android stuff from android +X remove web and android from the main repo + pulls X Add polling to detect file system changes X https://github.com/processing/processing/issues/1939 @@ -9,18 +15,24 @@ X https://github.com/processing/processing/issues/632 X https://github.com/processing/processing/pull/2084 X http://code.google.com/p/processing/issues/detail?id=593 _ need to make sure the .properties files are read properly as UTF-8 +X Indent breaks when hitting enter before spaces +X https://github.com/processing/processing/issues/2004 +X https://github.com/processing/processing/pull/2690 +X support for Japanese +X https://github.com/processing/processing/pull/2688 pending _ look at the sound library https://github.com/wirsing/ProcessingSound _ sound is not yet supported on Windows -_ glw? lwjgl? retina jogl? _ make reference build process part of dist _ https://github.com/processing/processing-docs/issues/85 _ separate ant target, but only require them for dist _ as separate targets, folks can build explicitly if they'd like _ processing-docs/java_generate/ReferenceGenerator/processingrefBuild.sh _ remove reference.zip from main repo +_ clean out the repo +_ https://github.com/processing/processing/issues/1898 gsoc/help me @@ -59,12 +71,6 @@ _ display "1" is not correct in 2.1.2 _ https://github.com/processing/processing/issues/2502 _ re/move things from Google Code downloads _ https://code.google.com/p/support/wiki/DownloadsFAQ -_ clean out the repo -_ https://github.com/processing/processing/issues/1898 -_ requires re-forking, so still a ton of work -_ remove non-web stuff from web -_ remove non-android stuff from android -_ remove web and android from the main repo _ add font fixes to the rest of the API _ https://github.com/processing/processing/commit/eaff673d173b2d27f276cf5c59e3abf6c0fab86b _ g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, @@ -96,9 +102,6 @@ _ add documentation for how to run mode development from Eclipse _ implementation/changes from JDF _ modes are being loaded multiple times, which can cause trouble _ add minimum version required (or max version?) to libraries/modes/etc -_ no high-res display support for the PDE -_ PDE and sketches are 2x smaller on high-res Windows 8 machines -_ https://github.com/processing/processing/issues/2411 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -802,6 +805,8 @@ _ avoid some confusion for when describing the libraries folder to users DIST / Windows +_ PDE and sketches are 2x smaller on high-res Windows 8 machines +_ https://github.com/processing/processing/issues/2411 _ processing-java output as UTF-8 makes Windows unhappy _ https://github.com/processing/processing/issues/1633 _ does launching p5 from inside the .zip folder cause it to quit immediately?