mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix up the Eclipse build after moving modes a bit
This commit is contained in:
@@ -21,9 +21,5 @@
|
||||
<classpathentry kind="lib" path="lib/apple.jar"/>
|
||||
<classpathentry kind="lib" path="test/lib/junit-4.8.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/org-netbeans-swing-outline.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/fry/coconut/processing/java2/mode/org.eclipse.jdt.core_3.8.2.v20120814-155456.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/fry/coconut/processing/java2/mode/org.eclipse.text_3.5.200.v20120523-1310.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/fry/coconut/processing/java2/mode/org.eclipse.core.runtime_3.8.0.v20120521-2346.jar"/>
|
||||
<classpathentry kind="lib" path="/Users/fry/coconut/processing/java2/mode/org.eclipse.equinox.common_3.6.100.v20120522-1841.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -277,15 +277,19 @@ public class Base {
|
||||
ModeContribution.load(this, getContentFile("modes/javascript"),
|
||||
"processing.mode.javascript.JavaScriptMode").getMode();
|
||||
|
||||
if (true) {
|
||||
coreModes = new Mode[] { javaMode, androidMode, javaScriptMode };
|
||||
coreModes = new Mode[] { javaMode, androidMode, javaScriptMode };
|
||||
|
||||
} else {
|
||||
Mode debugMode =
|
||||
ModeContribution.load(this, getContentFile("modes/java2"),
|
||||
"processing.mode.java2.DebugMode").getMode();
|
||||
coreModes = new Mode[] { javaMode, androidMode, javaScriptMode, debugMode };
|
||||
// check for the new mode in case it's available
|
||||
// try {
|
||||
// Class.forName("processing.mode.java2.DebugMode");
|
||||
ModeContribution experimentalContrib =
|
||||
ModeContribution.load(this, getContentFile("modes/java2"),
|
||||
"processing.mode.java2.DebugMode");
|
||||
if (experimentalContrib != null) {
|
||||
Mode experimentalMode = experimentalContrib.getMode();
|
||||
coreModes = new Mode[] { javaMode, androidMode, javaScriptMode, experimentalMode };
|
||||
}
|
||||
// } catch (ClassNotFoundException e) { }
|
||||
|
||||
// for (Mode mode : coreModes) { // already called by load() above
|
||||
// mode.setupGUI();
|
||||
|
||||
@@ -68,13 +68,21 @@ public class ModeContribution extends InstalledContribution {
|
||||
|
||||
|
||||
// static public ModeContribution load(Base base, File folder, String searchName) {
|
||||
static public ModeContribution load(Base base, File folder, String searchName) {
|
||||
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 (Exception e) {
|
||||
e.printStackTrace();
|
||||
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,
|
||||
// but it helps us load experimental mode when it's available.
|
||||
Base.log("ModeContribution.load() failed for " + searchName, e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user