}
isPluginAccessible(project);
// check if tool window is registered
final ToolWindow toolWindow = isToolWindowRegistred(project);
if (toolWindow == null) {
presentation.setEnabled(false);
presentation.setVisible(false);
return;
}
// selected ?
final Boolean selected = isSelected(event) ? Boolean.TRUE : Boolean.FALSE;
presentation.putClientProperty(SELECTED_PROPERTY, selected);
//setSelected(event, isSelected(event));
// enable ?
if (isRunning() && selected || !isRunning()) {
_enabled = Boolean.TRUE;
}
//_enabled = isRunning() && selected ? ;
presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
presentation.setVisible(true);
} catch (final Throwable e) {
final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
LOGGER.error("Action update failed", processed);