Skip to content

Commit 6b1fd5f

Browse files
committed
DefaultAppEventService: specify subscription keys
This will ensure that only the highest priority event handlers are subscribed. Specifically, the LegacyAppEventService will take precedence over the CoreAppEventService, should both of them be present in the application context.
1 parent bdf7467 commit 6b1fd5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/scijava/platform/DefaultAppEventService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ public List<Class<? extends Command>> getCommands() {
8585

8686
// -- Event handlers --
8787

88-
@EventHandler
88+
@EventHandler(key = "org.scijava.platform.AppEventService#about")
8989
protected void onEvent(@SuppressWarnings("unused") final AppAboutEvent event)
9090
{
9191
about();
9292
}
9393

94-
@EventHandler
94+
@EventHandler(key = "org.scijava.platform.AppEventService#prefs")
9595
protected void onEvent(
9696
@SuppressWarnings("unused") final AppPreferencesEvent event)
9797
{
9898
prefs();
9999
}
100100

101-
@EventHandler
101+
@EventHandler(key = "org.scijava.platform.AppEventService#quit")
102102
protected void onEvent(@SuppressWarnings("unused") final AppQuitEvent event) {
103103
quit();
104104
}

0 commit comments

Comments
 (0)