summaryrefslogtreecommitdiff
path: root/sources/events/VSAbstractEvent.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/events/VSAbstractEvent.java
parent12b26d3285b05ad3d7387280bd7e9ec016f818d8 (diff)
compiles again
Diffstat (limited to 'sources/events/VSAbstractEvent.java')
-rw-r--r--sources/events/VSAbstractEvent.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/sources/events/VSAbstractEvent.java b/sources/events/VSAbstractEvent.java
index 834b691..263f21f 100644
--- a/sources/events/VSAbstractEvent.java
+++ b/sources/events/VSAbstractEvent.java
@@ -55,17 +55,21 @@ abstract public class VSAbstractEvent extends VSPrefs {
private String eventClassname;
/**
- * Creates a copy of the event.
+ * Creates a copy of the event.
*
* @return The copy
*/
final public VSAbstractEvent getCopy() throws VSEventNotCopyableException {
- VSAbstractEvent copy = null
+ if (!(this instanceof VSCopyableEvent))
+ throw new VSEventNotCopyableException(eventShortname);
- if (this instanceof VSCopyableEvent)
- throw new VSEventNotCopyableException(eventShortname);
+ VSAbstractEvent copy =
+ VSRegisteredEvents.createEventInstanceByClassname(
+ eventClassname, process);
- return copy;
+ ((VSCopyableEvent) this).initCopy(copy);
+
+ return copy;
}
/**