From af1e2ee4ef95d689904565379f56319490cdc0f6 Mon Sep 17 00:00:00 2001 From: Jeremy Douglass Date: Sun, 11 Aug 2019 23:29:43 -0700 Subject: [PATCH 01/49] rename-variable menu allows Java identifiers Previously it was limited to unicode identifiers--for example a beginning with _ was forbidden; not so in Java. Closes #5828 "rename-variable dialog doesn't allow 1st-char underscore" --- java/src/processing/mode/java/pdex/Rename.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/processing/mode/java/pdex/Rename.java b/java/src/processing/mode/java/pdex/Rename.java index 7c5c6bca27..b143cd721a 100644 --- a/java/src/processing/mode/java/pdex/Rename.java +++ b/java/src/processing/mode/java/pdex/Rename.java @@ -129,8 +129,8 @@ public void componentHidden(ComponentEvent e) { final String newName = textField.getText().trim(); if (!newName.isEmpty()) { if (newName.length() >= 1 && - newName.chars().limit(1).allMatch(Character::isUnicodeIdentifierStart) && - newName.chars().skip(1).allMatch(Character::isUnicodeIdentifierPart)) { + newName.chars().limit(1).allMatch(Character::isJavaIdentifierStart) && + newName.chars().skip(1).allMatch(Character::isJavaIdentifierPart)) { rename(ps, binding, newName); window.setVisible(false); } else { @@ -332,4 +332,4 @@ void dispose() { window.dispose(); } } -} \ No newline at end of file +} From 8bfb02ec37fefb5ebaf87050f1dc3b1b960a7b1b Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 17:32:10 -0500 Subject: [PATCH 02/49] contrib name sort should not be case-sensitive --- app/src/processing/app/contrib/ListPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/contrib/ListPanel.java b/app/src/processing/app/contrib/ListPanel.java index 49c50658cc..845b7178d4 100644 --- a/app/src/processing/app/contrib/ListPanel.java +++ b/app/src/processing/app/contrib/ListPanel.java @@ -419,7 +419,7 @@ Comparator getComparator() { return comparator.thenComparing(contribution -> getAuthorNameWithoutMarkup(contribution.getAuthorList())); case NAME: default: - return comparator.thenComparing(Contribution::getName); + return comparator.thenComparing(Contribution::getName, String.CASE_INSENSITIVE_ORDER); } } } From 3110ed0c62e8cce352953eab7d43a2b10e4bba71 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 17:34:28 -0500 Subject: [PATCH 03/49] notes about updates --- todo.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) mode change 100755 => 100644 todo.txt diff --git a/todo.txt b/todo.txt old mode 100755 new mode 100644 index 0a779e299d..c8194a57db --- a/todo.txt +++ b/todo.txt @@ -4,6 +4,13 @@ X https://github.com/processing/processing/issues/5794 X fix potential highlighting issue that wasn't selecting portions of text X update AppBundler to use newer SDK, recompile X edit build.xml files and appbundler to preserve more attributes +X contrib listing names should not be case sensitive +X libs in all caps appeared above those in lowercase + +contribs +X tweak mode not working +X https://github.com/processing/processing/issues/5805 +X https://github.com/processing/processing/pull/5909 _ windows anti-malware leaves browser stuck at 100% _ https://github.com/processing/processing/issues/5893 @@ -13,9 +20,6 @@ _ https://github.com/processing/processing/issues/5482 _ https://github.com/processing/processing/issues/5916 _ https://github.com/processing/processing/issues/5823 -fork issues -_ processing-sam/build/macosx/jdk-0u1_macosx_64.tgz - from Casey _ Issue with https and downloading the binaries, +Checksums? _ https://github.com/processing/processing-docs/issues/766 From 8148676f1e6b211ca16e844bff0785452444ea48 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 18:54:22 -0500 Subject: [PATCH 04/49] ignore library subfolders --- app/src/processing/app/Library.java | 33 ++++++++++++----------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/app/src/processing/app/Library.java b/app/src/processing/app/Library.java index 83c1d1dd02..34bc6360e1 100644 --- a/app/src/processing/app/Library.java +++ b/app/src/processing/app/Library.java @@ -128,7 +128,7 @@ protected void handle() { StringDict exportTable = exportSettings.exists() ? Util.readSettings(exportSettings) : new StringDict(); - exportList = new HashMap(); + exportList = new HashMap<>(); // get the list of files just in the library root String[] baseList = libraryFolder.list(standardFilter); @@ -298,7 +298,7 @@ public void addPackageList(Map> importToLibraryTable) { // Library library = importToLibraryTable.get(pkg); List libraries = importToLibraryTable.get(pkg); if (libraries == null) { - libraries = new ArrayList(); + libraries = new ArrayList<>(); importToLibraryTable.put(pkg, libraries); } else { if (Base.DEBUG) { @@ -470,10 +470,10 @@ static public boolean hasMultipleArch(int platform, List libraries) { static protected FilenameFilter junkFolderFilter = new FilenameFilter() { public boolean accept(File dir, String name) { - // skip .DS_Store files, .svn folders, etc + // skip .DS_Store files, .svn and .git folders, etc if (name.charAt(0) == '.') return false; - if (name.equals("CVS")) return false; - return (new File(dir, name).isDirectory()); + if (name.equals("CVS")) return false; // old skool + return new File(dir, name).isDirectory(); } }; @@ -482,12 +482,14 @@ static public List discover(File folder) { List libraries = new ArrayList<>(); String[] folderNames = folder.list(junkFolderFilter); - // if a bad folder or something like that, this might come back null + // if a bad folder or unreadable, folderNames might be null if (folderNames != null) { // alphabetize list, since it's not always alpha order // replaced hella slow bubble sort with this feller for 0093 Arrays.sort(folderNames, String.CASE_INSENSITIVE_ORDER); + // TODO some weirdness because ContributionType.LIBRARY.isCandidate() + // handles some, but not all, of this [fry 200116] for (String potentialName : folderNames) { File baseFolder = new File(folder, potentialName); File libraryFolder = new File(baseFolder, "library"); @@ -500,22 +502,13 @@ static public List discover(File folder) { libraries.add(baseFolder); } else { - String mess = "The library \"" - + potentialName - + "\" cannot be used.\n" - + "Library names must contain only basic letters and numbers.\n" - + "(ASCII only and no spaces, and it cannot start with a number)"; + final String mess = + "The library \"" + potentialName + "\" cannot be used.\n" + + "Library names must contain only basic letters and numbers.\n" + + "(ASCII only and no spaces, and it cannot start with a number)"; Messages.showMessage("Ignoring bad library name", mess); continue; } - /* - } else { // maybe it's a JS library - // TODO this should be in a better location - File jsLibrary = new File(libraryFolder, potentialName + ".js"); - if (jsLibrary.exists()) { - libraries.add(baseFolder); - } - */ } } } @@ -532,6 +525,7 @@ static public List list(File folder) { libraries.add(new Library(baseFolder)); } + /* // Support libraries inside of one level of subfolders? I believe this was // the compromise for supporting library groups, but probably a bad idea // because it's not compatible with the Manager. @@ -548,6 +542,7 @@ static public List list(File folder) { } } } + */ return libraries; } From 93c6a060994e4d08807218e8caa4f5fe49e72c1b Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 18:56:53 -0500 Subject: [PATCH 05/49] ignore __MACOSX files when unzipping --- app/src/processing/app/Util.java | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/app/src/processing/app/Util.java b/app/src/processing/app/Util.java index 6fdc75c9de..fefc3b8b71 100644 --- a/app/src/processing/app/Util.java +++ b/app/src/processing/app/Util.java @@ -614,24 +614,31 @@ static private void packageListFromFolder(File dir, String sofar, } + /** + * Extract the contents of a .zip archive into a folder. + * Ignores (does not extract) any __MACOSX files from macOS archives. + */ static public void unzip(File zipFile, File dest) { try { FileInputStream fis = new FileInputStream(zipFile); CheckedInputStream checksum = new CheckedInputStream(fis, new Adler32()); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(checksum)); - ZipEntry next = null; - while ((next = zis.getNextEntry()) != null) { - File currentFile = new File(dest, next.getName()); - if (next.isDirectory()) { - currentFile.mkdirs(); - } else { - File parentDir = currentFile.getParentFile(); - // Sometimes the directory entries aren't already created - if (!parentDir.exists()) { - parentDir.mkdirs(); + ZipEntry entry = null; + while ((entry = zis.getNextEntry()) != null) { + final String name = entry.getName(); + if (!name.startsWith(("__MACOSX"))) { + File currentFile = new File(dest, name); + if (entry.isDirectory()) { + currentFile.mkdirs(); + } else { + File parentDir = currentFile.getParentFile(); + // Sometimes the directory entries aren't already created + if (!parentDir.exists()) { + parentDir.mkdirs(); + } + currentFile.createNewFile(); + unzipEntry(zis, currentFile); } - currentFile.createNewFile(); - unzipEntry(zis, currentFile); } } } catch (Exception e) { From a31855c7761ad958dbb52168e03a6495f060e7a6 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 19:01:57 -0500 Subject: [PATCH 06/49] improve handling of weird cases and error messaging inside contribs manager --- .../app/contrib/AvailableContribution.java | 68 ++++++------------- .../app/contrib/ContribProgressBar.java | 2 +- .../app/contrib/ContributionManager.java | 9 +-- .../app/contrib/ContributionType.java | 6 +- .../app/contrib/LocalContribution.java | 17 +++-- todo.txt | 2 + 6 files changed, 45 insertions(+), 59 deletions(-) diff --git a/app/src/processing/app/contrib/AvailableContribution.java b/app/src/processing/app/contrib/AvailableContribution.java index 9c78b831ac..4d5240c451 100644 --- a/app/src/processing/app/contrib/AvailableContribution.java +++ b/app/src/processing/app/contrib/AvailableContribution.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013-16 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify @@ -99,7 +99,6 @@ public LocalContribution install(Base base, File contribArchive, // Unzip the file into the modes, tools, or libraries folder inside the // sketchbook. Unzipping to /tmp is problematic because it may be on // another file system, so move/rename operations will break. -// File sketchbookContribFolder = type.getSketchbookFolder(); File tempFolder = null; try { @@ -110,84 +109,61 @@ public LocalContribution install(Base base, File contribArchive, return null; } Util.unzip(contribArchive, tempFolder); -// System.out.println("temp folder is " + tempFolder); -// Base.openFolder(tempFolder); // Now go looking for a legit contrib inside what's been unpacked. File contribFolder = null; - // Sometimes contrib authors place all their folders in the base directory - // of the .zip file instead of in single folder as the guidelines suggest. - if (type.isCandidate(tempFolder)) { - /* - // Can't just rename the temp folder, because a contrib with this name - // may already exist. Instead, create a new temp folder, and rename the - // old one to be the correct folder. - File enclosingFolder = null; - try { - enclosingFolder = Base.createTempFolder(type.toString(), "tmp", sketchbookContribFolder); - } catch (IOException e) { - status.setErrorMessage("Could not create a secondary folder to install."); - return null; - } - contribFolder = new File(enclosingFolder, getName()); - tempFolder.renameTo(contribFolder); - tempFolder = enclosingFolder; - */ + /* + if (!type.isCandidate(tempFolder)) { if (status != null) { status.setErrorMessage(Language.interpolate("contrib.errors.needs_repackage", getName(), type.getTitle())); } return null; } + */ -// if (contribFolder == null) { - // Find the first legitimate looking folder in what we just unzipped - contribFolder = type.findCandidate(tempFolder); -// } LocalContribution installedContrib = null; - + // Find the first legitimate folder in what we just unzipped + contribFolder = type.findCandidate(tempFolder); if (contribFolder == null) { if (status != null) { status.setErrorMessage(Language.interpolate("contrib.errors.no_contribution_found", type)); } - } else { File propFile = new File(contribFolder, type + ".properties"); - if (writePropertiesFile(propFile)) { - // 1. contribFolder now has a legit contribution, load it to get info. + if (!propFile.exists()) { + status.setErrorMessage("This contribution is missing " + + propFile.getName() + + ", please contact the author for a fix."); + + } else if (writePropertiesFile(propFile)) { + // contribFolder now has a legit contribution, load it to get info. LocalContribution newContrib = type.load(base, contribFolder); - // 1.1. get info we need to delete the newContrib folder later + // get info we need to delete the newContrib folder later File newContribFolder = newContrib.getFolder(); - // 2. Check to make sure nothing has the same name already, + // Check to make sure nothing has the same name already, // backup old if needed, then move things into place and reload. installedContrib = newContrib.copyAndLoad(base, confirmReplace, status); - // Restart no longer needed. Yay! -// if (newContrib != null && type.requiresRestart()) { -// installedContrib.setRestartFlag(); -// //status.setMessage("Restart Processing to finish the installation."); -// } - - // 3.1 Unlock all the jars if it is a mode or tool + // Unlock all the jars if it is a mode or tool if (newContrib.getType() == ContributionType.MODE) { ((ModeContribution) newContrib).clearClassLoader(base); - } - else if (newContrib.getType() == ContributionType.TOOL) { + + } else if (newContrib.getType() == ContributionType.TOOL) { ((ToolContribution) newContrib).clearClassLoader(); } - // 3.2 Delete the newContrib, do a garbage collection, hope and pray + // Delete the newContrib, do a garbage collection, hope and pray // that Java will unlock the temp folder on Windows now newContrib = null; System.gc(); - if (Platform.isWindows()) { - // we'll even give it a second to finish up ... because file ops are - // just that flaky on Windows. + // we'll even give it a second to finish up, + // because file ops are just that flaky on Windows. try { Thread.sleep(1000); } catch (InterruptedException e) { @@ -195,7 +171,7 @@ else if (newContrib.getType() == ContributionType.TOOL) { } } - // 4. Okay, now actually delete that temp folder + // delete the contrib folder inside the libraryXXXXXXtmp folder Util.removeDir(newContribFolder, false); } else { diff --git a/app/src/processing/app/contrib/ContribProgressBar.java b/app/src/processing/app/contrib/ContribProgressBar.java index c86cb16ae4..8a0d41c3b6 100644 --- a/app/src/processing/app/contrib/ContribProgressBar.java +++ b/app/src/processing/app/contrib/ContribProgressBar.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013-15 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify diff --git a/app/src/processing/app/contrib/ContributionManager.java b/app/src/processing/app/contrib/ContributionManager.java index 8c0cc591bc..46f892ca77 100644 --- a/app/src/processing/app/contrib/ContributionManager.java +++ b/app/src/processing/app/contrib/ContributionManager.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify @@ -199,8 +199,8 @@ public void run() { } } installProgress.finished(); - } - else { + + } else { if (downloadProgress.exception instanceof SocketTimeoutException) { status.setErrorMessage(Language .interpolate("contrib.errors.contrib_download.timeout", @@ -213,7 +213,6 @@ public void run() { } contribZip.delete(); - //} catch (NoClassDefFoundError ncdfe) { } catch (Exception e) { String msg = null; if (e instanceof RuntimeException) { @@ -229,6 +228,8 @@ public void run() { if (msg == null) { msg = Language.interpolate("contrib.errors.download_and_install", ad.getName()); + // Something unexpected, so print the trace + e.printStackTrace(); } status.setErrorMessage(msg); downloadProgress.cancel(); diff --git a/app/src/processing/app/contrib/ContributionType.java b/app/src/processing/app/contrib/ContributionType.java index 197aaa4f5c..2ea1dd2d78 100644 --- a/app/src/processing/app/contrib/ContributionType.java +++ b/app/src/processing/app/contrib/ContributionType.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify @@ -172,7 +172,7 @@ public File getSketchbookFolder() { } - boolean isCandidate(File potential) { + public boolean isCandidate(File potential) { return (potential.isDirectory() && new File(potential, toString()).exists() && !isTempFolderName(potential.getName())); @@ -237,7 +237,7 @@ LocalContribution load(Base base, File folder) { ArrayList listContributions(Editor editor) { - ArrayList contribs = new ArrayList(); + ArrayList contribs = new ArrayList<>(); switch (this) { case LIBRARY: contribs.addAll(editor.getMode().contribLibraries); diff --git a/app/src/processing/app/contrib/LocalContribution.java b/app/src/processing/app/contrib/LocalContribution.java index 20c7176b01..cb128a73e9 100644 --- a/app/src/processing/app/contrib/LocalContribution.java +++ b/app/src/processing/app/contrib/LocalContribution.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013-16 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify @@ -237,7 +237,8 @@ static void listClasses(ClassLoader loader) { LocalContribution copyAndLoad(Base base, boolean confirmReplace, StatusPanel status) { -// NOTE: null status => function is called on startup when Editor objects, et al. aren't ready + // NOTE: null status => function is called on startup + // when Editor objects, et al. aren't ready String contribFolderName = getFolder().getName(); @@ -262,10 +263,17 @@ LocalContribution copyAndLoad(Base base, (oldContrib.getId() != null && oldContrib.getId().equals(getId()))) { if (oldContrib.getType().requiresRestart()) { - // XXX: We can't replace stuff, soooooo.... do something different if (!oldContrib.backup(false, status)) { return null; } + /* + try { + Platform.deleteFile(oldContrib.getFolder()); + } catch (IOException e) { + status.setErrorMessage(e.getMessage()); + return null; + } + */ } else { int result = 0; boolean doBackup = Preferences.getBoolean("contribution.backup.on_install"); @@ -306,8 +314,7 @@ LocalContribution copyAndLoad(Base base, Util.removeDir(contribFolder); } - } - else { + } else { // This if should ideally never happen, since this function // is to be called only when restarting on update if (contribFolder.exists() && contribFolder.isDirectory()) { diff --git a/todo.txt b/todo.txt index c8194a57db..8b692a2bf4 100644 --- a/todo.txt +++ b/todo.txt @@ -6,6 +6,8 @@ X update AppBundler to use newer SDK, recompile X edit build.xml files and appbundler to preserve more attributes X contrib listing names should not be case sensitive X libs in all caps appeared above those in lowercase +X ignore library subfolders +X don't unzip __MACOSX files with contribs contribs X tweak mode not working From 8430922f5e8fc679974f56c9351598560343a132 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 16 Jan 2020 19:25:44 -0500 Subject: [PATCH 07/49] don't remove old sketch name from Recent menu on Save As (fixes #5902) --- app/src/processing/app/Sketch.java | 21 ++++++++++++++------- app/src/processing/app/ui/Recent.java | 3 +++ todo.txt | 6 ++++++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 7d3caf8988..e686dc1823 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -573,7 +573,7 @@ protected void nameCode(String newName) { code[i].setFolder(newFolder); } // Update internal state to reflect the new location - updateInternal(sanitaryName, newFolder); + updateInternal(sanitaryName, newFolder, renamingCode); // File newMainFile = new File(newFolder, newName + ".pde"); // String newMainFilePath = newMainFile.getAbsolutePath(); @@ -985,15 +985,17 @@ public boolean accept(File file) { // While the old path to the main .pde is still set, remove the entry from // the Recent menu so that it's not sticking around after the rename. // If untitled, it won't be in the menu, so there's no point. - if (!isUntitled()) { - Recent.remove(editor); - } +// if (!isUntitled()) { +// Recent.remove(editor); +// } + // Folks didn't like this behavior, so shutting it off + // https://github.com/processing/processing/issues/5902 // save the main tab with its new name File newFile = new File(newFolder, newName + "." + mode.getDefaultExtension()); code[0].saveAs(newFile); - updateInternal(newName, newFolder); + updateInternal(newName, newFolder, false); // Make sure that it's not an untitled sketch setUntitled(false); @@ -1191,7 +1193,8 @@ public void done() { /** * Update internal state for new sketch name or folder location. */ - protected void updateInternal(String sketchName, File sketchFolder) { + protected void updateInternal(String sketchName, File sketchFolder, + boolean renaming) { // reset all the state information for the sketch object String oldPath = getMainFilePath(); primaryFile = code[0].getFile(); @@ -1213,7 +1216,11 @@ protected void updateInternal(String sketchName, File sketchFolder) { // System.out.println("modified is now " + modified); editor.updateTitle(); editor.getBase().rebuildSketchbookMenus(); - Recent.rename(editor, oldPath); + if (renaming) { + // only update the Recent menu if it's a rename, not a Save As + // https://github.com/processing/processing/issues/5902 + Recent.rename(editor, oldPath); + } // editor.header.rebuild(); } diff --git a/app/src/processing/app/ui/Recent.java b/app/src/processing/app/ui/Recent.java index 92f62ba7c0..bc26761736 100644 --- a/app/src/processing/app/ui/Recent.java +++ b/app/src/processing/app/ui/Recent.java @@ -242,6 +242,8 @@ public void actionPerformed(ActionEvent e) { synchronized static public void remove(Editor editor) { int index = findRecord(editor.getSketch().getMainFilePath()); if (index != -1) { + System.out.println("removing " + editor.getSketch().getMainFilePath()); + new Exception().printStackTrace(System.out); records.remove(index); } } @@ -291,6 +293,7 @@ synchronized static public void append(Editor editor) { // If this sketch is already in the menu, remove it remove(editor); + // If the list is full, remove the first entry if (records.size() == Preferences.getInteger("recent.count")) { records.remove(0); // remove the first entry } diff --git a/todo.txt b/todo.txt index 8b692a2bf4..993b86838d 100644 --- a/todo.txt +++ b/todo.txt @@ -8,6 +8,12 @@ X contrib listing names should not be case sensitive X libs in all caps appeared above those in lowercase X ignore library subfolders X don't unzip __MACOSX files with contribs +X don't do library subfolders +X show error when .properties file is missing from contribs +X clean up a lot of bad temp file handling in the contrib manager +X https://github.com/processing/processing/issues/5845 +X don't remove entries from Recent menu on Save As +X https://github.com/processing/processing/issues/5902 contribs X tweak mode not working From 65a73ec65a3facddf02553f9385ab30f26db64e0 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 10:42:23 -0500 Subject: [PATCH 08/49] catch null folder list on startup (fixes #5823) --- .../app/contrib/ContributionManager.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/src/processing/app/contrib/ContributionManager.java b/app/src/processing/app/contrib/ContributionManager.java index 46f892ca77..af9c4d8995 100644 --- a/app/src/processing/app/contrib/ContributionManager.java +++ b/app/src/processing/app/contrib/ContributionManager.java @@ -619,16 +619,21 @@ public boolean accept(File folder) { } }); - for (File file : installList) { - for (AvailableContribution contrib : listing.advertisedContributions) { - if (file.getName().equals(contrib.getName())) { - file.delete(); - installOnStartUp(base, contrib); - EventQueue.invokeAndWait(() -> { - listing.replaceContribution(contrib, contrib); - }); + // https://github.com/processing/processing/issues/5823 + if (installList != null) { + for (File file : installList) { + for (AvailableContribution contrib : listing.advertisedContributions) { + if (file.getName().equals(contrib.getName())) { + file.delete(); + installOnStartUp(base, contrib); + EventQueue.invokeAndWait(() -> { + listing.replaceContribution(contrib, contrib); + }); + } } } + } else { + System.err.println("Could not read " + root); } } From 67d57a725594a6785dada2845b920b82d51b96ac Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 10:55:48 -0500 Subject: [PATCH 09/49] recent updates to contrib manager --- todo.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/todo.txt b/todo.txt index 993b86838d..4c7a4fc110 100644 --- a/todo.txt +++ b/todo.txt @@ -4,6 +4,13 @@ X https://github.com/processing/processing/issues/5794 X fix potential highlighting issue that wasn't selecting portions of text X update AppBundler to use newer SDK, recompile X edit build.xml files and appbundler to preserve more attributes +X don't remove entries from Recent menu on Save As +X https://github.com/processing/processing/issues/5902 +o NPE in buildCoreModes() on startup +o https://github.com/processing/processing/issues/5823 +X not clear what was wrong here + +contrib manager X contrib listing names should not be case sensitive X libs in all caps appeared above those in lowercase X ignore library subfolders @@ -12,8 +19,9 @@ X don't do library subfolders X show error when .properties file is missing from contribs X clean up a lot of bad temp file handling in the contrib manager X https://github.com/processing/processing/issues/5845 -X don't remove entries from Recent menu on Save As -X https://github.com/processing/processing/issues/5902 +X NPE in installPreviouslyFailed() on startup +X https://github.com/processing/processing/issues/5482 +X https://github.com/processing/processing/issues/5916 contribs X tweak mode not working @@ -23,10 +31,6 @@ X https://github.com/processing/processing/pull/5909 _ windows anti-malware leaves browser stuck at 100% _ https://github.com/processing/processing/issues/5893 -_ startup errors in contrib manager -_ https://github.com/processing/processing/issues/5482 -_ https://github.com/processing/processing/issues/5916 -_ https://github.com/processing/processing/issues/5823 from Casey _ Issue with https and downloading the binaries, +Checksums? From 4bc152519851f8258b276952d4788497303d1be9 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 10:56:07 -0500 Subject: [PATCH 10/49] just removing extra spaces from auto-generated code --- core/src/processing/core/PApplet.java | 90 ++++++++++++------------ core/src/processing/core/PGraphics.java | 92 ++++++++++++------------- 2 files changed, 91 insertions(+), 91 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 4492d6ae00..5f35bfc72c 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -12169,11 +12169,11 @@ public void rect(float a, float b, float c, float d, /** * ( begin auto-generated from square.xml ) * - * Draws a square to the screen. A square is a four-sided shape with - * every angle at ninety degrees and each side is the same length. - * By default, the first two parameters set the location of the - * upper-left corner, the third sets the width and height. The way - * these parameters are interpreted, however, may be changed with the + * Draws a square to the screen. A square is a four-sided shape with + * every angle at ninety degrees and each side is the same length. + * By default, the first two parameters set the location of the + * upper-left corner, the third sets the width and height. The way + * these parameters are interpreted, however, may be changed with the * rectMode() function. * * ( end auto-generated ) @@ -12282,9 +12282,9 @@ public void arc(float a, float b, float c, float d, /** * ( begin auto-generated from circle.xml ) * - * Draws a circle to the screen. By default, the first two parameters - * set the location of the center, and the third sets the shape's width - * and height. The origin may be changed with the ellipseMode() + * Draws a circle to the screen. By default, the first two parameters + * set the location of the center, and the third sets the shape's width + * and height. The origin may be changed with the ellipseMode() * function. * * ( end auto-generated ) @@ -13326,28 +13326,28 @@ public void text(float num, float x, float y, float z) { /** * ( begin auto-generated from push.xml ) * - * The push() function saves the current drawing style - * settings and transformations, while pop() restores these - * settings. Note that these functions are always used together. - * They allow you to change the style and transformation settings - * and later return to what you had. When a new state is started - * with push(), it builds on the current style and transform + * The push() function saves the current drawing style + * settings and transformations, while pop() restores these + * settings. Note that these functions are always used together. + * They allow you to change the style and transformation settings + * and later return to what you had. When a new state is started + * with push(), it builds on the current style and transform * information.
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -13364,28 +13364,28 @@ public void push() { /** * ( begin auto-generated from pop.xml ) * - * The pop() function restores the previous drawing style - * settings and transformations after push() has changed them. - * Note that these functions are always used together. They allow - * you to change the style and transformation settings and later - * return to what you had. When a new state is started with push(), + * The pop() function restores the previous drawing style + * settings and transformations after push() has changed them. + * Note that these functions are always used together. They allow + * you to change the style and transformation settings and later + * return to what you had. When a new state is started with push(), * it builds on the current style and transform information.
*
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -14862,7 +14862,7 @@ public void specular(int rgb) { /** * gray number specifying value between white and black - * + * * @param gray value between black and white, by default 0 to 255 */ public void specular(float gray) { @@ -14929,7 +14929,7 @@ public void emissive(int rgb) { /** * gray number specifying value between white and black - * + * * @param gray value between black and white, by default 0 to 255 */ public void emissive(float gray) { diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 032b69928d..57c782f5f0 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2013-19 The Processing Foundation + Copyright (c) 2013-20 The Processing Foundation Copyright (c) 2004-12 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology @@ -2732,11 +2732,11 @@ protected void rectImpl(float x1, float y1, float x2, float y2, /** * ( begin auto-generated from square.xml ) * - * Draws a square to the screen. A square is a four-sided shape with - * every angle at ninety degrees and each side is the same length. - * By default, the first two parameters set the location of the - * upper-left corner, the third sets the width and height. The way - * these parameters are interpreted, however, may be changed with the + * Draws a square to the screen. A square is a four-sided shape with + * every angle at ninety degrees and each side is the same length. + * By default, the first two parameters set the location of the + * upper-left corner, the third sets the width and height. The way + * these parameters are interpreted, however, may be changed with the * rectMode() function. * * ( end auto-generated ) @@ -2931,9 +2931,9 @@ protected void arcImpl(float x, float y, float w, float h, /** * ( begin auto-generated from circle.xml ) * - * Draws a circle to the screen. By default, the first two parameters - * set the location of the center, and the third sets the shape's width - * and height. The origin may be changed with the ellipseMode() + * Draws a circle to the screen. By default, the first two parameters + * set the location of the center, and the third sets the shape's width + * and height. The origin may be changed with the ellipseMode() * function. * * ( end auto-generated ) @@ -5167,28 +5167,28 @@ protected void textCharScreenImpl(PImage glyph, /** * ( begin auto-generated from push.xml ) * - * The push() function saves the current drawing style - * settings and transformations, while pop() restores these - * settings. Note that these functions are always used together. - * They allow you to change the style and transformation settings - * and later return to what you had. When a new state is started - * with push(), it builds on the current style and transform + * The push() function saves the current drawing style + * settings and transformations, while pop() restores these + * settings. Note that these functions are always used together. + * They allow you to change the style and transformation settings + * and later return to what you had. When a new state is started + * with push(), it builds on the current style and transform * information.
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -5204,28 +5204,28 @@ public void push() { /** * ( begin auto-generated from pop.xml ) * - * The pop() function restores the previous drawing style - * settings and transformations after push() has changed them. - * Note that these functions are always used together. They allow - * you to change the style and transformation settings and later - * return to what you had. When a new state is started with push(), + * The pop() function restores the previous drawing style + * settings and transformations after push() has changed them. + * Note that these functions are always used together. They allow + * you to change the style and transformation settings and later + * return to what you had. When a new state is started with push(), * it builds on the current style and transform information.
*
*
- * push() stores information related to the current - * transformation state and style settings controlled by the - * following functions: rotate(), translate(), - * scale(), fill(), stroke(), tint(), - * strokeWeight(), strokeCap(), strokeJoin(), - * imageMode(), rectMode(), ellipseMode(), - * colorMode(), textAlign(), textFont(), + * push() stores information related to the current + * transformation state and style settings controlled by the + * following functions: rotate(), translate(), + * scale(), fill(), stroke(), tint(), + * strokeWeight(), strokeCap(), strokeJoin(), + * imageMode(), rectMode(), ellipseMode(), + * colorMode(), textAlign(), textFont(), * textMode(), textSize(), textLeading().
*
- * The push() and pop() functions were added with - * Processing 3.5. They can be used in place of pushMatrix(), - * popMatrix(), pushStyles(), and popStyles(). - * The difference is that push() and pop() control both the - * transformations (rotate, scale, translate) and the drawing styles + * The push() and pop() functions were added with + * Processing 3.5. They can be used in place of pushMatrix(), + * popMatrix(), pushStyles(), and popStyles(). + * The difference is that push() and pop() control both the + * transformations (rotate, scale, translate) and the drawing styles * at the same time. * * ( end auto-generated ) @@ -6940,7 +6940,7 @@ public void specular(int rgb) { /** * gray number specifying value between white and black - * + * * @param gray value between black and white, by default 0 to 255 */ public void specular(float gray) { @@ -7019,7 +7019,7 @@ public void emissive(int rgb) { /** * gray number specifying value between white and black - * + * * @param gray value between black and white, by default 0 to 255 */ public void emissive(float gray) { From a1e623c59afb5cfadfaefdf2e9f15ee82cee19cd Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 11:13:04 -0500 Subject: [PATCH 11/49] wrapping up other changes/edits --- core/todo.txt | 6 ++++-- todo.txt | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/todo.txt b/core/todo.txt index a5d49046a3..750a8e7772 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,9 +1,11 @@ -0270 (3.5.4 or 3.6) +0270 (3.5.4) +no changes + + _ size() issues on Mojave? _ https://github.com/processing/processing/issues/5791 _ use exit event to set mouseY to 0 on macOS _ https://github.com/processing/processing/pull/5796/files - _ possible fix for precision issues with PDF _ https://github.com/processing/processing/issues/5801#issuecomment-466632459 diff --git a/todo.txt b/todo.txt index 4c7a4fc110..113b6a27e0 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,4 @@ -0270 (3.5.4 or 3.6) +0270 (3.5.4) X use ctrl-page up/down for tabs on Windows X https://github.com/processing/processing/issues/5794 X fix potential highlighting issue that wasn't selecting portions of text @@ -19,6 +19,7 @@ X don't do library subfolders X show error when .properties file is missing from contribs X clean up a lot of bad temp file handling in the contrib manager X https://github.com/processing/processing/issues/5845 +X https://github.com/processing/processing/issues/5960 X NPE in installPreviouslyFailed() on startup X https://github.com/processing/processing/issues/5482 X https://github.com/processing/processing/issues/5916 @@ -28,9 +29,6 @@ X tweak mode not working X https://github.com/processing/processing/issues/5805 X https://github.com/processing/processing/pull/5909 -_ windows anti-malware leaves browser stuck at 100% -_ https://github.com/processing/processing/issues/5893 - from Casey _ Issue with https and downloading the binaries, +Checksums? @@ -70,6 +68,8 @@ _ https://github.com/processing/processing/pull/4040 high +_ windows anti-malware leaves browser stuck at 100% +_ https://github.com/processing/processing/issues/5893 _ run button not deactivating _ https://github.com/processing/processing/issues/5786 _ Find in Reference disabled for various keywords (draw, for, if, catch, while) From 349282fa1b15c7be47f5de0b3a8eb76f23eafce9 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 11:20:35 -0500 Subject: [PATCH 12/49] write release notes --- build/shared/revisions.txt | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 90daa44f8e..5ed6ba5914 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,3 +1,54 @@ +PROCESSING 3.5.4 (REV 0270) - 17 January 2020 + +This release has several bug fixes to improve the Contribution Manager, +get Tweak Mode working again, and so on. + + +[ changes ] + ++ Don't remove entries from Recent menu on Save As + https://github.com/processing/processing/issues/5902 + ++ Use ctrl-page up/down for changing tabs on Windows + https://github.com/processing/processing/issues/5794 + ++ Show error when .properties file is missing from a Library/Mode/Tool. + + +[ fixes ] + ++ Tweak Mode working again (fix from Gal Sasson) + https://github.com/processing/processing/issues/5805 + https://github.com/processing/processing/pull/5909 + ++ Fix potential highlighting issue that wasn't selecting portions of text + ++ Names in the contribution listing are no longer case sensitive + (It was placing lowercase names at the bottom of the list.) + ++ Clean up a lot of bad temp file handling in the contrib manager + https://github.com/processing/processing/issues/5845 + https://github.com/processing/processing/issues/5960 + ++ Fix NullPointerException in installPreviouslyFailed() on startup + https://github.com/processing/processing/issues/5482 + https://github.com/processing/processing/issues/5916 + + +[ internal ] + ++ Ignore subfolders in the "libraries" directory. This was causing some + nasty startup issues for folks, and other hard-to-track bugs. Hopefully + there aren't any installs that relied on this behavior. + ++ Update AppBundler to use newer SDK, recompile + ++ Edit build.xml files and appbundler to preserve more attributes + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + PROCESSING 3.5.3 (REV 0269) - 3 February 2019 This fixes a typo that left the "Redo" command with the wrong From e11941e0c3463cea7cd94e7204dfdb2c0d5d8f6b Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 12:46:01 -0500 Subject: [PATCH 13/49] rolling over for the next release --- app/src/processing/app/Base.java | 4 ++-- core/done.txt | 4 ++++ core/todo.txt | 3 +-- done.txt | 32 ++++++++++++++++++++++++++++++++ todo.txt | 31 +------------------------------ 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 91472a09e9..5d9b0a114c 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -56,9 +56,9 @@ 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 = 270; + static private final int REVISION = 271; /** This might be replaced by main() if there's a lib/version.txt file. */ - static private String VERSION_NAME = "0270"; //$NON-NLS-1$ + static private String VERSION_NAME = "0271"; //$NON-NLS-1$ /** Set true if this a proper release rather than a numbered revision. */ /** diff --git a/core/done.txt b/core/done.txt index abbdd66c29..a04e597a69 100644 --- a/core/done.txt +++ b/core/done.txt @@ -1,3 +1,7 @@ +0270 (3.5.4) +no changes + + 0269 (3.5.3) X fix/clean a few file i/o issues X deal with possible resource leak when loading URLs diff --git a/core/todo.txt b/core/todo.txt index 750a8e7772..c15593393c 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,5 +1,4 @@ -0270 (3.5.4) -no changes +0271 (3.5.5 unlikely) _ size() issues on Mojave? diff --git a/done.txt b/done.txt index 1da976c40b..ef2420519b 100644 --- a/done.txt +++ b/done.txt @@ -1,3 +1,35 @@ +0270 (3.5.4) +X use ctrl-page up/down for tabs on Windows +X https://github.com/processing/processing/issues/5794 +X fix potential highlighting issue that wasn't selecting portions of text +X update AppBundler to use newer SDK, recompile +X edit build.xml files and appbundler to preserve more attributes +X don't remove entries from Recent menu on Save As +X https://github.com/processing/processing/issues/5902 +o NPE in buildCoreModes() on startup +o https://github.com/processing/processing/issues/5823 +X not clear what was wrong here + +contrib manager +X contrib listing names should not be case sensitive +X libs in all caps appeared above those in lowercase +X ignore library subfolders +X don't unzip __MACOSX files with contribs +X don't do library subfolders +X show error when .properties file is missing from contribs +X clean up a lot of bad temp file handling in the contrib manager +X https://github.com/processing/processing/issues/5845 +X https://github.com/processing/processing/issues/5960 +X NPE in installPreviouslyFailed() on startup +X https://github.com/processing/processing/issues/5482 +X https://github.com/processing/processing/issues/5916 + +contribs +X tweak mode not working +X https://github.com/processing/processing/issues/5805 +X https://github.com/processing/processing/pull/5909 + + 0269 (3.5.3) X added reference for circle(), square(), push(), pop() X has the reference.zip file been fixed? (yep) diff --git a/todo.txt b/todo.txt index 113b6a27e0..9b53d85580 100644 --- a/todo.txt +++ b/todo.txt @@ -1,33 +1,4 @@ -0270 (3.5.4) -X use ctrl-page up/down for tabs on Windows -X https://github.com/processing/processing/issues/5794 -X fix potential highlighting issue that wasn't selecting portions of text -X update AppBundler to use newer SDK, recompile -X edit build.xml files and appbundler to preserve more attributes -X don't remove entries from Recent menu on Save As -X https://github.com/processing/processing/issues/5902 -o NPE in buildCoreModes() on startup -o https://github.com/processing/processing/issues/5823 -X not clear what was wrong here - -contrib manager -X contrib listing names should not be case sensitive -X libs in all caps appeared above those in lowercase -X ignore library subfolders -X don't unzip __MACOSX files with contribs -X don't do library subfolders -X show error when .properties file is missing from contribs -X clean up a lot of bad temp file handling in the contrib manager -X https://github.com/processing/processing/issues/5845 -X https://github.com/processing/processing/issues/5960 -X NPE in installPreviouslyFailed() on startup -X https://github.com/processing/processing/issues/5482 -X https://github.com/processing/processing/issues/5916 - -contribs -X tweak mode not working -X https://github.com/processing/processing/issues/5805 -X https://github.com/processing/processing/pull/5909 +0271 (3.5.5 unlikely) from Casey From 83fe79dc5ea7255045c523210075fbfe7de6a771 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 17 Jan 2020 16:42:21 -0500 Subject: [PATCH 14/49] make note of #5828 and #5906 --- todo.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/todo.txt b/todo.txt index 9b53d85580..cd2ec96414 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,10 @@ 0271 (3.5.5 unlikely) +contribs +X rename-variable menu allows Java identifiers +X https://github.com/processing/processing/issues/5828 +X https://github.com/processing/processing/pull/5906 + from Casey _ Issue with https and downloading the binaries, +Checksums? From f923be3fa2832fa8bc46696d672fc2674894d440 Mon Sep 17 00:00:00 2001 From: minimaximize Date: Sat, 7 Dec 2019 18:24:26 +1000 Subject: [PATCH 15/49] Use Java conventions for Array declaration --- core/src/processing/awt/PGraphicsJava2D.java | 10 +- core/src/processing/core/PApplet.java | 352 +++++++++--------- core/src/processing/core/PFont.java | 8 +- core/src/processing/core/PGraphics.java | 22 +- core/src/processing/core/PImage.java | 26 +- core/src/processing/core/PMatrix2D.java | 2 +- core/src/processing/core/PShapeOBJ.java | 2 +- core/src/processing/core/PShapeSVG.java | 6 +- core/src/processing/data/Table.java | 10 +- core/src/processing/javafx/PGraphicsFX2D.java | 6 +- core/src/processing/opengl/LinePath.java | 6 +- core/src/processing/opengl/PGL.java | 4 +- .../processing/opengl/PGraphicsOpenGL.java | 164 ++++---- core/src/processing/opengl/PJOGL.java | 4 +- 14 files changed, 303 insertions(+), 319 deletions(-) diff --git a/core/src/processing/awt/PGraphicsJava2D.java b/core/src/processing/awt/PGraphicsJava2D.java index c93ecada20..7d6e1c5972 100644 --- a/core/src/processing/awt/PGraphicsJava2D.java +++ b/core/src/processing/awt/PGraphicsJava2D.java @@ -82,7 +82,7 @@ public class PGraphicsJava2D extends PGraphics { float[] curveDrawY; int transformCount; - AffineTransform transformStack[] = + AffineTransform[] transformStack = new AffineTransform[MATRIX_STACK_DEPTH]; double[] transform = new double[6]; @@ -782,7 +782,7 @@ public void vertex(float x, float y) { //float vertex[]; if (vertexCount == vertices.length) { - float temp[][] = new float[vertexCount<<1][VERTEX_FIELD_COUNT]; + float[][] temp = new float[vertexCount<<1][VERTEX_FIELD_COUNT]; System.arraycopy(vertices, 0, temp, 0, vertexCount); vertices = temp; //message(CHATTER, "allocating more vertices " + vertices.length); @@ -1959,7 +1959,7 @@ protected void handleTextSize(float size) { @Override - protected float textWidthImpl(char buffer[], int start, int stop) { + protected float textWidthImpl(char[] buffer, int start, int stop) { if (textFont == null) { defaultFontOrDeath("textWidth"); } @@ -2028,7 +2028,7 @@ protected float textWidthImpl(char buffer[], int start, int stop) { @Override - protected void textLineImpl(char buffer[], int start, int stop, + protected void textLineImpl(char[] buffer, int start, int stop, float x, float y) { Font font = (Font) textFont.getNative(); // if (font != null && (textFont.isStream() || hints[ENABLE_NATIVE_FONTS])) { @@ -2828,7 +2828,7 @@ public void updatePixels(int x, int y, int c, int d) { // GET/SET - static int getset[] = new int[1]; + static int[] getset = new int[1]; @Override diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 4492d6ae00..2d5f4db5a7 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -5548,7 +5548,7 @@ public PImage loadImage(String filename, String extension) { //, Object params) } if (extension.equals("tif") || extension.equals("tiff")) { - byte bytes[] = loadBytes(filename); + byte[] bytes = loadBytes(filename); PImage image = (bytes == null) ? null : PImage.loadTIFF(bytes); // if (params != null) { // image.setParams(g, params); @@ -5563,7 +5563,7 @@ public PImage loadImage(String filename, String extension) { //, Object params) if (extension.equals("jpg") || extension.equals("jpeg") || extension.equals("gif") || extension.equals("png") || extension.equals("unknown")) { - byte bytes[] = loadBytes(filename); + byte[] bytes = loadBytes(filename); if (bytes == null) { return null; } else { @@ -5765,7 +5765,7 @@ protected PImage loadImageTGA(String filename) throws IOException { InputStream is = createInput(filename); if (is == null) return null; - byte header[] = new byte[18]; + byte[] header = new byte[18]; int offset = 0; do { int count = is.read(header, offset, header.length - offset); @@ -5885,7 +5885,7 @@ header[17] image descriptor (packed bits) } else { // header[2] is 10 or 11 int index = 0; - int px[] = outgoing.pixels; + int[] px = outgoing.pixels; while (index < px.length) { int num = is.read(); @@ -7600,12 +7600,12 @@ static public String[] loadStrings(InputStream input) { static public String[] loadStrings(BufferedReader reader) { try { - String lines[] = new String[100]; + String[] lines = new String[100]; int lineCount = 0; String line = null; while ((line = reader.readLine()) != null) { if (lineCount == lines.length) { - String temp[] = new String[lineCount << 1]; + String[] temp = new String[lineCount << 1]; System.arraycopy(lines, 0, temp, 0, lineCount); lines = temp; } @@ -7618,7 +7618,7 @@ static public String[] loadStrings(BufferedReader reader) { } // resize array to appropriate amount for these lines - String output[] = new String[lineCount]; + String[] output = new String[lineCount]; System.arraycopy(lines, 0, output, 0, lineCount); return output; @@ -7919,7 +7919,7 @@ static public void saveBytes(OutputStream output, byte[] data) { * @see PApplet#loadBytes(String) * @see PApplet#saveBytes(String, byte[]) */ - public void saveStrings(String filename, String data[]) { + public void saveStrings(String filename, String[] data) { saveStrings(saveFile(filename), data); } @@ -7927,7 +7927,7 @@ public void saveStrings(String filename, String data[]) { /** * @nowebref */ - static public void saveStrings(File file, String data[]) { + static public void saveStrings(File file, String[] data) { saveStrings(createOutput(file), data); } @@ -8241,7 +8241,7 @@ static public String urlDecode(String str) { * @param list array to sort * @see PApplet#reverse(boolean[]) */ - static public byte[] sort(byte list[]) { + static public byte[] sort(byte[] list) { return sort(list, list.length); } @@ -8255,7 +8255,7 @@ static public byte[] sort(byte[] list, int count) { return outgoing; } - static public char[] sort(char list[]) { + static public char[] sort(char[] list) { return sort(list, list.length); } @@ -8266,7 +8266,7 @@ static public char[] sort(char[] list, int count) { return outgoing; } - static public int[] sort(int list[]) { + static public int[] sort(int[] list) { return sort(list, list.length); } @@ -8277,7 +8277,7 @@ static public int[] sort(int[] list, int count) { return outgoing; } - static public float[] sort(float list[]) { + static public float[] sort(float[] list) { return sort(list, list.length); } @@ -8288,7 +8288,7 @@ static public float[] sort(float[] list, int count) { return outgoing; } - static public String[] sort(String list[]) { + static public String[] sort(String[] list) { return sort(list, list.length); } @@ -8395,85 +8395,85 @@ static public void arraycopy(Object src, Object dst) { * @param list the array to expand * @see PApplet#shorten(boolean[]) */ - static public boolean[] expand(boolean list[]) { + static public boolean[] expand(boolean[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } /** * @param newSize new size for the array */ - static public boolean[] expand(boolean list[], int newSize) { - boolean temp[] = new boolean[newSize]; + static public boolean[] expand(boolean[] list, int newSize) { + boolean[] temp = new boolean[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public byte[] expand(byte list[]) { + static public byte[] expand(byte[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public byte[] expand(byte list[], int newSize) { - byte temp[] = new byte[newSize]; + static public byte[] expand(byte[] list, int newSize) { + byte[] temp = new byte[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public char[] expand(char list[]) { + static public char[] expand(char[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public char[] expand(char list[], int newSize) { - char temp[] = new char[newSize]; + static public char[] expand(char[] list, int newSize) { + char[] temp = new char[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public int[] expand(int list[]) { + static public int[] expand(int[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public int[] expand(int list[], int newSize) { - int temp[] = new int[newSize]; + static public int[] expand(int[] list, int newSize) { + int[] temp = new int[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public long[] expand(long list[]) { + static public long[] expand(long[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public long[] expand(long list[], int newSize) { - long temp[] = new long[newSize]; + static public long[] expand(long[] list, int newSize) { + long[] temp = new long[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public float[] expand(float list[]) { + static public float[] expand(float[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public float[] expand(float list[], int newSize) { - float temp[] = new float[newSize]; + static public float[] expand(float[] list, int newSize) { + float[] temp = new float[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public double[] expand(double list[]) { + static public double[] expand(double[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public double[] expand(double list[], int newSize) { - double temp[] = new double[newSize]; + static public double[] expand(double[] list, int newSize) { + double[] temp = new double[newSize]; System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; } - static public String[] expand(String list[]) { + static public String[] expand(String[] list) { return expand(list, list.length > 0 ? list.length << 1 : 1); } - static public String[] expand(String list[], int newSize) { - String temp[] = new String[newSize]; + static public String[] expand(String[] list, int newSize) { + String[] temp = new String[newSize]; // in case the new size is smaller than list.length System.arraycopy(list, 0, temp, 0, Math.min(newSize, list.length)); return temp; @@ -8517,31 +8517,31 @@ static public Object expand(Object list, int newSize) { * @see PApplet#shorten(boolean[]) * @see PApplet#expand(boolean[]) */ - static public byte[] append(byte array[], byte value) { + static public byte[] append(byte[] array, byte value) { array = expand(array, array.length + 1); array[array.length-1] = value; return array; } - static public char[] append(char array[], char value) { + static public char[] append(char[] array, char value) { array = expand(array, array.length + 1); array[array.length-1] = value; return array; } - static public int[] append(int array[], int value) { + static public int[] append(int[] array, int value) { array = expand(array, array.length + 1); array[array.length-1] = value; return array; } - static public float[] append(float array[], float value) { + static public float[] append(float[] array, float value) { array = expand(array, array.length + 1); array[array.length-1] = value; return array; } - static public String[] append(String array[], String value) { + static public String[] append(String[] array, String value) { array = expand(array, array.length + 1); array[array.length-1] = value; return array; @@ -8571,27 +8571,27 @@ static public Object append(Object array, Object value) { * @see PApplet#append(byte[], byte) * @see PApplet#expand(boolean[]) */ - static public boolean[] shorten(boolean list[]) { + static public boolean[] shorten(boolean[] list) { return subset(list, 0, list.length-1); } - static public byte[] shorten(byte list[]) { + static public byte[] shorten(byte[] list) { return subset(list, 0, list.length-1); } - static public char[] shorten(char list[]) { + static public char[] shorten(char[] list) { return subset(list, 0, list.length-1); } - static public int[] shorten(int list[]) { + static public int[] shorten(int[] list) { return subset(list, 0, list.length-1); } - static public float[] shorten(float list[]) { + static public float[] shorten(float[] list) { return subset(list, 0, list.length-1); } - static public String[] shorten(String list[]) { + static public String[] shorten(String[] list) { return subset(list, 0, list.length-1); } @@ -8621,9 +8621,9 @@ static public Object shorten(Object list) { * @see PApplet#concat(boolean[], boolean[]) * @see PApplet#subset(boolean[], int, int) */ - static final public boolean[] splice(boolean list[], + static final public boolean[] splice(boolean[] list, boolean value, int index) { - boolean outgoing[] = new boolean[list.length + 1]; + boolean[] outgoing = new boolean[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8631,9 +8631,9 @@ static final public boolean[] splice(boolean list[], return outgoing; } - static final public boolean[] splice(boolean list[], - boolean value[], int index) { - boolean outgoing[] = new boolean[list.length + value.length]; + static final public boolean[] splice(boolean[] list, + boolean[] value, int index) { + boolean[] outgoing = new boolean[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8641,9 +8641,9 @@ static final public boolean[] splice(boolean list[], return outgoing; } - static final public byte[] splice(byte list[], + static final public byte[] splice(byte[] list, byte value, int index) { - byte outgoing[] = new byte[list.length + 1]; + byte[] outgoing = new byte[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8651,9 +8651,9 @@ static final public byte[] splice(byte list[], return outgoing; } - static final public byte[] splice(byte list[], - byte value[], int index) { - byte outgoing[] = new byte[list.length + value.length]; + static final public byte[] splice(byte[] list, + byte[] value, int index) { + byte[] outgoing = new byte[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8662,9 +8662,9 @@ static final public byte[] splice(byte list[], } - static final public char[] splice(char list[], + static final public char[] splice(char[] list, char value, int index) { - char outgoing[] = new char[list.length + 1]; + char[] outgoing = new char[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8672,9 +8672,9 @@ static final public char[] splice(char list[], return outgoing; } - static final public char[] splice(char list[], - char value[], int index) { - char outgoing[] = new char[list.length + value.length]; + static final public char[] splice(char[] list, + char[] value, int index) { + char[] outgoing = new char[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8682,9 +8682,9 @@ static final public char[] splice(char list[], return outgoing; } - static final public int[] splice(int list[], + static final public int[] splice(int[] list, int value, int index) { - int outgoing[] = new int[list.length + 1]; + int[] outgoing = new int[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8692,9 +8692,9 @@ static final public int[] splice(int list[], return outgoing; } - static final public int[] splice(int list[], - int value[], int index) { - int outgoing[] = new int[list.length + value.length]; + static final public int[] splice(int[] list, + int[] value, int index) { + int[] outgoing = new int[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8702,9 +8702,9 @@ static final public int[] splice(int list[], return outgoing; } - static final public float[] splice(float list[], + static final public float[] splice(float[] list, float value, int index) { - float outgoing[] = new float[list.length + 1]; + float[] outgoing = new float[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8712,9 +8712,9 @@ static final public float[] splice(float list[], return outgoing; } - static final public float[] splice(float list[], - float value[], int index) { - float outgoing[] = new float[list.length + value.length]; + static final public float[] splice(float[] list, + float[] value, int index) { + float[] outgoing = new float[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8722,9 +8722,9 @@ static final public float[] splice(float list[], return outgoing; } - static final public String[] splice(String list[], + static final public String[] splice(String[] list, String value, int index) { - String outgoing[] = new String[list.length + 1]; + String[] outgoing = new String[list.length + 1]; System.arraycopy(list, 0, outgoing, 0, index); outgoing[index] = value; System.arraycopy(list, index, outgoing, index + 1, @@ -8732,9 +8732,9 @@ static final public String[] splice(String list[], return outgoing; } - static final public String[] splice(String list[], - String value[], int index) { - String outgoing[] = new String[list.length + value.length]; + static final public String[] splice(String[] list, + String[] value, int index) { + String[] outgoing = new String[list.length + value.length]; System.arraycopy(list, 0, outgoing, 0, index); System.arraycopy(value, 0, outgoing, index, value.length); System.arraycopy(list, index, outgoing, index + value.length, @@ -8915,43 +8915,43 @@ static public Object subset(Object list, int start, int count) { * @see PApplet#splice(boolean[], boolean, int) * @see PApplet#arrayCopy(Object, int, Object, int, int) */ - static public boolean[] concat(boolean a[], boolean b[]) { - boolean c[] = new boolean[a.length + b.length]; + static public boolean[] concat(boolean[] a, boolean[] b) { + boolean[] c = new boolean[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; } - static public byte[] concat(byte a[], byte b[]) { - byte c[] = new byte[a.length + b.length]; + static public byte[] concat(byte[] a, byte[] b) { + byte[] c = new byte[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; } - static public char[] concat(char a[], char b[]) { - char c[] = new char[a.length + b.length]; + static public char[] concat(char[] a, char[] b) { + char[] c = new char[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; } - static public int[] concat(int a[], int b[]) { - int c[] = new int[a.length + b.length]; + static public int[] concat(int[] a, int[] b) { + int[] c = new int[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; } - static public float[] concat(float a[], float b[]) { - float c[] = new float[a.length + b.length]; + static public float[] concat(float[] a, float[] b) { + float[] c = new float[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; } - static public String[] concat(String a[], String b[]) { - String c[] = new String[a.length + b.length]; + static public String[] concat(String[] a, String[] b) { + String[] c = new String[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; @@ -8980,8 +8980,8 @@ static public Object concat(Object a, Object b) { * @param list booleans[], bytes[], chars[], ints[], floats[], or Strings[] * @see PApplet#sort(String[], int) */ - static public boolean[] reverse(boolean list[]) { - boolean outgoing[] = new boolean[list.length]; + static public boolean[] reverse(boolean[] list) { + boolean[] outgoing = new boolean[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -8989,8 +8989,8 @@ static public boolean[] reverse(boolean list[]) { return outgoing; } - static public byte[] reverse(byte list[]) { - byte outgoing[] = new byte[list.length]; + static public byte[] reverse(byte[] list) { + byte[] outgoing = new byte[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -8998,8 +8998,8 @@ static public byte[] reverse(byte list[]) { return outgoing; } - static public char[] reverse(char list[]) { - char outgoing[] = new char[list.length]; + static public char[] reverse(char[] list) { + char[] outgoing = new char[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -9007,8 +9007,8 @@ static public char[] reverse(char list[]) { return outgoing; } - static public int[] reverse(int list[]) { - int outgoing[] = new int[list.length]; + static public int[] reverse(int[] list) { + int[] outgoing = new int[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -9016,8 +9016,8 @@ static public int[] reverse(int list[]) { return outgoing; } - static public float[] reverse(float list[]) { - float outgoing[] = new float[list.length]; + static public float[] reverse(float[] list) { + float[] outgoing = new float[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -9025,8 +9025,8 @@ static public float[] reverse(float list[]) { return outgoing; } - static public String[] reverse(String list[]) { - String outgoing[] = new String[list.length]; + static public String[] reverse(String[] list) { + String[] outgoing = new String[list.length]; int length1 = list.length - 1; for (int i = 0; i < list.length; i++) { outgoing[i] = list[length1 - i]; @@ -9149,7 +9149,7 @@ static public String[] splitTokens(String value) { */ static public String[] splitTokens(String value, String delim) { StringTokenizer toker = new StringTokenizer(value, delim); - String pieces[] = new String[toker.countTokens()]; + String[] pieces = new String[toker.countTokens()]; int index = 0; while (toker.hasMoreTokens()) { @@ -9199,7 +9199,7 @@ static public String[] split(String value, char delim) { if (value == null) return null; //return split(what, String.valueOf(delim)); // huh - char chars[] = value.toCharArray(); + char[] chars = value.toCharArray(); int splitCount = 0; //1; for (int i = 0; i < chars.length; i++) { if (chars[i] == delim) splitCount++; @@ -9211,12 +9211,12 @@ static public String[] split(String value, char delim) { // on second thought, i don't agree with this, will disable //} if (splitCount == 0) { - String splits[] = new String[1]; + String[] splits = new String[1]; splits[0] = value; return splits; } //int pieceCount = splitCount + 1; - String splits[] = new String[splitCount + 1]; + String[] splits = new String[splitCount + 1]; int splitIndex = 0; int startIndex = 0; for (int i = 0; i < chars.length; i++) { @@ -9457,8 +9457,8 @@ static final public boolean[] parseBoolean(byte what[]) { * to zero will return false, and any other value will return true. * @return array of boolean elements */ - static final public boolean[] parseBoolean(int what[]) { - boolean outgoing[] = new boolean[what.length]; + static final public boolean[] parseBoolean(int[] what) { + boolean[] outgoing = new boolean[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (what[i] != 0); } @@ -9476,8 +9476,8 @@ static final public boolean[] parseBoolean(float what[]) { } */ - static final public boolean[] parseBoolean(String what[]) { - boolean outgoing[] = new boolean[what.length]; + static final public boolean[] parseBoolean(String[] what) { + boolean[] outgoing = new boolean[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = Boolean.parseBoolean(what[i]); } @@ -9511,32 +9511,32 @@ static final public byte[] parseByte(String what) { // note: array[] // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - static final public byte[] parseByte(boolean what[]) { - byte outgoing[] = new byte[what.length]; + static final public byte[] parseByte(boolean[] what) { + byte[] outgoing = new byte[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = what[i] ? (byte)1 : 0; } return outgoing; } - static final public byte[] parseByte(char what[]) { - byte outgoing[] = new byte[what.length]; + static final public byte[] parseByte(char[] what) { + byte[] outgoing = new byte[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (byte) what[i]; } return outgoing; } - static final public byte[] parseByte(int what[]) { - byte outgoing[] = new byte[what.length]; + static final public byte[] parseByte(int[] what) { + byte[] outgoing = new byte[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (byte) what[i]; } return outgoing; } - static final public byte[] parseByte(float what[]) { - byte outgoing[] = new byte[what.length]; + static final public byte[] parseByte(float[] what) { + byte[] outgoing = new byte[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (byte) what[i]; } @@ -9591,8 +9591,8 @@ static final public char[] parseChar(boolean what[]) { // 0/1 or T/F ? } */ - static final public char[] parseChar(byte what[]) { - char outgoing[] = new char[what.length]; + static final public char[] parseChar(byte[] what) { + char[] outgoing = new char[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (char) (what[i] & 0xff); } @@ -9608,8 +9608,8 @@ static final public char[] parseChar(int what[]) { } /* - static final public char[] parseChar(float what[]) { // nonsensical - char outgoing[] = new char[what.length]; + static final public char[] parseChar(int[] what) { + char[] outgoing = new char[what.length]; for (int i = 0; i < what.length; i++) { outgoing[i] = (char) what[i]; } @@ -9679,32 +9679,32 @@ static final public int parseInt(String what, int otherwise) { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - static final public int[] parseInt(boolean what[]) { - int list[] = new int[what.length]; + static final public int[] parseInt(boolean[] what) { + int[] list = new int[what.length]; for (int i = 0; i < what.length; i++) { list[i] = what[i] ? 1 : 0; } return list; } - static final public int[] parseInt(byte what[]) { // note this unsigns - int list[] = new int[what.length]; + static final public int[] parseInt(byte[] what) { // note this unsigns + int[] list = new int[what.length]; for (int i = 0; i < what.length; i++) { list[i] = (what[i] & 0xff); } return list; } - static final public int[] parseInt(char what[]) { - int list[] = new int[what.length]; + static final public int[] parseInt(char[] what) { + int[] list = new int[what.length]; for (int i = 0; i < what.length; i++) { list[i] = what[i]; } return list; } - static public int[] parseInt(float what[]) { - int inties[] = new int[what.length]; + static public int[] parseInt(float[] what) { + int[] inties = new int[what.length]; for (int i = 0; i < what.length; i++) { inties[i] = (int)what[i]; } @@ -9720,7 +9720,7 @@ static public int[] parseInt(float what[]) { * * numbers will contain { 1, 300, 44 } */ - static public int[] parseInt(String what[]) { + static public int[] parseInt(String[] what) { return parseInt(what, 0); } @@ -9734,8 +9734,8 @@ static public int[] parseInt(String what[]) { * * numbers will contain { 1, 300, 9999, 44 } */ - static public int[] parseInt(String what[], int missing) { - int output[] = new int[what.length]; + static public int[] parseInt(String[] what, int missing) { + int[] output = new int[what.length]; for (int i = 0; i < what.length; i++) { try { output[i] = Integer.parseInt(what[i]); @@ -9776,46 +9776,28 @@ static final public float parseFloat(String what, float otherwise) { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - /* - static final public float[] parseFloat(boolean what[]) { - float floaties[] = new float[what.length]; - for (int i = 0; i < what.length; i++) { - floaties[i] = what[i] ? 1 : 0; - } - return floaties; - } - - static final public float[] parseFloat(char what[]) { - float floaties[] = new float[what.length]; - for (int i = 0; i < what.length; i++) { - floaties[i] = (char) what[i]; - } - return floaties; - } - */ - - static final public float[] parseFloat(byte what[]) { - float floaties[] = new float[what.length]; + static final public float[] parseFloat(byte[] what) { + float[] floaties = new float[what.length]; for (int i = 0; i < what.length; i++) { floaties[i] = what[i]; } return floaties; } - static final public float[] parseFloat(int what[]) { - float floaties[] = new float[what.length]; + static final public float[] parseFloat(int[] what) { + float[] floaties = new float[what.length]; for (int i = 0; i < what.length; i++) { floaties[i] = what[i]; } return floaties; } - static final public float[] parseFloat(String what[]) { + static final public float[] parseFloat(String[] what) { return parseFloat(what, Float.NaN); } - static final public float[] parseFloat(String what[], float missing) { - float output[] = new float[what.length]; + static final public float[] parseFloat(String[] what, float missing) { + float[] output = new float[what.length]; for (int i = 0; i < what.length; i++) { try { output[i] = Float.parseFloat(what[i]); @@ -9850,32 +9832,32 @@ static final public String str(float x) { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - static final public String[] str(boolean x[]) { - String s[] = new String[x.length]; + static final public String[] str(boolean[] x) { + String[] s = new String[x.length]; for (int i = 0; i < x.length; i++) s[i] = String.valueOf(x[i]); return s; } - static final public String[] str(byte x[]) { - String s[] = new String[x.length]; + static final public String[] str(byte[] x) { + String[] s = new String[x.length]; for (int i = 0; i < x.length; i++) s[i] = String.valueOf(x[i]); return s; } - static final public String[] str(char x[]) { - String s[] = new String[x.length]; + static final public String[] str(char[] x) { + String[] s = new String[x.length]; for (int i = 0; i < x.length; i++) s[i] = String.valueOf(x[i]); return s; } - static final public String[] str(int x[]) { - String s[] = new String[x.length]; + static final public String[] str(int[] x) { + String[] s = new String[x.length]; for (int i = 0; i < x.length; i++) s[i] = String.valueOf(x[i]); return s; } - static final public String[] str(float x[]) { - String s[] = new String[x.length]; + static final public String[] str(float[] x) { + String[] s = new String[x.length]; for (int i = 0; i < x.length; i++) s[i] = String.valueOf(x[i]); return s; } @@ -9932,8 +9914,8 @@ static public String[] nf(float[] nums) { * @see int(float) */ - static public String[] nf(int nums[], int digits) { - String formatted[] = new String[nums.length]; + static public String[] nf(int[] nums, int digits) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nf(nums[i], digits); } @@ -9976,8 +9958,8 @@ static public String nf(int num, int digits) { * @see PApplet#nfp(float, int, int) * @see PApplet#nfs(float, int, int) */ - static public String[] nfc(int nums[]) { - String formatted[] = new String[nums.length]; + static public String[] nfc(int[] nums) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfc(nums[i]); } @@ -10036,8 +10018,8 @@ static public String nfs(int num, int digits) { /** * @param nums the numbers to format */ - static public String[] nfs(int nums[], int digits) { - String formatted[] = new String[nums.length]; + static public String[] nfs(int[] nums, int digits) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfs(nums[i], digits); } @@ -10074,8 +10056,8 @@ static public String nfp(int num, int digits) { /** * @param nums the numbers to format */ - static public String[] nfp(int nums[], int digits) { - String formatted[] = new String[nums.length]; + static public String[] nfp(int[] nums, int digits) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfp(nums[i], digits); } @@ -10096,8 +10078,8 @@ static public String[] nfp(int nums[], int digits) { * @param left number of digits to the left of the decimal point * @param right number of digits to the right of the decimal point */ - static public String[] nf(float nums[], int left, int right) { - String formatted[] = new String[nums.length]; + static public String[] nf(float[] nums, int left, int right) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nf(nums[i], left, right); } @@ -10129,8 +10111,8 @@ static public String nf(float num, int left, int right) { /** * @param right number of digits to the right of the decimal point */ - static public String[] nfc(float nums[], int right) { - String formatted[] = new String[nums.length]; + static public String[] nfc(float[] nums, int right) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfc(nums[i], right); } @@ -10163,8 +10145,8 @@ static public String nfc(float num, int right) { * @param left the number of digits to the left of the decimal point * @param right the number of digits to the right of the decimal point */ - static public String[] nfs(float nums[], int left, int right) { - String formatted[] = new String[nums.length]; + static public String[] nfs(float[] nums, int left, int right) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfs(nums[i], left, right); } @@ -10179,8 +10161,8 @@ static public String nfs(float num, int left, int right) { * @param left the number of digits to the left of the decimal point * @param right the number of digits to the right of the decimal point */ - static public String[] nfp(float nums[], int left, int right) { - String formatted[] = new String[nums.length]; + static public String[] nfp(float[] nums, int left, int right) { + String[] formatted = new String[nums.length]; for (int i = 0; i < formatted.length; i++) { formatted[i] = nfp(nums[i], left, right); } diff --git a/core/src/processing/core/PFont.java b/core/src/processing/core/PFont.java index 33ca7eb404..12ee61a36b 100644 --- a/core/src/processing/core/PFont.java +++ b/core/src/processing/core/PFont.java @@ -204,7 +204,7 @@ public PFont(Font font, boolean smooth) { * @nowebref * @param charset array of all unicode chars that should be included */ - public PFont(Font font, boolean smooth, char charset[]) { + public PFont(Font font, boolean smooth, char[] charset) { // save this so that we can use the native version this.font = font; this.smooth = smooth; @@ -329,7 +329,7 @@ public PFont(Font font, boolean smooth, char charset[]) { * * @nowebref */ - public PFont(Font font, boolean smooth, char charset[], + public PFont(Font font, boolean smooth, char[] charset, boolean stream, int density) { this(font, smooth, charset); this.stream = stream; @@ -865,7 +865,7 @@ public PShape getShape(char ch, float detail) { for (int i = 0; i < EXTRA_CHARS.length; i++) { CHARSET[index++] = EXTRA_CHARS[i]; } - }; + } /** @@ -885,7 +885,7 @@ public PShape getShape(char ch, float detail) { */ static public String[] list() { loadFonts(); - String list[] = new String[fonts.length]; + String[] list = new String[fonts.length]; for (int i = 0; i < list.length; i++) { list[i] = fonts[i].getName(); } diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 032b69928d..0a77d88537 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -570,7 +570,7 @@ public class PGraphics extends PImage implements PConstants { // vertices public static final int DEFAULT_VERTICES = 512; - protected float vertices[][] = + protected float[][] vertices = new float[DEFAULT_VERTICES][VERTEX_FIELD_COUNT]; protected int vertexCount; // total number of vertices @@ -605,7 +605,7 @@ public class PGraphics extends PImage implements PConstants { // spline vertices - protected float curveVertices[][]; + protected float[][] curveVertices; protected int curveVertexCount; // ........................................................ @@ -618,8 +618,8 @@ public class PGraphics extends PImage implements PConstants { // [toxi 031031] // changed table's precision to 0.5 degree steps // introduced new vars for more flexible code - static final protected float sinLUT[]; - static final protected float cosLUT[]; + static final protected float[] sinLUT; + static final protected float[] cosLUT; static final protected float SINCOS_PRECISION = 0.5f; static final protected int SINCOS_LENGTH = (int) (360f / SINCOS_PRECISION); static { @@ -702,7 +702,9 @@ public class PGraphics extends PImage implements PConstants { // [toxi031031] new & faster sphere code w/ support flexible resolutions // will be set by sphereDetail() or 1st call to sphere() - protected float sphereX[], sphereY[], sphereZ[]; + protected float[] sphereX; + protected float[] sphereY; + protected float[] sphereZ; /// Number of U steps (aka "theta") around longitudinally spanning 2*pi public int sphereDetailU = 0; @@ -1388,7 +1390,7 @@ public void noTexture() { protected void vertexCheck() { if (vertexCount == vertices.length) { - float temp[][] = new float[vertexCount << 1][VERTEX_FIELD_COUNT]; + float[][] temp = new float[vertexCount << 1][VERTEX_FIELD_COUNT]; System.arraycopy(vertices, 0, temp, 0, vertexCount); vertices = temp; } @@ -1480,10 +1482,10 @@ public void vertex(float x, float y, float z) { // http://dev.processing.org/bugs/show_bug.cgi?id=444 if (shape == POLYGON) { if (vertexCount > 0) { - float pvertex[] = vertices[vertexCount-1]; if ((Math.abs(pvertex[X] - x) < EPSILON) && (Math.abs(pvertex[Y] - y) < EPSILON) && (Math.abs(pvertex[Z] - z) < EPSILON)) { + float[] pvertex = vertices[vertexCount-1]; // this vertex is identical, don't add it, // because it will anger the triangulator return; @@ -4551,7 +4553,7 @@ public float textWidth(char[] chars, int start, int length) { * Unlike the previous version that was inside PFont, this will * return the size not of a 1 pixel font, but the actual current size. */ - protected float textWidthImpl(char buffer[], int start, int stop) { + protected float textWidthImpl(char[] buffer, int start, int stop) { float wide = 0; for (int i = start; i < stop; i++) { // could add kerning here, but it just ain't implemented @@ -5019,7 +5021,7 @@ public void text(float num, float x, float y, float z) { * Handles placement of a text line, then calls textLineImpl * to actually render at the specific point. */ - protected void textLineAlignImpl(char buffer[], int start, int stop, + protected void textLineAlignImpl(char[] buffer, int start, int stop, float x, float y) { if (textAlign == CENTER) { x -= textWidthImpl(buffer, start, stop) / 2f; @@ -5035,7 +5037,7 @@ protected void textLineAlignImpl(char buffer[], int start, int stop, /** * Implementation of actual drawing for a line of text. */ - protected void textLineImpl(char buffer[], int start, int stop, + protected void textLineImpl(char[] buffer, int start, int stop, float x, float y) { for (int index = start; index < stop; index++) { textCharImpl(buffer[index], x, y); diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java index e21520d58f..d83b1da5d0 100644 --- a/core/src/processing/core/PImage.java +++ b/core/src/processing/core/PImage.java @@ -940,7 +940,7 @@ protected void setImpl(PImage sourceImage, * @param maskArray array of integers used as the alpha channel, needs to be * the same length as the image's pixel array. */ - public void mask(int maskArray[]) { // ignore + public void mask(int[] maskArray) { // ignore loadPixels(); // don't execute if mask image is different size if (maskArray.length != pixels.length) { @@ -1239,7 +1239,7 @@ protected void buildBlurKernel(float r) { protected void blurAlpha(float r) { int sum, cb; int read, ri, ym, ymi, bk0; - int b2[] = new int[pixels.length]; + int[] b2 = new int[pixels.length]; int yi = 0; buildBlurKernel(r); @@ -1310,9 +1310,9 @@ protected void blurAlpha(float r) { protected void blurRGB(float r) { int sum, cr, cg, cb; //, k; int /*pixel,*/ read, ri, /*roff,*/ ym, ymi, /*riw,*/ bk0; - int r2[] = new int[pixels.length]; - int g2[] = new int[pixels.length]; - int b2[] = new int[pixels.length]; + int[] r2 = new int[pixels.length]; + int[] g2 = new int[pixels.length]; + int[] b2 = new int[pixels.length]; int yi = 0; buildBlurKernel(r); @@ -1393,10 +1393,10 @@ protected void blurARGB(float r) { int sum, cr, cg, cb, ca; int /*pixel,*/ read, ri, /*roff,*/ ym, ymi, /*riw,*/ bk0; int wh = pixels.length; - int r2[] = new int[wh]; - int g2[] = new int[wh]; - int b2[] = new int[wh]; - int a2[] = new int[wh]; + int[] r2 = new int[wh]; + int[] g2 = new int[wh]; + int[] b2 = new int[wh]; + int[] a2 = new int[wh]; int yi = 0; buildBlurKernel(r); @@ -2948,7 +2948,7 @@ private static int blend_burn(int dst, int src) { // FILE I/O - static byte TIFF_HEADER[] = { + static byte[] TIFF_HEADER = { 77, 77, 0, 42, 0, 0, 0, 8, 0, 9, 0, -2, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 3, 0, 0, 0, 3, 0, 0, 0, 122, 1, 6, 0, 3, 0, @@ -2961,7 +2961,7 @@ private static int blend_burn(int dst, int src) { static final String TIFF_ERROR = "Error: Processing can only read its own TIFF files."; - static protected PImage loadTIFF(byte tiff[]) { + static protected PImage loadTIFF(byte[] tiff) { if ((tiff[42] != tiff[102]) || // width/height in both places (tiff[43] != tiff[103])) { System.err.println(TIFF_ERROR); @@ -3018,7 +3018,7 @@ protected boolean saveTIFF(OutputStream output) { } */ try { - byte tiff[] = new byte[768]; + byte[] tiff = new byte[768]; System.arraycopy(TIFF_HEADER, 0, tiff, 0, TIFF_HEADER.length); tiff[30] = (byte) ((pixelWidth >> 8) & 0xff); @@ -3069,7 +3069,7 @@ protected boolean saveTIFF(OutputStream output) { * specification */ protected boolean saveTGA(OutputStream output) { - byte header[] = new byte[18]; + byte[] header = new byte[18]; if (format == ALPHA) { // save ALPHA images as 8bit grayscale header[2] = 0x0B; diff --git a/core/src/processing/core/PMatrix2D.java b/core/src/processing/core/PMatrix2D.java index 38f82bdfd3..c30a3504e3 100644 --- a/core/src/processing/core/PMatrix2D.java +++ b/core/src/processing/core/PMatrix2D.java @@ -381,7 +381,7 @@ public PVector mult(PVector source, PVector target) { * If out is null or not length four, a new float array will be returned. * The values for vec and out can be the same (though that's less efficient). */ - public float[] mult(float vec[], float out[]) { + public float[] mult(float[] vec, float[] out) { if (out == null || out.length != 2) { out = new float[2]; } diff --git a/core/src/processing/core/PShapeOBJ.java b/core/src/processing/core/PShapeOBJ.java index a46e6ab8a8..5ae8c9d1e9 100644 --- a/core/src/processing/core/PShapeOBJ.java +++ b/core/src/processing/core/PShapeOBJ.java @@ -327,7 +327,7 @@ static protected void parseMTL(PApplet parent, String mtlfn, String path, while ((line = reader.readLine()) != null) { // Parse the line line = line.trim(); - String parts[] = line.split("\\s+"); + String[] parts = line.split("\\s+"); if (parts.length > 0) { // Extract the material data. if (parts[0].equals("newmtl")) { diff --git a/core/src/processing/core/PShapeSVG.java b/core/src/processing/core/PShapeSVG.java index d74253af6e..f572406ebc 100644 --- a/core/src/processing/core/PShapeSVG.java +++ b/core/src/processing/core/PShapeSVG.java @@ -1499,7 +1499,7 @@ static public class Gradient extends PShapeSVG { public Gradient(PShapeSVG parent, XML properties) { super(parent, properties, true); - XML elements[] = properties.getChildren(); + XML[] elements = properties.getChildren(); offset = new float[elements.length]; color = new int[elements.length]; @@ -1555,7 +1555,7 @@ public LinearGradient(PShapeSVG parent, XML properties) { properties.getString("gradientTransform"); if (transformStr != null) { - float t[] = parseTransform(transformStr).get(null); + float[] t = parseTransform(transformStr).get(null); this.transform = new AffineTransform(t[0], t[3], t[1], t[4], t[2], t[5]); Point2D t1 = transform.transform(new Point2D.Float(x1, y1), null); @@ -1587,7 +1587,7 @@ public RadialGradient(PShapeSVG parent, XML properties) { properties.getString("gradientTransform"); if (transformStr != null) { - float t[] = parseTransform(transformStr).get(null); + float[] t = parseTransform(transformStr).get(null); this.transform = new AffineTransform(t[0], t[3], t[1], t[4], t[2], t[5]); Point2D t1 = transform.transform(new Point2D.Float(cx, cy), null); diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index 4d18651cc7..e0684b4c1e 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -1712,19 +1712,19 @@ protected void loadBinary(InputStream is) throws IOException { columns[column] = new int[rowCount]; break; case LONG: - columns[column] = new long[rowCount];; + columns[column] = new long[rowCount]; break; case FLOAT: - columns[column] = new float[rowCount];; + columns[column] = new float[rowCount]; break; case DOUBLE: - columns[column] = new double[rowCount];; + columns[column] = new double[rowCount]; break; case STRING: - columns[column] = new String[rowCount];; + columns[column] = new String[rowCount]; break; case CATEGORY: - columns[column] = new int[rowCount];; + columns[column] = new int[rowCount]; break; default: throw new IllegalArgumentException(newType + " is not a valid column type."); diff --git a/core/src/processing/javafx/PGraphicsFX2D.java b/core/src/processing/javafx/PGraphicsFX2D.java index 74758ceb7b..7868c7fe0f 100644 --- a/core/src/processing/javafx/PGraphicsFX2D.java +++ b/core/src/processing/javafx/PGraphicsFX2D.java @@ -67,7 +67,7 @@ public class PGraphicsFX2D extends PGraphics { /// break the shape at the next vertex (next vertex() call is a moveto()) boolean breakShape; - private float pathCoordsBuffer[] = new float[6]; + private float[] pathCoordsBuffer = new float[6]; /// coordinates for internal curve calculation float[] curveCoordX; @@ -76,7 +76,7 @@ public class PGraphicsFX2D extends PGraphics { float[] curveDrawY; int transformCount; - Affine transformStack[] = new Affine[MATRIX_STACK_DEPTH]; + Affine[] transformStack = new Affine[MATRIX_STACK_DEPTH]; // Line2D.Float line = new Line2D.Float(); // Ellipse2D.Float ellipse = new Ellipse2D.Float(); @@ -239,7 +239,7 @@ public void texture(PImage image) { @Override public void vertex(float x, float y) { if (vertexCount == vertices.length) { - float temp[][] = new float[vertexCount<<1][VERTEX_FIELD_COUNT]; + float[][] temp = new float[vertexCount<<1][VERTEX_FIELD_COUNT]; System.arraycopy(vertices, 0, temp, 0, vertexCount); vertices = temp; //message(CHATTER, "allocating more vertices " + vertices.length); diff --git a/core/src/processing/opengl/LinePath.java b/core/src/processing/opengl/LinePath.java index a3705df0fc..03c1d69d57 100644 --- a/core/src/processing/opengl/LinePath.java +++ b/core/src/processing/opengl/LinePath.java @@ -324,7 +324,7 @@ public final void reset() { static public class PathIterator { - float floatCoords[]; + float[] floatCoords; int typeIdx; @@ -334,7 +334,7 @@ static public class PathIterator { LinePath path; - static final int curvecoords[] = { 2, 2, 0 }; + static final int[] curvecoords = { 2, 2, 0 }; PathIterator(LinePath p2df) { this.path = p2df; @@ -470,7 +470,7 @@ private static void strokeTo(LinePath src, float width, int caps, int join, private static void pathTo(PathIterator pi, LineStroker lsink) { - float coords[] = new float[6]; + float[] coords = new float[6]; while (!pi.isDone()) { int color; switch (pi.currentSegment(coords)) { diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index ecfbb1715c..d57eb91269 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -475,7 +475,7 @@ protected int getDefaultReadBuffer() { } - protected boolean isFBOBacked() {; + protected boolean isFBOBacked() { return fboLayerEnabled; } @@ -2127,7 +2127,7 @@ protected int[] getGLVersion() { String[] parts = version.split(" "); for (int i = 0; i < parts.length; i++) { if (0 < parts[i].indexOf(".")) { - String nums[] = parts[i].split("\\."); + String[] nums = parts[i].split("\\."); try { res[0] = Integer.parseInt(nums[0]); } catch (NumberFormatException e) { } diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 7801326ecd..b4f145eda6 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -2365,8 +2365,8 @@ protected void flushPixels() { protected void flushPolys() { boolean customShader = polyShader != null; - boolean needNormals = customShader ? polyShader.accessNormals() : false; - boolean needTexCoords = customShader ? polyShader.accessTexCoords() : false; + boolean needNormals = customShader && polyShader.accessNormals(); + boolean needTexCoords = customShader && polyShader.accessTexCoords(); updatePolyBuffers(lights, texCache.hasTextures, needNormals, needTexCoords); @@ -2438,8 +2438,8 @@ protected void flushPolys() { protected void flushSortedPolys() { boolean customShader = polyShader != null; - boolean needNormals = customShader ? polyShader.accessNormals() : false; - boolean needTexCoords = customShader ? polyShader.accessTexCoords() : false; + boolean needNormals = customShader && polyShader.accessNormals(); + boolean needTexCoords = customShader && polyShader.accessTexCoords(); sorter.sort(tessGeo); @@ -3485,7 +3485,7 @@ public float textDescent() { @Override - protected float textWidthImpl(char buffer[], int start, int stop) { + protected float textWidthImpl(char[] buffer, int start, int stop) { if (textFont == null) defaultFontOrDeath("textWidth"); Object font = textFont.getNative(); float twidth = 0; @@ -3510,7 +3510,7 @@ protected void handleTextSize(float size) { * Implementation of actual drawing for a line of text. */ @Override - protected void textLineImpl(char buffer[], int start, int stop, + protected void textLineImpl(char[] buffer, int start, int stop, float x, float y) { if (textMode == SHAPE && textFont.getNative() == null) { @@ -3654,7 +3654,7 @@ protected void textCharShapeImpl(char ch, float x, float y) { PGL.FontOutline outline = pgl.createFontOutline(ch, textFont.getNative()); // six element array received from the Java2D path iterator - float textPoints[] = new float[6]; + float[] textPoints = new float[6]; float lastX = 0; float lastY = 0; @@ -7899,61 +7899,61 @@ int getVertexSum(PVector v) { // Expand arrays void expandVertices(int n) { - float temp[] = new float[3 * n]; + float[] temp = new float[3 * n]; PApplet.arrayCopy(vertices, 0, temp, 0, 3 * vertexCount); vertices = temp; } void expandColors(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(colors, 0, temp, 0, vertexCount); colors = temp; } void expandNormals(int n) { - float temp[] = new float[3 * n]; + float[] temp = new float[3 * n]; PApplet.arrayCopy(normals, 0, temp, 0, 3 * vertexCount); normals = temp; } void expandTexCoords(int n) { - float temp[] = new float[2 * n]; + float[] temp = new float[2 * n]; PApplet.arrayCopy(texcoords, 0, temp, 0, 2 * vertexCount); texcoords = temp; } void expandStrokeColors(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(strokeColors, 0, temp, 0, vertexCount); strokeColors = temp; } void expandStrokeWeights(int n) { - float temp[] = new float[n]; + float[] temp = new float[n]; PApplet.arrayCopy(strokeWeights, 0, temp, 0, vertexCount); strokeWeights = temp; } void expandAmbient(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(ambient, 0, temp, 0, vertexCount); ambient = temp; } void expandSpecular(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(specular, 0, temp, 0, vertexCount); specular = temp; } void expandEmissive(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(emissive, 0, temp, 0, vertexCount); emissive = temp; } void expandShininess(int n) { - float temp[] = new float[n]; + float[] temp = new float[n]; PApplet.arrayCopy(shininess, 0, temp, 0, vertexCount); shininess = temp; } @@ -7973,33 +7973,33 @@ void expandAttribs(int n) { void expandFloatAttrib(VertexAttribute attrib, int n) { float[] values = fattribs.get(attrib.name); - float temp[] = new float[attrib.size * n]; + float[] temp = new float[attrib.size * n]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); fattribs.put(attrib.name, temp); } void expandIntAttrib(VertexAttribute attrib, int n) { int[] values = iattribs.get(attrib.name); - int temp[] = new int[attrib.size * n]; + int[] temp = new int[attrib.size * n]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); iattribs.put(attrib.name, temp); } void expandBoolAttrib(VertexAttribute attrib, int n) { byte[] values = battribs.get(attrib.name); - byte temp[] = new byte[attrib.size * n]; + byte[] temp = new byte[attrib.size * n]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); battribs.put(attrib.name, temp); } void expandCodes(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(codes, 0, temp, 0, codeCount); codes = temp; } void expandEdges(int n) { - int temp[][] = new int[n][3]; + int[][] temp = new int[n][3]; PApplet.arrayCopy(edges, 0, temp, 0, edgeCount); edges = temp; } @@ -8033,73 +8033,73 @@ void trim() { } void trimVertices() { - float temp[] = new float[3 * vertexCount]; + float[] temp = new float[3 * vertexCount]; PApplet.arrayCopy(vertices, 0, temp, 0, 3 * vertexCount); vertices = temp; } void trimColors() { - int temp[] = new int[vertexCount]; + int[] temp = new int[vertexCount]; PApplet.arrayCopy(colors, 0, temp, 0, vertexCount); colors = temp; } void trimNormals() { - float temp[] = new float[3 * vertexCount]; + float[] temp = new float[3 * vertexCount]; PApplet.arrayCopy(normals, 0, temp, 0, 3 * vertexCount); normals = temp; } void trimTexCoords() { - float temp[] = new float[2 * vertexCount]; + float[] temp = new float[2 * vertexCount]; PApplet.arrayCopy(texcoords, 0, temp, 0, 2 * vertexCount); texcoords = temp; } void trimStrokeColors() { - int temp[] = new int[vertexCount]; + int[] temp = new int[vertexCount]; PApplet.arrayCopy(strokeColors, 0, temp, 0, vertexCount); strokeColors = temp; } void trimStrokeWeights() { - float temp[] = new float[vertexCount]; + float[] temp = new float[vertexCount]; PApplet.arrayCopy(strokeWeights, 0, temp, 0, vertexCount); strokeWeights = temp; } void trimAmbient() { - int temp[] = new int[vertexCount]; + int[] temp = new int[vertexCount]; PApplet.arrayCopy(ambient, 0, temp, 0, vertexCount); ambient = temp; } void trimSpecular() { - int temp[] = new int[vertexCount]; + int[] temp = new int[vertexCount]; PApplet.arrayCopy(specular, 0, temp, 0, vertexCount); specular = temp; } void trimEmissive() { - int temp[] = new int[vertexCount]; + int[] temp = new int[vertexCount]; PApplet.arrayCopy(emissive, 0, temp, 0, vertexCount); emissive = temp; } void trimShininess() { - float temp[] = new float[vertexCount]; + float[] temp = new float[vertexCount]; PApplet.arrayCopy(shininess, 0, temp, 0, vertexCount); shininess = temp; } void trimCodes() { - int temp[] = new int[codeCount]; + int[] temp = new int[codeCount]; PApplet.arrayCopy(codes, 0, temp, 0, codeCount); codes = temp; } void trimEdges() { - int temp[][] = new int[edgeCount][3]; + int[][] temp = new int[edgeCount][3]; PApplet.arrayCopy(edges, 0, temp, 0, edgeCount); edges = temp; } @@ -8119,21 +8119,21 @@ void trimAttribs() { void trimFloatAttrib(VertexAttribute attrib) { float[] values = fattribs.get(attrib.name); - float temp[] = new float[attrib.size * vertexCount]; + float[] temp = new float[attrib.size * vertexCount]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); fattribs.put(attrib.name, temp); } void trimIntAttrib(VertexAttribute attrib) { int[] values = iattribs.get(attrib.name); - int temp[] = new int[attrib.size * vertexCount]; + int[] temp = new int[attrib.size * vertexCount]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); iattribs.put(attrib.name, temp); } void trimBoolAttrib(VertexAttribute attrib) { byte[] values = battribs.get(attrib.name); - byte temp[] = new byte[attrib.size * vertexCount]; + byte[] temp = new byte[attrib.size * vertexCount]; PApplet.arrayCopy(values, 0, temp, 0, attrib.size * vertexCount); battribs.put(attrib.name, temp); } @@ -9675,56 +9675,56 @@ protected void updatePointIndicesBuffer(int offset, int size) { // Expand arrays void expandPolyVertices(int n) { - float temp[] = new float[4 * n]; + float[] temp = new float[4 * n]; PApplet.arrayCopy(polyVertices, 0, temp, 0, 4 * polyVertexCount); polyVertices = temp; polyVerticesBuffer = PGL.allocateFloatBuffer(polyVertices); } void expandPolyColors(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(polyColors, 0, temp, 0, polyVertexCount); polyColors = temp; polyColorsBuffer = PGL.allocateIntBuffer(polyColors); } void expandPolyNormals(int n) { - float temp[] = new float[3 * n]; + float[] temp = new float[3 * n]; PApplet.arrayCopy(polyNormals, 0, temp, 0, 3 * polyVertexCount); polyNormals = temp; polyNormalsBuffer = PGL.allocateFloatBuffer(polyNormals); } void expandPolyTexCoords(int n) { - float temp[] = new float[2 * n]; + float[] temp = new float[2 * n]; PApplet.arrayCopy(polyTexCoords, 0, temp, 0, 2 * polyVertexCount); polyTexCoords = temp; polyTexCoordsBuffer = PGL.allocateFloatBuffer(polyTexCoords); } void expandPolyAmbient(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(polyAmbient, 0, temp, 0, polyVertexCount); polyAmbient = temp; polyAmbientBuffer = PGL.allocateIntBuffer(polyAmbient); } void expandPolySpecular(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(polySpecular, 0, temp, 0, polyVertexCount); polySpecular = temp; polySpecularBuffer = PGL.allocateIntBuffer(polySpecular); } void expandPolyEmissive(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(polyEmissive, 0, temp, 0, polyVertexCount); polyEmissive = temp; polyEmissiveBuffer = PGL.allocateIntBuffer(polyEmissive); } void expandPolyShininess(int n) { - float temp[] = new float[n]; + float[] temp = new float[n]; PApplet.arrayCopy(polyShininess, 0, temp, 0, polyVertexCount); polyShininess = temp; polyShininessBuffer = PGL.allocateFloatBuffer(polyShininess); @@ -9745,7 +9745,7 @@ void expandAttributes(int n) { void expandFloatAttribute(VertexAttribute attrib, int n) { float[] array = fpolyAttribs.get(attrib.name); - float temp[] = new float[attrib.tessSize * n]; + float[] temp = new float[attrib.tessSize * n]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); fpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateFloatBuffer(temp)); @@ -9753,7 +9753,7 @@ void expandFloatAttribute(VertexAttribute attrib, int n) { void expandIntAttribute(VertexAttribute attrib, int n) { int[] array = ipolyAttribs.get(attrib.name); - int temp[] = new int[attrib.tessSize * n]; + int[] temp = new int[attrib.tessSize * n]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); ipolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateIntBuffer(temp)); @@ -9761,70 +9761,70 @@ void expandIntAttribute(VertexAttribute attrib, int n) { void expandBoolAttribute(VertexAttribute attrib, int n) { byte[] array = bpolyAttribs.get(attrib.name); - byte temp[] = new byte[attrib.tessSize * n]; + byte[] temp = new byte[attrib.tessSize * n]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); bpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateByteBuffer(temp)); } void expandPolyIndices(int n) { - short temp[] = new short[n]; + short[] temp = new short[n]; PApplet.arrayCopy(polyIndices, 0, temp, 0, polyIndexCount); polyIndices = temp; polyIndicesBuffer = PGL.allocateShortBuffer(polyIndices); } void expandLineVertices(int n) { - float temp[] = new float[4 * n]; + float[] temp = new float[4 * n]; PApplet.arrayCopy(lineVertices, 0, temp, 0, 4 * lineVertexCount); lineVertices = temp; lineVerticesBuffer = PGL.allocateFloatBuffer(lineVertices); } void expandLineColors(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(lineColors, 0, temp, 0, lineVertexCount); lineColors = temp; lineColorsBuffer = PGL.allocateIntBuffer(lineColors); } void expandLineDirections(int n) { - float temp[] = new float[4 * n]; + float[] temp = new float[4 * n]; PApplet.arrayCopy(lineDirections, 0, temp, 0, 4 * lineVertexCount); lineDirections = temp; lineDirectionsBuffer = PGL.allocateFloatBuffer(lineDirections); } void expandLineIndices(int n) { - short temp[] = new short[n]; + short[] temp = new short[n]; PApplet.arrayCopy(lineIndices, 0, temp, 0, lineIndexCount); lineIndices = temp; lineIndicesBuffer = PGL.allocateShortBuffer(lineIndices); } void expandPointVertices(int n) { - float temp[] = new float[4 * n]; + float[] temp = new float[4 * n]; PApplet.arrayCopy(pointVertices, 0, temp, 0, 4 * pointVertexCount); pointVertices = temp; pointVerticesBuffer = PGL.allocateFloatBuffer(pointVertices); } void expandPointColors(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(pointColors, 0, temp, 0, pointVertexCount); pointColors = temp; pointColorsBuffer = PGL.allocateIntBuffer(pointColors); } void expandPointOffsets(int n) { - float temp[] = new float[2 * n]; + float[] temp = new float[2 * n]; PApplet.arrayCopy(pointOffsets, 0, temp, 0, 2 * pointVertexCount); pointOffsets = temp; pointOffsetsBuffer = PGL.allocateFloatBuffer(pointOffsets); } void expandPointIndices(int n) { - short temp[] = new short[n]; + short[] temp = new short[n]; PApplet.arrayCopy(pointIndices, 0, temp, 0, pointIndexCount); pointIndices = temp; pointIndicesBuffer = PGL.allocateShortBuffer(pointIndices); @@ -9873,56 +9873,56 @@ void trim() { } void trimPolyVertices() { - float temp[] = new float[4 * polyVertexCount]; + float[] temp = new float[4 * polyVertexCount]; PApplet.arrayCopy(polyVertices, 0, temp, 0, 4 * polyVertexCount); polyVertices = temp; polyVerticesBuffer = PGL.allocateFloatBuffer(polyVertices); } void trimPolyColors() { - int temp[] = new int[polyVertexCount]; + int[] temp = new int[polyVertexCount]; PApplet.arrayCopy(polyColors, 0, temp, 0, polyVertexCount); polyColors = temp; polyColorsBuffer = PGL.allocateIntBuffer(polyColors); } void trimPolyNormals() { - float temp[] = new float[3 * polyVertexCount]; + float[] temp = new float[3 * polyVertexCount]; PApplet.arrayCopy(polyNormals, 0, temp, 0, 3 * polyVertexCount); polyNormals = temp; polyNormalsBuffer = PGL.allocateFloatBuffer(polyNormals); } void trimPolyTexCoords() { - float temp[] = new float[2 * polyVertexCount]; + float[] temp = new float[2 * polyVertexCount]; PApplet.arrayCopy(polyTexCoords, 0, temp, 0, 2 * polyVertexCount); polyTexCoords = temp; polyTexCoordsBuffer = PGL.allocateFloatBuffer(polyTexCoords); } void trimPolyAmbient() { - int temp[] = new int[polyVertexCount]; + int[] temp = new int[polyVertexCount]; PApplet.arrayCopy(polyAmbient, 0, temp, 0, polyVertexCount); polyAmbient = temp; polyAmbientBuffer = PGL.allocateIntBuffer(polyAmbient); } void trimPolySpecular() { - int temp[] = new int[polyVertexCount]; + int[] temp = new int[polyVertexCount]; PApplet.arrayCopy(polySpecular, 0, temp, 0, polyVertexCount); polySpecular = temp; polySpecularBuffer = PGL.allocateIntBuffer(polySpecular); } void trimPolyEmissive() { - int temp[] = new int[polyVertexCount]; + int[] temp = new int[polyVertexCount]; PApplet.arrayCopy(polyEmissive, 0, temp, 0, polyVertexCount); polyEmissive = temp; polyEmissiveBuffer = PGL.allocateIntBuffer(polyEmissive); } void trimPolyShininess() { - float temp[] = new float[polyVertexCount]; + float[] temp = new float[polyVertexCount]; PApplet.arrayCopy(polyShininess, 0, temp, 0, polyVertexCount); polyShininess = temp; polyShininessBuffer = PGL.allocateFloatBuffer(polyShininess); @@ -9943,7 +9943,7 @@ void trimPolyAttributes() { void trimFloatAttribute(VertexAttribute attrib) { float[] array = fpolyAttribs.get(attrib.name); - float temp[] = new float[attrib.tessSize * polyVertexCount]; + float[] temp = new float[attrib.tessSize * polyVertexCount]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); fpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateFloatBuffer(temp)); @@ -9951,7 +9951,7 @@ void trimFloatAttribute(VertexAttribute attrib) { void trimIntAttribute(VertexAttribute attrib) { int[] array = ipolyAttribs.get(attrib.name); - int temp[] = new int[attrib.tessSize * polyVertexCount]; + int[] temp = new int[attrib.tessSize * polyVertexCount]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); ipolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateIntBuffer(temp)); @@ -9959,70 +9959,70 @@ void trimIntAttribute(VertexAttribute attrib) { void trimBoolAttribute(VertexAttribute attrib) { byte[] array = bpolyAttribs.get(attrib.name); - byte temp[] = new byte[attrib.tessSize * polyVertexCount]; + byte[] temp = new byte[attrib.tessSize * polyVertexCount]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); bpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateByteBuffer(temp)); } void trimPolyIndices() { - short temp[] = new short[polyIndexCount]; + short[] temp = new short[polyIndexCount]; PApplet.arrayCopy(polyIndices, 0, temp, 0, polyIndexCount); polyIndices = temp; polyIndicesBuffer = PGL.allocateShortBuffer(polyIndices); } void trimLineVertices() { - float temp[] = new float[4 * lineVertexCount]; + float[] temp = new float[4 * lineVertexCount]; PApplet.arrayCopy(lineVertices, 0, temp, 0, 4 * lineVertexCount); lineVertices = temp; lineVerticesBuffer = PGL.allocateFloatBuffer(lineVertices); } void trimLineColors() { - int temp[] = new int[lineVertexCount]; + int[] temp = new int[lineVertexCount]; PApplet.arrayCopy(lineColors, 0, temp, 0, lineVertexCount); lineColors = temp; lineColorsBuffer = PGL.allocateIntBuffer(lineColors); } void trimLineDirections() { - float temp[] = new float[4 * lineVertexCount]; + float[] temp = new float[4 * lineVertexCount]; PApplet.arrayCopy(lineDirections, 0, temp, 0, 4 * lineVertexCount); lineDirections = temp; lineDirectionsBuffer = PGL.allocateFloatBuffer(lineDirections); } void trimLineIndices() { - short temp[] = new short[lineIndexCount]; + short[] temp = new short[lineIndexCount]; PApplet.arrayCopy(lineIndices, 0, temp, 0, lineIndexCount); lineIndices = temp; lineIndicesBuffer = PGL.allocateShortBuffer(lineIndices); } void trimPointVertices() { - float temp[] = new float[4 * pointVertexCount]; + float[] temp = new float[4 * pointVertexCount]; PApplet.arrayCopy(pointVertices, 0, temp, 0, 4 * pointVertexCount); pointVertices = temp; pointVerticesBuffer = PGL.allocateFloatBuffer(pointVertices); } void trimPointColors() { - int temp[] = new int[pointVertexCount]; + int[] temp = new int[pointVertexCount]; PApplet.arrayCopy(pointColors, 0, temp, 0, pointVertexCount); pointColors = temp; pointColorsBuffer = PGL.allocateIntBuffer(pointColors); } void trimPointOffsets() { - float temp[] = new float[2 * pointVertexCount]; + float[] temp = new float[2 * pointVertexCount]; PApplet.arrayCopy(pointOffsets, 0, temp, 0, 2 * pointVertexCount); pointOffsets = temp; pointOffsetsBuffer = PGL.allocateFloatBuffer(pointOffsets); } void trimPointIndices() { - short temp[] = new short[pointIndexCount]; + short[] temp = new short[pointIndexCount]; PApplet.arrayCopy(pointIndices, 0, temp, 0, pointIndexCount); pointIndices = temp; pointIndicesBuffer = PGL.allocateShortBuffer(pointIndices); @@ -12448,7 +12448,7 @@ void addDupIndex(int idx) { if (dupIndices.length == dupCount) { int n = dupCount << 1; - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(dupIndices, 0, temp, 0, dupCount); dupIndices = temp; } @@ -12495,7 +12495,7 @@ void setRawSize(int size) { } void expandRawIndices(int n) { - int temp[] = new int[n]; + int[] temp = new int[n]; PApplet.arrayCopy(rawIndices, 0, temp, 0, rawSize); rawIndices = temp; } @@ -12940,15 +12940,15 @@ void addStrokeVertex(float x, float y, float z, int c, float w) { if (pathVertexCount == pathVertices.length / 3) { int newSize = pathVertexCount << 1; - float vtemp[] = new float[3 * newSize]; + float[] vtemp = new float[3 * newSize]; PApplet.arrayCopy(pathVertices, 0, vtemp, 0, 3 * pathVertexCount); pathVertices = vtemp; - int ctemp[] = new int[newSize]; + int[] ctemp = new int[newSize]; PApplet.arrayCopy(pathColors, 0, ctemp, 0, pathVertexCount); pathColors = ctemp; - float wtemp[] = new float[newSize]; + float[] wtemp = new float[newSize]; PApplet.arrayCopy(pathWeights, 0, wtemp, 0, pathVertexCount); pathWeights = wtemp; } diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index c164c23b1f..9c057313a0 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -722,7 +722,7 @@ protected class FontOutline implements PGL.FontOutline { PathIterator iter; public FontOutline(char ch, Font font) { - char textArray[] = new char[] { ch }; + char[] textArray = new char[] { ch }; FontRenderContext frc = getFontRenderContext(font); GlyphVector gv = font.createGlyphVector(frc, textArray); Shape shp = gv.getOutline(); @@ -733,7 +733,7 @@ public boolean isDone() { return iter.isDone(); } - public int currentSegment(float coords[]) { + public int currentSegment(float[] coords) { return iter.currentSegment(coords); } From 78eb6c0ae7a420cef07aff4a49929a81db2adf97 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 18 Jan 2020 07:45:16 -0500 Subject: [PATCH 16/49] note about merged PR --- todo.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/todo.txt b/todo.txt index cd2ec96414..caf4e3b087 100644 --- a/todo.txt +++ b/todo.txt @@ -4,6 +4,8 @@ contribs X rename-variable menu allows Java identifiers X https://github.com/processing/processing/issues/5828 X https://github.com/processing/processing/pull/5906 +X Replace C/C++ style array declarations with Java style array declarations +X https://github.com/processing/processing/pull/5981 from Casey From 4bb41d9851f24584c064d75e759e6ac3b0f65928 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 18 Jan 2020 13:46:58 -0500 Subject: [PATCH 17/49] fix regression in apparently untested #5981 --- core/src/processing/core/PGraphics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 697ccb5581..266cf43bdc 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -1482,10 +1482,10 @@ public void vertex(float x, float y, float z) { // http://dev.processing.org/bugs/show_bug.cgi?id=444 if (shape == POLYGON) { if (vertexCount > 0) { + float[] pvertex = vertices[vertexCount-1]; if ((Math.abs(pvertex[X] - x) < EPSILON) && (Math.abs(pvertex[Y] - y) < EPSILON) && (Math.abs(pvertex[Z] - z) < EPSILON)) { - float[] pvertex = vertices[vertexCount-1]; // this vertex is identical, don't add it, // because it will anger the triangulator return; From 3952f6f7247dba50920662da3276e91166426fb7 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 31 Mar 2020 13:49:08 -0400 Subject: [PATCH 18/49] new Eclipse rewriting settings files --- app/.settings/org.eclipse.jdt.core.prefs | 101 +++++++++++++++++- app/.settings/org.eclipse.jdt.ui.prefs | 2 +- core/.settings/org.eclipse.jdt.core.prefs | 101 +++++++++++++++++- core/.settings/org.eclipse.jdt.ui.prefs | 2 +- .../net/.settings/org.eclipse.jdt.core.prefs | 101 +++++++++++++++++- .../net/.settings/org.eclipse.jdt.ui.prefs | 2 +- .../pdf/.settings/org.eclipse.jdt.core.prefs | 101 +++++++++++++++++- .../pdf/.settings/org.eclipse.jdt.ui.prefs | 2 +- 8 files changed, 388 insertions(+), 24 deletions(-) diff --git a/app/.settings/org.eclipse.jdt.core.prefs b/app/.settings/org.eclipse.jdt.core.prefs index 9910337705..af36b24305 100644 --- a/app/.settings/org.eclipse.jdt.core.prefs +++ b/app/.settings/org.eclipse.jdt.core.prefs @@ -94,7 +94,12 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -103,24 +108,39 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=36 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -129,6 +149,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -138,32 +159,38 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=1 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -176,6 +203,7 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert @@ -185,6 +213,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert @@ -198,11 +227,15 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -229,9 +262,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declar org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -256,13 +294,20 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -306,9 +351,13 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_decla org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -345,9 +394,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -359,20 +411,59 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_decla org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.text_block_indentation=0 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/app/.settings/org.eclipse.jdt.ui.prefs b/app/.settings/org.eclipse.jdt.ui.prefs index 7f5ba1ed84..66aaa0890e 100644 --- a/app/.settings/org.eclipse.jdt.ui.prefs +++ b/app/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,3 @@ eclipse.preferences.version=1 formatter_profile=_processing -formatter_settings_version=12 +formatter_settings_version=18 diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs index 6c6ce4e4e9..f57dd085ab 100644 --- a/core/.settings/org.eclipse.jdt.core.prefs +++ b/core/.settings/org.eclipse.jdt.core.prefs @@ -98,7 +98,12 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -107,24 +112,39 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=36 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -133,6 +153,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -142,32 +163,38 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=1 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -180,6 +207,7 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert @@ -189,6 +217,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert @@ -202,11 +231,15 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -233,9 +266,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declar org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -260,13 +298,20 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -310,9 +355,13 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_decla org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -349,9 +398,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -363,20 +415,59 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_decla org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.text_block_indentation=0 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/core/.settings/org.eclipse.jdt.ui.prefs b/core/.settings/org.eclipse.jdt.ui.prefs index 2e87119d6c..1286aca0bb 100644 --- a/core/.settings/org.eclipse.jdt.ui.prefs +++ b/core/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_processing -formatter_settings_version=12 +formatter_settings_version=18 org.eclipse.jdt.ui.text.custom_code_templates= sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false diff --git a/java/libraries/net/.settings/org.eclipse.jdt.core.prefs b/java/libraries/net/.settings/org.eclipse.jdt.core.prefs index f256b10aad..ac3ca93e5c 100644 --- a/java/libraries/net/.settings/org.eclipse.jdt.core.prefs +++ b/java/libraries/net/.settings/org.eclipse.jdt.core.prefs @@ -11,7 +11,12 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -20,24 +25,39 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=36 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -46,6 +66,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -55,34 +76,40 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=1 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -95,6 +122,7 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert @@ -104,6 +132,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert @@ -117,11 +146,15 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -148,9 +181,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declar org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -175,13 +213,20 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -225,9 +270,13 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_decla org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -264,9 +313,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -278,20 +330,59 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_decla org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.text_block_indentation=0 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/java/libraries/net/.settings/org.eclipse.jdt.ui.prefs b/java/libraries/net/.settings/org.eclipse.jdt.ui.prefs index 7f5ba1ed84..66aaa0890e 100644 --- a/java/libraries/net/.settings/org.eclipse.jdt.ui.prefs +++ b/java/libraries/net/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,3 @@ eclipse.preferences.version=1 formatter_profile=_processing -formatter_settings_version=12 +formatter_settings_version=18 diff --git a/java/libraries/pdf/.settings/org.eclipse.jdt.core.prefs b/java/libraries/pdf/.settings/org.eclipse.jdt.core.prefs index 160529e9d0..02a284792f 100644 --- a/java/libraries/pdf/.settings/org.eclipse.jdt.core.prefs +++ b/java/libraries/pdf/.settings/org.eclipse.jdt.core.prefs @@ -11,7 +11,12 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -20,24 +25,39 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=36 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -46,6 +66,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -55,32 +76,38 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=1 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -92,6 +119,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert @@ -101,6 +129,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert @@ -114,11 +143,15 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -145,9 +178,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declar org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -172,13 +210,20 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -222,9 +267,13 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_decla org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -261,9 +310,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -275,20 +327,59 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_decla org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=80 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.text_block_indentation=0 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/java/libraries/pdf/.settings/org.eclipse.jdt.ui.prefs b/java/libraries/pdf/.settings/org.eclipse.jdt.ui.prefs index 0d6ea5b9dd..24dec57837 100644 --- a/java/libraries/pdf/.settings/org.eclipse.jdt.ui.prefs +++ b/java/libraries/pdf/.settings/org.eclipse.jdt.ui.prefs @@ -1,4 +1,4 @@ eclipse.preferences.version=1 formatter_profile=_processing -formatter_settings_version=12 +formatter_settings_version=18 org.eclipse.jdt.ui.text.custom_code_templates= From 8e86389c7e017d0e4d61f81fb942c25e3ed348c7 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 26 Apr 2020 21:20:42 -0400 Subject: [PATCH 19/49] deal with a few warnings --- app/src/processing/app/ui/PreferencesFrame.java | 1 - core/src/processing/core/PVector.java | 2 -- java/src/processing/mode/java/preproc/TokenUtil.java | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/processing/app/ui/PreferencesFrame.java b/app/src/processing/app/ui/PreferencesFrame.java index 91c077b537..d4684b2e24 100644 --- a/app/src/processing/app/ui/PreferencesFrame.java +++ b/app/src/processing/app/ui/PreferencesFrame.java @@ -37,7 +37,6 @@ import processing.app.Messages; import processing.app.Platform; import processing.app.Preferences; -import processing.app.ui.ColorChooser; import processing.core.*; diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java index 51d461f409..9c0b65e841 100644 --- a/core/src/processing/core/PVector.java +++ b/core/src/processing/core/PVector.java @@ -26,8 +26,6 @@ import java.io.Serializable; -import processing.core.PApplet; -import processing.core.PConstants; /** * ( begin auto-generated from PVector.xml ) diff --git a/java/src/processing/mode/java/preproc/TokenUtil.java b/java/src/processing/mode/java/preproc/TokenUtil.java index e6c4721eab..71e418dd9c 100644 --- a/java/src/processing/mode/java/preproc/TokenUtil.java +++ b/java/src/processing/mode/java/preproc/TokenUtil.java @@ -2,10 +2,9 @@ import java.lang.reflect.Field; import antlr.collections.AST; -import processing.mode.java.preproc.PdeTokenTypes; /** - * + * * @author Jonathan Feinberg <jdf@pobox.com> * */ From 17c8001a948a2be9f5816cda49feac9473aeb0b7 Mon Sep 17 00:00:00 2001 From: Jeremy Douglass Date: Thu, 28 May 2020 18:07:13 -0700 Subject: [PATCH 20/49] update issue template -- correct forum link --- ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 01a24196ca..a4f3e3258b 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + From 730d99dad14f35a012f38ae4497ef25588973d83 Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Fri, 12 Jun 2020 11:54:48 -0700 Subject: [PATCH 21/49] Add Sponsor button to repository --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..f8c6bc52bc --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: processing From 59e0b7f35bdf3c63d3c21c53207749ebd4f86b48 Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Fri, 12 Jun 2020 12:11:47 -0700 Subject: [PATCH 22/49] Update Sponsor button, external link to Foundation --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f8c6bc52bc..2cf28e94b0 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ github: processing +custom: https://processingfoundation.org/support From 78f7c30076de3f9a24536913249009be7e543a6b Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Fri, 12 Jun 2020 15:05:49 -0700 Subject: [PATCH 23/49] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2cf28e94b0..41534ed7ba 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ github: processing -custom: https://processingfoundation.org/support +custom: https://processingfoundation.org From 4cc297c66908899cd29480c202536ecf749854e8 Mon Sep 17 00:00:00 2001 From: Casey Reas Date: Mon, 15 Jun 2020 14:01:50 -0700 Subject: [PATCH 24/49] Update parameter reference for curveTangent() --- core/src/processing/core/PGraphics.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 266cf43bdc..d9b4be5192 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -3470,10 +3470,10 @@ public float curvePoint(float a, float b, float c, float d, float t) { * Code thanks to Dave Bollinger (Bug #715) * * @webref shape:curves - * @param a coordinate of first point on the curve - * @param b coordinate of first control point - * @param c coordinate of second control point - * @param d coordinate of second point on the curve + * @param a coordinate of first control point on the curve + * @param b coordinate of first point + * @param c coordinate of first point + * @param d coordinate of second control point on the curve * @param t value between 0 and 1 * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) From 2492d778c1c474aa23886390b561c58677cf3a78 Mon Sep 17 00:00:00 2001 From: Hugo Vale Pereira Date: Sat, 5 Sep 2020 19:48:10 +0100 Subject: [PATCH 25/49] getShape() - Type of vertex was wrong for Cubic When 'detail' is set to 0, it was causing getShape to break with OTF fonts that use cubic bezier paths. By mistake, a 3D quadratic was being drawn instead of a proper cubic bezier. --- core/src/processing/core/PFont.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PFont.java b/core/src/processing/core/PFont.java index 12ee61a36b..5c8d38c4b5 100644 --- a/core/src/processing/core/PFont.java +++ b/core/src/processing/core/PFont.java @@ -782,7 +782,7 @@ public PShape getShape(char ch, float detail) { case PathIterator.SEG_CUBICTO: // 3 points // System.out.println("cubicto"); // PApplet.println(iterPoints); - s.quadraticVertex(iterPoints[0], iterPoints[1], + s.bezierVertex(iterPoints[0], iterPoints[1], iterPoints[2], iterPoints[3], iterPoints[4], iterPoints[5]); break; From 4fe0cce37c896f472e936cb1506cba175a654cd3 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Sep 2020 17:33:41 -0400 Subject: [PATCH 26/49] fix white space --- build/jre/build.xml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/build/jre/build.xml b/build/jre/build.xml index db3c84e6e7..c12776eff2 100644 --- a/build/jre/build.xml +++ b/build/jre/build.xml @@ -5,43 +5,43 @@ - + + it allows us to build the PDE with only a JRE on Windows and Linux. + So that the core can be built independently of the PDE, + use javac (the "modern" compiler) if ecj is not present. --> - + + target="1.8" + srcdir="src" + destdir="bin" + debug="true" + includeantruntime="true" + nowarn="true"> - + - + - - + - + From 89a080814895234b54201c0240625e47a5b369cf Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Sep 2020 20:11:06 -0400 Subject: [PATCH 27/49] trying out a cached copy of the JRE to address #5827 and others --- build/jre/src/Downloader.java | 10 +++++++++- todo.txt | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/build/jre/src/Downloader.java b/build/jre/src/Downloader.java index b25fb58b8d..0eab58acee 100644 --- a/build/jre/src/Downloader.java +++ b/build/jre/src/Downloader.java @@ -8,8 +8,13 @@ /** * Ant Task for downloading the latest JRE or JDK from Oracle. + * This was used to set a cookie properly to retrieve a JRE. + * Nowadays the older versions have been removed from Oracle's site, + * so this is hard wired it to use download.processing.org instead. */ public class Downloader extends Task { + static final boolean ORACLE_SUCKS = true; // that's final + static final String COOKIE = "oraclelicense=accept-securebackup-cookie"; @@ -82,7 +87,6 @@ public void execute() throws BuildException { throw new BuildException("Starting with 8u121, a hash is required, see https://gist.github.com/P7h/9741922"); } - //download(path, jdk, platform, bits, version, update, build); try { download(); } catch (IOException e) { @@ -111,6 +115,10 @@ void download() throws IOException { url += hash + "/"; } + if (ORACLE_SUCKS) { + url = "https://download.processing.org/java/"; + } + // Finally, add the filename to the end url += filename; diff --git a/todo.txt b/todo.txt index caf4e3b087..62e8655b1f 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,9 @@ 0271 (3.5.5 unlikely) +_ get the jre download to work by using a local copy +X https://github.com/processing/processing/issues/5827 +X https://github.com/processing/processing/issues/5860 +_ https://github.com/processing/processing/issues/5942 +_ https://github.com/processing/processing/issues/6089 contribs X rename-variable menu allows Java identifiers From 65c167b0a1ad5db716387cd829fc1bfd0b2c9d4f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Sep 2020 20:34:57 -0400 Subject: [PATCH 28/49] get the jre download to work by using a cached copy --- todo.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/todo.txt b/todo.txt index 62e8655b1f..e6fa460dd0 100644 --- a/todo.txt +++ b/todo.txt @@ -1,9 +1,9 @@ 0271 (3.5.5 unlikely) -_ get the jre download to work by using a local copy +X get the jre download to work by using a cached copy X https://github.com/processing/processing/issues/5827 X https://github.com/processing/processing/issues/5860 -_ https://github.com/processing/processing/issues/5942 -_ https://github.com/processing/processing/issues/6089 +X https://github.com/processing/processing/issues/5942 +X https://github.com/processing/processing/issues/6089 contribs X rename-variable menu allows Java identifiers From 55a18f6347e6cb232157aad25b87746acb60802b Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 21 Sep 2020 18:22:41 -0400 Subject: [PATCH 29/49] handle Terminal.app move in macOS Catalina (fixes #6091) --- build/build.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build/build.xml b/build/build.xml index c7061c2c3d..5b944c08b8 100644 --- a/build/build.xml +++ b/build/build.xml @@ -694,9 +694,20 @@ + + + + + + + - + From 36b3990ce3df4b5a8bc40e6e428532bc5aeca3d8 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 22 Sep 2020 13:52:17 -0400 Subject: [PATCH 30/49] whitespace change --- core/src/processing/core/PApplet.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index b935d3c5f3..c43fbca8cb 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -12596,10 +12596,10 @@ public float curvePoint(float a, float b, float c, float d, float t) { * Code thanks to Dave Bollinger (Bug #715) * * @webref shape:curves - * @param a coordinate of first point on the curve - * @param b coordinate of first control point - * @param c coordinate of second control point - * @param d coordinate of second point on the curve + * @param a coordinate of first control point on the curve + * @param b coordinate of first point + * @param c coordinate of first point + * @param d coordinate of second control point on the curve * @param t value between 0 and 1 * @see PGraphics#curve(float, float, float, float, float, float, float, float, float, float, float, float) * @see PGraphics#curveVertex(float, float) From 4a8e20688cdac7683cd4e2450a823237ceca5715 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 22 Sep 2020 13:52:29 -0400 Subject: [PATCH 31/49] add a note about #6092 --- core/todo.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/todo.txt b/core/todo.txt index c15593393c..8055db170c 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,5 +1,9 @@ 0271 (3.5.5 unlikely) +contribs +X getShape() - Type of vertex was wrong for Cubic +X https://github.com/processing/processing/pull/6092 + _ size() issues on Mojave? _ https://github.com/processing/processing/issues/5791 From e3d8304932e23711547725fd340418c09fb39513 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 22 Sep 2020 13:53:20 -0400 Subject: [PATCH 32/49] I could swear I already removed these unused imports --- app/src/processing/app/platform/LinuxPlatform.java | 1 - app/src/processing/app/platform/MacPlatform.java | 1 - app/src/processing/app/ui/ErrorTable.java | 1 - app/src/processing/app/ui/MarkerColumn.java | 1 - java/src/processing/mode/java/preproc/PdeEmitter.java | 3 +-- 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java index fe3d7ce859..7bc7297246 100644 --- a/app/src/processing/app/platform/LinuxPlatform.java +++ b/app/src/processing/app/platform/LinuxPlatform.java @@ -29,7 +29,6 @@ import processing.app.Base; import processing.app.Messages; import processing.app.Preferences; -import processing.app.platform.DefaultPlatform; import processing.core.PApplet; diff --git a/app/src/processing/app/platform/MacPlatform.java b/app/src/processing/app/platform/MacPlatform.java index b3fd404d97..02474a3942 100644 --- a/app/src/processing/app/platform/MacPlatform.java +++ b/app/src/processing/app/platform/MacPlatform.java @@ -32,7 +32,6 @@ import processing.app.Base; import processing.app.Messages; -import processing.app.platform.DefaultPlatform; /** diff --git a/app/src/processing/app/ui/ErrorTable.java b/app/src/processing/app/ui/ErrorTable.java index f033dfc5b0..8abfdf77a0 100644 --- a/app/src/processing/app/ui/ErrorTable.java +++ b/app/src/processing/app/ui/ErrorTable.java @@ -41,7 +41,6 @@ import processing.app.Language; import processing.app.Mode; import processing.app.Problem; -import processing.app.ui.Editor; public class ErrorTable extends JTable { diff --git a/app/src/processing/app/ui/MarkerColumn.java b/app/src/processing/app/ui/MarkerColumn.java index 7169d92ec5..8d6371fbd5 100644 --- a/app/src/processing/app/ui/MarkerColumn.java +++ b/app/src/processing/app/ui/MarkerColumn.java @@ -39,7 +39,6 @@ import processing.app.Sketch; import processing.app.SketchCode; import processing.app.syntax.PdeTextArea; -import processing.app.ui.Editor; import processing.core.PApplet; diff --git a/java/src/processing/mode/java/preproc/PdeEmitter.java b/java/src/processing/mode/java/preproc/PdeEmitter.java index c2b5a4ed15..1f1adca228 100644 --- a/java/src/processing/mode/java/preproc/PdeEmitter.java +++ b/java/src/processing/mode/java/preproc/PdeEmitter.java @@ -8,7 +8,6 @@ import java.util.Stack; import processing.app.Preferences; import processing.app.SketchException; -import processing.mode.java.preproc.PdeTokenTypes; import antlr.CommonASTWithHiddenTokens; import antlr.CommonHiddenStreamToken; import antlr.collections.AST; @@ -35,7 +34,7 @@ public class PdeEmitter implements PdeTokenTypes { private final PrintWriter out; private final PrintStream debug = System.err; - private final Stack stack = new Stack(); + private final Stack stack = new Stack<>(); private final static int ROOT_ID = 0; public PdeEmitter(final PdePreprocessor pdePreprocessor, final PrintWriter out) { From 82269447441177f3a279e63b5513a8dc2508484a Mon Sep 17 00:00:00 2001 From: Alexandre B A Villares <3694604+villares@users.noreply.github.com> Date: Thu, 24 Sep 2020 11:08:51 -0300 Subject: [PATCH 33/49] Fixes color selector menu name in PDE_pt.properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no "Côr" in Portuguese, the word is "Cor" (color) https://dictionary.cambridge.org/dictionary/portuguese-english/cor --- build/shared/lib/languages/PDE_pt.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/shared/lib/languages/PDE_pt.properties b/build/shared/lib/languages/PDE_pt.properties index fbf823c3b3..607188f697 100644 --- a/build/shared/lib/languages/PDE_pt.properties +++ b/build/shared/lib/languages/PDE_pt.properties @@ -67,7 +67,7 @@ menu.sketch.add_file = Adicionar Ficheiro... # | File | Edit | Sketch | Debug | Tools | Help | # | Tools | menu.tools = Ferramentas -menu.tools.color_selector = Selector de Côr... +menu.tools.color_selector = Selector de Cor... menu.tools.create_font = Criar Fonte... menu.tools.archive_sketch = Arquivar Sketch menu.tools.fix_the_serial_lbrary = Corrijir a Biblioteca Serial From cd96fc639bfb8568d801ad33f6e3fe3a0c7e4697 Mon Sep 17 00:00:00 2001 From: Alexandre B A Villares <3694604+villares@users.noreply.github.com> Date: Thu, 24 Sep 2020 11:22:48 -0300 Subject: [PATCH 34/49] Small fixes for PDE_pt.properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guardr -> Guardar Yah, não. -> Ah, não. Nenhuns ficheiros -> Nenhum dos ficheiros erro a descarregar -> erro ao descarregar --- build/shared/lib/languages/PDE_pt.properties | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/shared/lib/languages/PDE_pt.properties b/build/shared/lib/languages/PDE_pt.properties index fbf823c3b3..f379459e79 100644 --- a/build/shared/lib/languages/PDE_pt.properties +++ b/build/shared/lib/languages/PDE_pt.properties @@ -204,7 +204,7 @@ toolbar.stop = Parar # --- toolbar.new = Novo toolbar.open = Abrir -toolbar.save = Guardr +toolbar.save = Guardar # toolbar.export_application = Exportar Aplicação toolbar.add_mode = Adicionar modo... @@ -218,14 +218,14 @@ editor.header.rename = Renomear editor.header.delete = Apagar editor.header.previous_tab = Aba Anterior editor.header.next_tab = Aba Seguinte -editor.header.delete.warning.title = Yah, não. -editor.header.delete.warning.text = Não pode apagar a última aba do último sketch aberto. +editor.header.delete.warning.title = Ah, não. +editor.header.delete.warning.text = Não se pode apagar a última aba do último sketch aberto. editor.status.autoformat.no_changes = Não foram necessárias alterações para a Auto Formatação. editor.status.autoformat.finished = Auto Formatação completa. editor.status.find_reference.select_word_first = Primeiro escolha uma palavra para procurar na referência. editor.status.find_reference.not_available = Não existe refrência disponivel para "%s". -editor.status.drag_and_drop.files_added.0 = Nenhuns ficheiros foram adicionados ao sketch. +editor.status.drag_and_drop.files_added.0 = Nenhum dos ficheiros foram adicionados ao sketch. editor.status.drag_and_drop.files_added.1 = Um ficheiro adicionado ao sketch. editor.status.drag_and_drop.files_added.n = %d ficheiros adicionados ao sketch. editor.status.saving = A Guardar... @@ -247,5 +247,5 @@ contrib.remove = Refazer contrib.install = Instalar contrib.progress.starting = A iniciar contrib.progress.downloading = A descarregar -contrib.download_error = Ocorreu um erro a descarregar a contribuição. +contrib.download_error = Ocorreu um erro ao descarregar a contribuição. contrib.unsupported_operating_system = O seu sistema operativo não parece ser suportado. Deve visitar a biblioteca %s para mais informação. From 9855c3f7c62147e0a0efb9882b6e508b1cfc854f Mon Sep 17 00:00:00 2001 From: Dee Yeum <36423861+ChefYeum@users.noreply.github.com> Date: Wed, 20 Jan 2021 23:33:33 +0900 Subject: [PATCH 35/49] bothers me --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91a56142b9..be601ccf9c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ __That [processing-bugs](https://github.com/processing-bugs) fella is suspicious The issues list has been imported from Google Code, so there are many spurious references amongst them since the numbering changed. Basically, any time you see references to changes made by [processing-bugs](https://github.com/processing-bugs), it may be somewhat suspect. -Over time this will clean itself up as bugs are fixed and new issues are added from within Github. +Over time this will clean itself up as bugs are fixed and new issues are added from within GitHub. Help speed this process along by helping us! __Please help.__ From 7c72ea693659f411890169f41fbf24edc7bc7040 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 17:43:46 -0400 Subject: [PATCH 36/49] add note about Portugese translation update --- todo.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/todo.txt b/todo.txt index e6fa460dd0..3cdc06d422 100644 --- a/todo.txt +++ b/todo.txt @@ -11,6 +11,9 @@ X https://github.com/processing/processing/issues/5828 X https://github.com/processing/processing/pull/5906 X Replace C/C++ style array declarations with Java style array declarations X https://github.com/processing/processing/pull/5981 +X Updates and fixes for PDE_pt.properties (Portugese translation) +X https://github.com/processing/processing/pull/6097 +X https://github.com/processing/processing/pull/6098 from Casey From 5569c6b25573b159aff5c0a1e0e00b0276adb340 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 17:44:13 -0400 Subject: [PATCH 37/49] automatically lock closed/resolved issues/pulls after 30 days --- .github/lock.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/lock.yml diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 0000000000..14e31af728 --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,39 @@ +# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app + +# Number of days of inactivity before a closed issue or pull request is locked +daysUntilLock: 30 + +# Skip issues and pull requests created before a given timestamp. Timestamp must +# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable +skipCreatedBefore: false + +# Issues and pull requests with these labels will be ignored. Set to `[]` to disable +exemptLabels: [] + +# Label to add before locking, such as `outdated`. Set to `false` to disable +lockLabel: false + +# Comment to post before locking. Set to `false` to disable +lockComment: > + This thread has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue for + related bugs. + +# Assign `resolved` as the reason for locking. Set to `false` to disable +# setLockReason: true +setLockReason: false + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings just for `issues` or `pulls` +# issues: +# exemptLabels: +# - help-wanted +# lockLabel: outdated + +# pulls: +# daysUntilLock: 30 + +# Repository to extend settings from +# _extends: repo From 250e28b8ea1c34875184e32a4815edcdedaa71fe Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 17:45:03 -0400 Subject: [PATCH 38/49] note about issue locking --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be601ccf9c..66c15c1a66 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ There are also separate locations for [Android Mode](https://github.com/processi The [processing.js](http://processingjs.org) project is not affiliated with us, but you can find their issue tracker [here](https://github.com/processing-js/processing-js/issues). __Locked Issues__ -Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. +Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. Once an issue has been resolved for 30 days, it will automatically lock. __That [processing-bugs](https://github.com/processing-bugs) fella is suspicious.__ The issues list has been imported from Google Code, so there are many spurious references From 64e2bef545071258756c27bb563fcfd8c3614cd1 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 22:25:43 -0400 Subject: [PATCH 39/49] using a workflow for locking instead --- .github/lock.yml | 39 -------------------------------------- .github/workflows/lock.yml | 22 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 39 deletions(-) delete mode 100644 .github/lock.yml create mode 100644 .github/workflows/lock.yml diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index 14e31af728..0000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 30 - -# Skip issues and pull requests created before a given timestamp. Timestamp must -# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable -skipCreatedBefore: false - -# Issues and pull requests with these labels will be ignored. Set to `[]` to disable -exemptLabels: [] - -# Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: false - -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked since there has not been - any recent activity after it was closed. Please open a new issue for - related bugs. - -# Assign `resolved` as the reason for locking. Set to `false` to disable -# setLockReason: true -setLockReason: false - -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings just for `issues` or `pulls` -# issues: -# exemptLabels: -# - help-wanted -# lockLabel: outdated - -# pulls: -# daysUntilLock: 30 - -# Repository to extend settings from -# _extends: repo diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 0000000000..a8a24e0f5f --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,22 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '27 * * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2.0.1 + with: + github-token: ${{ github.token }} + issue-lock-inactive-days: '30' + issue-lock-comment: > + This issue has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. + pr-lock-comment: > + This pull request has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. From fd2b07551a586751f1a23cbf86e2fd8706007a74 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 22:35:58 -0400 Subject: [PATCH 40/49] so much for running at an off time --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index a8a24e0f5f..f46041e750 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,7 +2,7 @@ name: 'Lock Threads' on: schedule: - - cron: '27 * * * *' + - cron: '0 * * * *' jobs: lock: From ad31c61bc10e7dda3f8806b865139858f8252326 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 28 Jun 2021 17:45:24 -0400 Subject: [PATCH 41/49] add a note about the new repo --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 66c15c1a66..a4fb443d57 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# Since the release of Processing 3.5.4 in January 2020, development has moved to [a new repository](https://github.com/processing/processing4/). +Using a [4.0 release](https://github.com/processing/processing4/releases) (even an alpha or beta version) is recommended if you find an issue. To avoid confusion, this repo will remain open at least until a 4.0 release is the default download at https://processing.org/download. We chose to move to a new repository so that we could clean out old files accumulated over the last 20 years. + + Processing ========== From 9eb4e9b6c975d8e9d3cce85230300c04a52927c6 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 6 Jul 2021 06:13:43 -0400 Subject: [PATCH 42/49] clarifying lock message, run lock daily instead of hourly --- .github/workflows/lock.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index f46041e750..d3ea54200a 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,7 +2,7 @@ name: 'Lock Threads' on: schedule: - - cron: '0 * * * *' + - cron: '* 6 * * *' jobs: lock: @@ -13,10 +13,11 @@ jobs: github-token: ${{ github.token }} issue-lock-inactive-days: '30' issue-lock-comment: > - This issue has been automatically locked since there - has not been any recent activity after it was closed. + This issue has been automatically locked. To avoid confusion + with reports that have already been resolved, closed issues + are automatically locked 30 days after the last comment. Please open a new issue for related bugs. pr-lock-comment: > - This pull request has been automatically locked since there - has not been any recent activity after it was closed. - Please open a new issue for related bugs. + This pull request has been automatically locked. + Pull requests that have been closed are automatically + locked 30 days after the last comment. From d234e79f21e4534a8732ba177c5717c4e028e959 Mon Sep 17 00:00:00 2001 From: Jeremy Douglass Date: Wed, 18 Aug 2021 20:48:19 -0700 Subject: [PATCH 43/49] Update ISSUE_TEMPLATE.md to redirect Processing 4 questions > STOP! PROCESSING 4 ISSUES GO TO https://github.com/processing/processing4/issues --- ISSUE_TEMPLATE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index a4f3e3258b..ff4ffecc6c 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,3 +1,5 @@ + + @@ -6,6 +8,8 @@ + + ## Description From a6a86250ffa4041b7d77fbb66dc02e78360c64f0 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 3 Oct 2021 11:48:48 -0400 Subject: [PATCH 44/49] tweak issue template a little --- ISSUE_TEMPLATE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index ff4ffecc6c..9a78beeb43 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ + ## Description From 8b15e4f548c1426df3a5ebe4c2106619faf7c4ba Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 27 Mar 2022 11:19:42 -0400 Subject: [PATCH 45/49] update issue template --- ISSUE_TEMPLATE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 9a78beeb43..bc9287c602 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,4 +1,8 @@ - + + + + + From 69ccc92e6950dd3f071abc23cffe9763014638da Mon Sep 17 00:00:00 2001 From: Alex <93376818+sashashura@users.noreply.github.com> Date: Thu, 1 Sep 2022 22:16:50 +0100 Subject: [PATCH 46/49] Update lock.yml Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com> --- .github/workflows/lock.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index d3ea54200a..30b12e76c3 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -4,8 +4,14 @@ on: schedule: - cron: '* 6 * * *' +permissions: + contents: read + jobs: lock: + permissions: + issues: write + pull-requests: write runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v2.0.1 From 36a554b38f230384dbab20a3b2f47fef82df9b99 Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Tue, 17 Dec 2024 09:49:47 +0100 Subject: [PATCH 47/49] Lock Threads fix Run at 6, not every minute of the 6th hour --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 30b12e76c3..10801377c7 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,7 +2,7 @@ name: 'Lock Threads' on: schedule: - - cron: '* 6 * * *' + - cron: '* 6 * * 0' permissions: contents: read From 25a12a723a24e044aac6f29bbf1f85e25683a9eb Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Tue, 17 Dec 2024 16:10:08 +0100 Subject: [PATCH 48/49] Update lock.yml --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 10801377c7..5ed1e8ee84 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,7 +2,7 @@ name: 'Lock Threads' on: schedule: - - cron: '* 6 * * 0' + - cron: '0 6 * * *' permissions: contents: read From 1de30e075fb6675cc4c8a0f7b29febab415b1ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20de=20Courville?= Date: Sun, 18 May 2025 23:02:16 +0200 Subject: [PATCH 49/49] Update README.md Better callout and strikethrough for clarity --- README.md | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index a4fb443d57..ece7d3ab72 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,48 @@ -# Since the release of Processing 3.5.4 in January 2020, development has moved to [a new repository](https://github.com/processing/processing4/). -Using a [4.0 release](https://github.com/processing/processing4/releases) (even an alpha or beta version) is recommended if you find an issue. To avoid confusion, this repo will remain open at least until a 4.0 release is the default download at https://processing.org/download. We chose to move to a new repository so that we could clean out old files accumulated over the last 20 years. + + +>[!WARNING] +> # Development has moved to [a new repository](https://github.com/processing/processing4/). + +Since the release of Processing 3.5.4 in January 2020, development has continued in a new repository: [processing/processing4](https://github.com/processing/processing4/). + +We chose to move to a new repository so that we could clean out old files accumulated over the last 20 years. + +To report bugs or request features, please open a [new issue](https://github.com/processing/processing4/issues/new/choose) on the Processing 4 repository. + + -Processing +~~Processing~~ ========== -This is the official source code for the [Processing](http://processing.org) Development Environment (PDE), -the “core” and the libraries that are included with the [download](http://processing.org/download). +~~This is the official source code for the [Processing](http://processing.org) Development Environment (PDE), +the “core” and the libraries that are included with the [download](http://processing.org/download).~~ -__I've found a bug!__ -Let us know [here](https://github.com/processing/processing/issues) (after first checking if someone has already posted a similar problem). +~~__I've found a bug!__~~ +~~Let us know [here](https://github.com/processing/processing/issues) (after first checking if someone has already posted a similar problem). If it's a reference, web site, or examples issue, take that up with folks [here](https://github.com/processing/processing-docs/issues). There are also separate locations for [Android Mode](https://github.com/processing/processing-android/issues), or the [Video](https://github.com/processing/processing-video/issues) and [Sound](https://github.com/processing/processing-sound/issues) libraries. -The [processing.js](http://processingjs.org) project is not affiliated with us, but you can find their issue tracker [here](https://github.com/processing-js/processing-js/issues). +The [processing.js](http://processingjs.org) project is not affiliated with us, but you can find their issue tracker [here](https://github.com/processing-js/processing-js/issues).~~ -__Locked Issues__ -Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. Once an issue has been resolved for 30 days, it will automatically lock. +~~__Locked Issues__ +Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. Once an issue has been resolved for 30 days, it will automatically lock.~~ -__That [processing-bugs](https://github.com/processing-bugs) fella is suspicious.__ +~~__That [processing-bugs](https://github.com/processing-bugs) fella is suspicious.__ The issues list has been imported from Google Code, so there are many spurious references amongst them since the numbering changed. Basically, any time you see references to changes made by [processing-bugs](https://github.com/processing-bugs), it may be somewhat suspect. Over time this will clean itself up as bugs are fixed and new issues are added from within GitHub. -Help speed this process along by helping us! +Help speed this process along by helping us!~~ -__Please help.__ +~~__Please help.__ The instructions for building the source [are here](https://github.com/processing/processing/wiki/Build-Instructions). -Please help us fix problems, and if you're submitting code, following the [style guidelines](https://github.com/processing/processing/wiki/Style-Guidelines) helps save me a lot of time. +Please help us fix problems, and if you're submitting code, following the [style guidelines](https://github.com/processing/processing/wiki/Style-Guidelines) helps save me a lot of time.~~ -__And finally...__ -Someday we'll also fix all these bugs, throw together hundreds of unit tests, and get rich off all this stuff that we're giving away for free. But not today. +~~__And finally...__ +Someday we'll also fix all these bugs, throw together hundreds of unit tests, and get rich off all this stuff that we're giving away for free. But not today.~~ -So in the meantime, I ask for your patience, +~~So in the meantime, I ask for your patience, [participation](https://github.com/processing/processing/wiki/Project-List), -and [patches](https://github.com/processing/processing/pulls). +and [patches](https://github.com/processing/processing/pulls).~~ -Ben Fry, 20 January 2019 +~~Ben Fry, 20 January 2019~~