A possible solution to #65

This commit is contained in:
Manindra Moharana
2014-06-06 14:27:32 +05:30
parent 1c1c71bb3a
commit 8ac153b4f5
2 changed files with 10 additions and 19 deletions

View File

@@ -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();
}