From 053ecc68889e3b4ed1afd23ec12d6ff0aea593d4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 13 Jun 2008 22:57:15 +0000 Subject: compiles again --- sources/core/VSTask.java | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'sources/core/VSTask.java') 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()); } @@ -295,6 +307,17 @@ public class VSTask implements Comparable, VSSerializable { this.taskTime = taskTime; } + /** + * 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. * -- cgit v1.2.3