mirror of
https://github.com/processing/processing4.git
synced 2026-02-05 06:39:20 +01:00
A possible solution to #65
This commit is contained in:
@@ -1386,10 +1386,12 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
public String statusMessage;
|
||||
public void statusMessage(final String what, int type){
|
||||
// Don't re-display the old message again
|
||||
if(what.equals(statusMessage) && type == statusMessageType) {
|
||||
return;
|
||||
if(type != STATUS_EMPTY) {
|
||||
if(what.equals(statusMessage) && type == statusMessageType) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
statusMessage = what;
|
||||
statusMessage = new String(what);
|
||||
statusMessageType = type;
|
||||
switch (type) {
|
||||
case STATUS_COMPILER_ERR:
|
||||
@@ -1401,26 +1403,15 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
statusNotice(what);
|
||||
break;
|
||||
}
|
||||
// log("SW 0");
|
||||
// final Timer t = new Timer();
|
||||
// t.schedule(new TimerTask() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// log("SW 1");
|
||||
// statusEmpty();
|
||||
// log("SW 2");
|
||||
// t.cancel();
|
||||
// }
|
||||
// }, 2000);
|
||||
// Don't need to clear compiler error messages
|
||||
if(type == STATUS_COMPILER_ERR) return;
|
||||
|
||||
// Clear the message after a delay
|
||||
SwingWorker s = new SwingWorker<Void, Void>() {
|
||||
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
|
||||
try {
|
||||
log("SW 1");
|
||||
Thread.sleep(2 * 1000);
|
||||
log("SW 2");
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user