use of com.google.security.zynamics.binnavi.API.plugins.IGraphMenuPlugin in project binnavi by google.
the class CGraphWindowMenuBar method dipose.
/**
* Frees allocated resources.
*/
public void dipose() {
m_synchronizer.dispose();
m_selectionMenu.dispose();
final List<IGraphMenuPlugin> plugins = Lists.newArrayList();
for (final IPlugin<IPluginInterface> plugin : PluginInterface.instance().getPluginRegistry()) {
if (plugin instanceof IGraphMenuPlugin) {
plugins.add((IGraphMenuPlugin) plugin);
}
}
for (final IGraphMenuPlugin plugin : plugins) {
try {
plugin.closed(m_model.getGraphFrame());
} catch (final Exception exception) {
CUtilityFunctions.logException(exception);
final String innerMessage = "E00106: " + "Plugin caused an unexpected exception";
final String innerDescription = CUtilityFunctions.createDescription(String.format("The plugin %s caused an unexpected exception.", plugin.getName()), new String[] { "The plugin contains a bug." }, new String[] { "The plugin probably behaves erroneously from this point on but it remains active" });
NaviErrorDialog.show(m_model.getParent(), innerMessage, innerDescription, exception);
}
}
m_pluginsMenu.dispose();
}
use of com.google.security.zynamics.binnavi.API.plugins.IGraphMenuPlugin in project binnavi by google.
the class CPluginsMenu method fillPluginsMenu.
/**
* Creates the menu items of the Plugins menu.
*/
private void fillPluginsMenu() {
final List<IGraphMenuPlugin> plugins = new ArrayList<IGraphMenuPlugin>();
for (@SuppressWarnings("rawtypes") final IPlugin plugin : PluginInterface.instance().getPluginRegistry()) {
if (plugin instanceof IGraphMenuPlugin) {
plugins.add((IGraphMenuPlugin) plugin);
}
}
add(CActionProxy.proxy(new CActionGraphScripting(m_model.getGraphPanel())));
add(CActionProxy.proxy(new CActionOpenLogConsole()));
addSeparator();
for (final IGraphMenuPlugin plugin : plugins) {
extendPluginMenu(plugin);
}
}
Aggregations