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