diff --git a/app/src/processing/app/Library.java b/app/src/processing/app/Library.java old mode 100644 new mode 100755 index 18910d8ba..10ca21cbe --- a/app/src/processing/app/Library.java +++ b/app/src/processing/app/Library.java @@ -15,9 +15,9 @@ public class Library extends LocalContribution { protected File examplesFolder; // shortname/examples protected File referenceFile; // shortname/reference/index.html - /** - * Subfolder for grouping libraries in a menu. Basic subfolder support - * is provided so that some organization can be done in the import menu. + /** + * Subfolder for grouping libraries in a menu. Basic subfolder support + * is provided so that some organization can be done in the import menu. * (This is the replacement for the "library compilation" type.) */ protected String group; @@ -89,13 +89,16 @@ public class Library extends LocalContribution { return new Library(folder); // } catch (IgnorableException ig) { // Base.log(ig.getMessage()); - } catch (Exception e) { - e.printStackTrace(); + } catch (Error err) { + // Handles UnsupportedClassVersionError and others + err.printStackTrace(); + } catch (Exception ex) { + ex.printStackTrace(); } return null; } - - + + private Library(File folder) { this(folder, null); } @@ -432,14 +435,14 @@ public class Library extends LocalContribution { } }; - + static public ArrayList discover(File folder) { ArrayList libraries = new ArrayList(); discover(folder, libraries); return libraries; } - + static public void discover(File folder, ArrayList libraries) { String[] list = folder.list(junkFolderFilter); @@ -474,14 +477,14 @@ public class Library extends LocalContribution { } } - + static protected ArrayList list(File folder) { ArrayList libraries = new ArrayList(); list(folder, libraries); return libraries; } - + static protected void list(File folder, ArrayList libraries) { ArrayList librariesFolders = new ArrayList(); discover(folder, librariesFolders); @@ -507,7 +510,7 @@ public class Library extends LocalContribution { } } - + public ContributionType getType() { return ContributionType.LIBRARY; } diff --git a/app/src/processing/app/contrib/ModeContribution.java b/app/src/processing/app/contrib/ModeContribution.java old mode 100644 new mode 100755 index a55e2f1d8..4a927c895 --- a/app/src/processing/app/contrib/ModeContribution.java +++ b/app/src/processing/app/contrib/ModeContribution.java @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -39,18 +39,21 @@ public class ModeContribution extends LocalContribution { } - static public ModeContribution load(Base base, File folder, + static public ModeContribution load(Base base, File folder, String searchName) { try { return new ModeContribution(base, folder, searchName); } catch (IgnorableException ig) { Base.log(ig.getMessage()); + } catch (Error err) { + // Handles UnsupportedClassVersionError and others + err.printStackTrace(); } catch (Exception e) { if (searchName == null) { e.printStackTrace(); } else { - // For the built-in modes, don't print the exception, just log it - // for debugging. This should be impossible for most users to reach, + // For the built-in modes, don't print the exception, just log it + // for debugging. This should be impossible for most users to reach, // but it helps us load experimental mode when it's available. Base.log("ModeContribution.load() failed for " + searchName, e); } diff --git a/app/src/processing/app/contrib/ToolContribution.java b/app/src/processing/app/contrib/ToolContribution.java old mode 100644 new mode 100755 index 94715497e..978e95f49 --- a/app/src/processing/app/contrib/ToolContribution.java +++ b/app/src/processing/app/contrib/ToolContribution.java @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -40,8 +40,11 @@ public class ToolContribution extends LocalContribution implements Tool { return new ToolContribution(folder); } catch (IgnorableException ig) { Base.log(ig.getMessage()); - } catch (Exception e) { - e.printStackTrace(); + } catch (Error err) { + // Handles UnsupportedClassVersionError and others + err.printStackTrace(); + } catch (Exception ex) { + ex.printStackTrace(); } return null; } diff --git a/app/src/processing/app/windows/Platform.java b/app/src/processing/app/windows/Platform.java index 8cb6403e4..6c3ac3917 100755 --- a/app/src/processing/app/windows/Platform.java +++ b/app/src/processing/app/windows/Platform.java @@ -42,14 +42,14 @@ import processing.core.PApplet; /** - * Platform-specific glue for Windows. + * Platform-specific glue for Windows. * */ public class Platform extends processing.app.Platform { static final String APP_NAME = "Processing"; static final String REG_OPEN_COMMAND = - System.getProperty("user.dir").replace('/', '\\') + + System.getProperty("user.dir").replace('/', '\\') + "\\" + APP_NAME.toLowerCase() + ".exe \"%1\""; static final String REG_DOC = APP_NAME + ".Document"; @@ -60,6 +60,7 @@ public class Platform extends processing.app.Platform { //checkQuickTime(); checkPath(); + /* File f = new File(System.getProperty("user.dir"), "recycle-test.txt"); //File f = new File("C:\\recycle-test.txt"); System.out.println(f.getAbsolutePath()); @@ -72,6 +73,7 @@ public class Platform extends processing.app.Platform { } catch (IOException e) { e.printStackTrace(); } + */ //findJDK(); /* @@ -149,8 +151,8 @@ public class Platform extends processing.app.Platform { /** - * Associate .pde files with this version of Processing. After 2.0.1, - * this was changed to only set the values for the current user, so that + * Associate .pde files with this version of Processing. After 2.0.1, + * this was changed to only set the values for the current user, so that * it would no longer silently fail on systems that have UAC turned on. */ protected void setAssociations() throws UnsupportedEncodingException { @@ -217,8 +219,8 @@ public class Platform extends processing.app.Platform { Preferences.setBoolean("platform.auto_file_type_associations", false); } } - - + + /** * Remove extra quotes, slashes, and garbage from the Windows PATH. */