summaryrefslogtreecommitdiff
path: root/sources/core/VSTask.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-31 03:41:18 +0000
committerPaul Buetow <paul@buetow.org>2008-05-31 03:41:18 +0000
commitf32bc24469d0e0d8e184c6a27fe04b13f59d6fb0 (patch)
tree2bd245377baf56d2cccad26a9cc56f88b232140b /sources/core/VSTask.java
parent28c8f68ecef4b4e30994ae1c1fd201a0cd871f0d (diff)
local timed tasks bugfix.
Diffstat (limited to 'sources/core/VSTask.java')
-rw-r--r--sources/core/VSTask.java19
1 files changed, 17 insertions, 2 deletions
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;