if (!file.exists()) {
valid = false;
}
}
final DCLabel extensionLabel;
if (valid) {
extensionLabel = DCLabel.dark("<html><b>" + extensionPackage.getName() + "</b><br/>Loaded: "
+ extensionPackage.getLoadedAnalyzers() + " Analyzers, " + extensionPackage.getLoadedTransformers()
+ " Transformers, " + extensionPackage.getLoadedFilters() + " Filters.<br/>Root package: '"
+ extensionPackage.getScanPackage() + "'.</html>");
extensionLabel.setIcon(pluginIcon);
} else {
extensionLabel = DCLabel.dark("<html><b>" + extensionPackage.getName()
+ "</b><br/>Error loading extension files:<br/>" + Arrays.toString(files) + "</html>");
extensionLabel.setIcon(errorIcon);
}
final JButton removeButton = WidgetFactory.createSmallButton("images/actions/remove.png");
removeButton.setToolTipText("Remove extension");
removeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
extensionPackages.remove(extensionPackage);
removeButton.setEnabled(false);
extensionLabel.setText("*** Removal requires application restart ***");
}
});
final DCPanel extensionPanel = new DCPanel();
extensionPanel.setBorder(WidgetUtils.BORDER_LIST_ITEM);