We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c28e3a4 commit 3b0a982Copy full SHA for 3b0a982
src/main/java/org/scijava/search/DefaultSearchOperation.java
@@ -37,6 +37,8 @@
37
import java.util.regex.PatternSyntaxException;
38
39
import org.scijava.Context;
40
+import org.scijava.event.ContextDisposingEvent;
41
+import org.scijava.event.EventHandler;
42
import org.scijava.log.LogService;
43
import org.scijava.plugin.Parameter;
44
import org.scijava.plugin.PluginService;
@@ -123,6 +125,11 @@ public void terminate() {
123
125
active = false;
124
126
}
127
128
+ @EventHandler
129
+ public void onEvent(@SuppressWarnings("unused") final ContextDisposingEvent evt) {
130
+ terminate();
131
+ }
132
+
133
// -- Helper methods --
134
135
private List<Searcher> searchers() {
0 commit comments