Search in sources :

Example 1 with AppDisableException

use of org.cytoscape.app.internal.exception.AppDisableException in project cytoscape-impl by cytoscape.

the class CurrentlyInstalledAppsPanel method disableSelectedButtonActionPerformed.

private void disableSelectedButtonActionPerformed(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) {
        if (app.getStatus().equals(AppStatus.DISABLED))
            continue;
        try {
            appManager.disableApp(app);
        } catch (AppDisableException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    disableSelectedButton.setEnabled(false);
    enableSelectedButton.setEnabled(true);
    uninstallSelectedButton.setEnabled(true);
}
Also used : BundleApp(org.cytoscape.app.internal.manager.BundleApp) App(org.cytoscape.app.internal.manager.App) SimpleApp(org.cytoscape.app.internal.manager.SimpleApp) Collection(java.util.Collection) AppDisableException(org.cytoscape.app.internal.exception.AppDisableException)

Aggregations

Collection (java.util.Collection)1 AppDisableException (org.cytoscape.app.internal.exception.AppDisableException)1 App (org.cytoscape.app.internal.manager.App)1 BundleApp (org.cytoscape.app.internal.manager.BundleApp)1 SimpleApp (org.cytoscape.app.internal.manager.SimpleApp)1