mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
fixes from Manindra (issue #1449)
This commit is contained in:
@@ -378,6 +378,7 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
errorCheckerService.updateErrorTable();
|
||||
errorCheckerService.updateEditorStatus();
|
||||
getTextArea().repaint();
|
||||
errorBar.repaint();
|
||||
} else {
|
||||
errorCheckerService.resumeThread();
|
||||
System.out.println(thisEditor.getSketch().getName()
|
||||
|
||||
@@ -186,11 +186,11 @@ public class ErrorCheckerService implements Runnable{
|
||||
try {
|
||||
parser = ASTParser.newParser(AST.JLS4);
|
||||
} catch (Exception e) {
|
||||
System.err.println("XQMode initialization failed. "
|
||||
System.err.println("Experimental Mode initialization failed. "
|
||||
+ "Are you running the right version of Processing? ");
|
||||
pauseThread();
|
||||
} catch (Error e) {
|
||||
System.err.println("XQMode initialization failed. ");
|
||||
System.err.println("Experimental Mode initialization failed. ");
|
||||
e.printStackTrace();
|
||||
pauseThread();
|
||||
}
|
||||
@@ -228,7 +228,8 @@ public class ErrorCheckerService implements Runnable{
|
||||
|
||||
public void run() {
|
||||
stopThread = false;
|
||||
|
||||
|
||||
checkCode();
|
||||
while (!stopThread) {
|
||||
try {
|
||||
// Take a nap.
|
||||
@@ -326,13 +327,16 @@ public class ErrorCheckerService implements Runnable{
|
||||
|
||||
// if (classpathJars.size() > 0)
|
||||
// System.out
|
||||
// .println("XQMode: Loading contributed libraries referenced by import statements.");
|
||||
// .println("Experimental Mode: Loading contributed libraries referenced by import statements.");
|
||||
|
||||
File f = new File("modes"
|
||||
+ File.separator
|
||||
+ "experimental"
|
||||
File f = Base.getContentFile("modes" + File.separator + "experimental"
|
||||
+ File.separator + "mode");
|
||||
|
||||
if(!f.exists()) {
|
||||
System.err.println("Could not locate the files required for on-the-fly error checking. Bummer.");
|
||||
return;
|
||||
}
|
||||
|
||||
FileFilter fileFilter = new FileFilter() {
|
||||
public boolean accept(File file) {
|
||||
return (file.getName().endsWith(".jar") && !file
|
||||
@@ -432,7 +436,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
} catch (NoClassDefFoundError e) {
|
||||
System.err
|
||||
.println(e
|
||||
+ " compileCheck() problem. Somebody tried to mess with XQMode files.");
|
||||
+ " compileCheck() problem. Somebody tried to mess with Experimental Mode files.");
|
||||
stopThread();
|
||||
}
|
||||
// System.out.println("Compilecheck, Done.");
|
||||
@@ -496,7 +500,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
.contentsToClassPath(codeFolder);
|
||||
codeFolderChecked = true;
|
||||
if (codeFolderClassPath.equalsIgnoreCase("")) {
|
||||
System.err.println("XQMODE: Yikes! Can't find \""
|
||||
System.err.println("Experimental Mode: Yikes! Can't find \""
|
||||
+ entry
|
||||
+ "\" library! Line: "
|
||||
+ impstat.lineNumber
|
||||
@@ -523,7 +527,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
+ e2);
|
||||
}
|
||||
} else {
|
||||
System.err.println("XQMODE: Yikes! Can't find \""
|
||||
System.err.println("Experimental Mode: Yikes! Can't find \""
|
||||
+ entry
|
||||
+ "\" library! Line: "
|
||||
+ impstat.lineNumber
|
||||
|
||||
@@ -47,15 +47,15 @@ public class ExperimentalMode extends JavaMode {
|
||||
public ExperimentalMode(Base base, File folder) {
|
||||
super(base, folder);
|
||||
|
||||
// use libraries folder from javamode. will make sketches using core libraries work, as well as import libraries and examples menus
|
||||
// for (Mode m : base.getModeList()) {
|
||||
// if (m.getClass() == JavaMode.class) {
|
||||
// JavaMode jMode = (JavaMode) m;
|
||||
// librariesFolder = jMode.getLibrariesFolder();
|
||||
// rebuildLibraryList();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// use libraries folder from javamode. will make sketches using core libraries work, as well as import libraries and examples menus
|
||||
for (Mode m : base.getModeList()) {
|
||||
if (m.getClass() == JavaMode.class) {
|
||||
JavaMode jMode = (JavaMode) m;
|
||||
librariesFolder = jMode.getLibrariesFolder();
|
||||
rebuildLibraryList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch examples and reference from java mode
|
||||
// thx to Manindra (https://github.com/martinleopold/DebugMode/issues/4)
|
||||
|
||||
@@ -233,7 +233,7 @@ public class XQPreprocessor {
|
||||
public boolean visit(SimpleType node) {
|
||||
if (node.toString().equals("color")) {
|
||||
System.err
|
||||
.println("color type detected! \nThis shouldn't be happening! Please report this as an issue on www.github.com/Manindra29/XQMode");
|
||||
.println("color type detected! \nThis shouldn't be happening! Please report this as an issue.");
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user