Skip to content

Commit 02d31fc

Browse files
committed
Simplified the behavior of EventOccurrence. (OMG Issue FUML13-60)
1 parent 4acc136 commit 02d31fc

3 files changed

Lines changed: 11 additions & 23 deletions

File tree

org.modeldriven.fuml/src/main/java/fUML/Semantics/CommonBehaviors/Communications/EventOccurrence.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ public abstract class EventOccurrence extends FumlObject {
1717
public Reference target = null;
1818

1919
public void sendTo(Reference target) {
20+
// Set the target reference and start the SendingBehavior, which
21+
// will send this event occurrence to the target.
22+
2023
this.target = target;
2124
_startObjectBehavior();
22-
_send(new SendSignal());
25+
}
26+
27+
protected void doSend() {
28+
// Send this event occurrence to the target.
29+
30+
this.target.send(this);
2331
}
2432

2533
public abstract boolean match(fUML.Syntax.CommonBehaviors.Communications.Trigger trigger);
@@ -44,10 +52,6 @@ public boolean matchAny(fUML.Syntax.CommonBehaviors.Communications.TriggerList t
4452

4553
private EventOccurrence_SendingBehaviorExecution behavior = new EventOccurrence_SendingBehaviorExecution(this);
4654

47-
private void _send(SendSignal signal) {
48-
this.behavior._send(signal);
49-
}
50-
5155
private void _startObjectBehavior() {
5256
this.behavior._startObjectBehavior();
5357
}

org.modeldriven.fuml/src/main/java/fUML/Semantics/CommonBehaviors/Communications/EventOccurrence_SendingBehaviorExecution.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ public EventOccurrence_SendingBehaviorExecution(EventOccurrence self) {
2121

2222
public void _startObjectBehavior() {
2323
this.context = self.target.referent;
24-
}
25-
26-
public void _send(SendSignal signal) {
2724
ExecutionQueue.enqueue(this);
2825
}
29-
26+
3027
@Override
3128
public void execute() {
32-
this.self.target.send(this.self);
29+
this.self.doSend();
3330
}
3431

3532
@Override

org.modeldriven.fuml/src/main/java/fUML/Semantics/CommonBehaviors/Communications/SendSignal.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)