summaryrefslogtreecommitdiff
path: root/sources/core/VSTask.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-13 22:57:15 +0000
committerPaul Buetow <paul@buetow.org>2008-06-13 22:57:15 +0000
commit053ecc68889e3b4ed1afd23ec12d6ff0aea593d4 (patch)
treed62eadeb7c06712a7c4d8fad33bd35d09bfe79b2 /sources/core/VSTask.java
parent12b26d3285b05ad3d7387280bd7e9ec016f818d8 (diff)
compiles again
Diffstat (limited to 'sources/core/VSTask.java')
-rw-r--r--sources/core/VSTask.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index dbac3e9..bbc9cec 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -28,6 +28,7 @@ import java.io.*;
import events.*;
import events.implementations.*;
import events.internal.*;
+import exceptions.*;
import prefs.VSPrefs;
import protocols.VSAbstractProtocol;
import serialize.*;
@@ -101,9 +102,20 @@ public class VSTask implements Comparable, VSSerializable {
* @param task the task to copy
*/
public VSTask(VSTask task) {
+ VSAbstractEvent event = task.getEvent();
+
+ try {
+ VSAbstractEvent copy = event.getCopy();
+ // Use the copy of the event object
+ event = copy;
+ } catch (VSEventNotCopyableException e) {
+ // Use the original event object
+ System.out.println(e);
+ }
+
init(task.getTaskTime(),
task.getProcess(),
- task.getEvent(),
+ event,
!task.isGlobalTimed());
}
@@ -296,6 +308,17 @@ public class VSTask implements Comparable, VSSerializable {
}
/**
+ * Sets the process.
+ *
+ * @param process the process
+ */
+ public void setProcess(VSProcess process) {
+ this.process = process;
+ // TODO:: use the process' specific event object
+ //this.event = null;
+ }
+
+ /**
* Gets the event.
*
* @return the event