Merge "Invoke *PluginListener only after start/reload is fully done"
This commit is contained in:
commit
5002d0c7ce
@ -217,10 +217,6 @@ public class PluginGuiceEnvironment {
|
||||
}
|
||||
|
||||
void onStartPlugin(Plugin plugin) {
|
||||
for (StartPluginListener l : onStart) {
|
||||
l.onStartPlugin(plugin);
|
||||
}
|
||||
|
||||
RequestContext oldContext = enter(plugin);
|
||||
try {
|
||||
attachItem(sysItems, plugin.getSysInjector(), plugin);
|
||||
@ -237,6 +233,10 @@ public class PluginGuiceEnvironment {
|
||||
} finally {
|
||||
exit(oldContext);
|
||||
}
|
||||
|
||||
for (StartPluginListener l : onStart) {
|
||||
l.onStartPlugin(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
void onStopPlugin(Plugin plugin) {
|
||||
@ -273,10 +273,6 @@ public class PluginGuiceEnvironment {
|
||||
}
|
||||
|
||||
void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin) {
|
||||
for (ReloadPluginListener l : onReload) {
|
||||
l.onReloadPlugin(oldPlugin, newPlugin);
|
||||
}
|
||||
|
||||
// Index all old registrations by the raw type. These may be replaced
|
||||
// during the reattach calls below. Any that are not replaced will be
|
||||
// removed when the old plugin does its stop routine.
|
||||
@ -302,6 +298,10 @@ public class PluginGuiceEnvironment {
|
||||
} finally {
|
||||
exit(oldContext);
|
||||
}
|
||||
|
||||
for (ReloadPluginListener l : onReload) {
|
||||
l.onReloadPlugin(oldPlugin, newPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
private void reattachMap(
|
||||
|
Loading…
Reference in New Issue
Block a user