private void reloadPlugin(PluginReference pluginReference) throws PluginException {
final PluginRegistry reg = mgr.getRegistry();
final List<PluginReference> refs = reg.unloadPlugin(pluginReference.getId());
for (PluginReference ref : refs) {
if (reg.getPluginDescriptor(ref.getId()) == null) {
reg.loadPlugin(mgr.getLoaderManager(), ref, true); //resolve=true
}
}
if (reg.getPluginDescriptor(pluginReference.getId()) == null) {
reg.loadPlugin(mgr.getLoaderManager(), pluginReference, true); //resolve=true
}