From 5d50dcd635b9f17eb89688650860730b8e3e859f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 18 May 2008 19:36:09 +0000 Subject: Backup --- sources/events/VSEvent.java | 3 +++ sources/protocols/VSProtocol.java | 5 ----- sources/simulator/VSSimulation.java | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sources') diff --git a/sources/events/VSEvent.java b/sources/events/VSEvent.java index e84e3aa..1ce8570 100644 --- a/sources/events/VSEvent.java +++ b/sources/events/VSEvent.java @@ -11,6 +11,8 @@ abstract public class VSEvent extends VSPrefs { public void init(VSProcess process) { this.process = process; this.prefs = process.getPrefs(); + + onInit(); } protected final void setClassname(String eventClassname) { @@ -29,6 +31,7 @@ abstract public class VSEvent extends VSPrefs { } public final String getShortname() { + System.out.println("getShortname " + eventClassname); return VSRegisteredEvents.getShortname(eventClassname); } diff --git a/sources/protocols/VSProtocol.java b/sources/protocols/VSProtocol.java index ceca348..71b819f 100644 --- a/sources/protocols/VSProtocol.java +++ b/sources/protocols/VSProtocol.java @@ -9,11 +9,6 @@ abstract public class VSProtocol extends VSEvent { private boolean isClient; private boolean currentContextIsServer; - public void init(VSProcess process) { - super.init(process); - onInit(); - } - protected void sendMessage(VSMessage message) { process.increaseLamportTime(); process.increaseVectorTime(); diff --git a/sources/simulator/VSSimulation.java b/sources/simulator/VSSimulation.java index 7f10070..2cffea8 100644 --- a/sources/simulator/VSSimulation.java +++ b/sources/simulator/VSSimulation.java @@ -381,6 +381,8 @@ public class VSSimulation extends VSFrame implements ActionListener { public VSTask createTask(VSProcess process, long time, boolean localTimedTask) { VSEvent event = VSRegisteredEvents.createEventInstanceByClassname(eventClassname, process); + event.init(process); + if (isProtocolActivation || isProtocolDeactivation) { ProtocolEvent protocolEvent = (ProtocolEvent) event; protocolEvent.setEventClassname(eventClassname); -- cgit v1.2.3