File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import act .event .SystemEvent ;
2626
2727public abstract class AppEvent extends ActEvent <App > implements SystemEvent {
28- private int id ;
28+
29+ private AppEventId id ;
30+
2931 public AppEvent (AppEventId id , App source ) {
3032 super (source );
31- this .id = id . ordinal () ;
33+ this .id = id ;
3234 }
35+
36+ @ Override
37+ public String toString () {
38+ return id .name ();
39+ }
40+
3341 public int id () {
34- return id ;
42+ return id . ordinal () ;
3543 }
3644}
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ public synchronized EventBus trigger(AppEventId eventId) {
292292
293293 public synchronized EventBus emit (final AppEvent event ) {
294294 if (isTraceEnabled ()) {
295- trace ("emitting app event: %s" , event . id () );
295+ trace ("emitting app event: %s" , event );
296296 }
297297 if (isDestroyed ()) {
298298 return this ;
@@ -312,7 +312,7 @@ public synchronized EventBus emitAsync(AppEventId eventId) {
312312
313313 public synchronized EventBus emitAsync (final AppEvent event ) {
314314 if (isTraceEnabled ()) {
315- trace ("emitting app event asynchronously: %s" , event . id () );
315+ trace ("emitting app event asynchronously: %s" , event );
316316 }
317317 if (isDestroyed ()) {
318318 return this ;
You can’t perform that action at this time.
0 commit comments