use of org.cytoscape.app.internal.exception.AppUninstallException in project cytoscape-impl by cytoscape.
the class CurrentlyInstalledAppsPanel method uninstallSelectedButtonActionPerformed.
private void uninstallSelectedButtonActionPerformed(ActionEvent evt) {
// Obtain App objects corresponding to currently selected table entries
Set<App> selectedApps = getSelectedApps();
Map<App, Collection<App>> otherAppsDependingOn = getOtherAppsDependingOn(selectedApps);
if (otherAppsDependingOn != null && !continueWithConflicts(otherAppsDependingOn))
return;
for (App app : selectedApps) {
// Only uninstall apps that are installed
if (app.getStatus() == AppStatus.INSTALLED || app.getStatus() == AppStatus.DISABLED || app.getStatus() == AppStatus.FAILED_TO_LOAD || app.getStatus() == AppStatus.FAILED_TO_START) {
try {
appManager.uninstallApp(app);
} catch (AppUninstallException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
uninstallSelectedButton.setEnabled(false);
disableSelectedButton.setEnabled(true);
enableSelectedButton.setEnabled(true);
appsAvailableTable.clearSelection();
}
Aggregations