summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-18 19:36:09 +0000
committerPaul Buetow <paul@buetow.org>2008-05-18 19:36:09 +0000
commit5d50dcd635b9f17eb89688650860730b8e3e859f (patch)
tree7a2699a1fb19fce9cc3d1a5b03fe4315b7e0d08b
parent2d45de18df35f6d3ba4ca0b86ec1188e49637413 (diff)
Backup
-rw-r--r--sources/events/VSEvent.java3
-rw-r--r--sources/protocols/VSProtocol.java5
-rw-r--r--sources/simulator/VSSimulation.java2
3 files changed, 5 insertions, 5 deletions
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);