toolMenu.add(cmdItem);
if (isValid || toolPath == null) {
cmdItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
RunPlugin runPlugin = null;
try {
runPlugin = new RunPlugin(IGV.getMainFrame(), pluginSpecReader, tool, command);
} catch (IllegalStateException e1) {
MessageUtils.showErrorMessage(e1.getMessage(), e1);
return;
}
runPlugin.setVisible(true);
}
});
cmdItem.setEnabled(true);
} else {
cmdItem.setEnabled(false);