From f32bc24469d0e0d8e184c6a27fe04b13f59d6fb0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 31 May 2008 03:41:18 +0000 Subject: local timed tasks bugfix. --- sources/core/VSTask.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sources/core/VSTask.java') diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 5039612..c7b378d 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -249,12 +249,14 @@ public class VSTask implements Comparable { */ public String toString() { StringBuffer buffer = new StringBuffer(); + buffer.append(prefs.getString("lang.task")); buffer.append(" "); buffer.append(getTaskTime()); buffer.append(event.toString()); buffer.append("; PID: "); buffer.append(process.getProcessID()); + return buffer.toString(); } @@ -271,7 +273,7 @@ public class VSTask implements Comparable { else if (taskTime > task.getTaskTime()) return 1; - /* If it's a ProtocolRecover, it should get handled very first */ + /* If it's a recovering, it should get handled very first */ boolean a = event instanceof VSProcessRecoverEvent; boolean b = task.getEvent() instanceof VSProcessRecoverEvent; @@ -284,7 +286,20 @@ public class VSTask implements Comparable { if (b) return 1; - /* If it's a VSProtocolEvent, it should get handled first */ + /* If it's a crash, it should get handled second first */ + a = event instanceof VSProcessCrashEvent; + b = task.getEvent() instanceof VSProcessCrashEvent; + + if (a && b) + return 0; + + if (a) + return -1; + + if (b) + return 1; + + /* If it's a VSProtocolEvent, it should get handled third */ a = event instanceof VSProtocolEvent; b = task.getEvent() instanceof VSProtocolEvent; -- cgit v1.2.3