Author: mes
Date: 2010-02-02 12:29:04 -0800 (Tue, 02 Feb 2010)
New Revision: 19140
Modified:
cytoscape/trunk/src/cytoscape/plugin/PluginManager.java
Log:
cleaned up delete method slightly
Modified: cytoscape/trunk/src/cytoscape/plugin/PluginManager.java
===================================================================
--- cytoscape/trunk/src/cytoscape/plugin/PluginManager.java 2010-02-02
20:25:20 UTC (rev 19139)
+++ cytoscape/trunk/src/cytoscape/plugin/PluginManager.java 2010-02-02
20:29:04 UTC (rev 19140)
@@ -463,31 +463,22 @@
* If this method is called from a webstart instance
*/
public void delete() throws ManagerException {
- String ErrorMsg = "Failed to completely delete the following
installed components:\n";
- boolean deleteError = false;
- List<DownloadableInfo> ToDelete = pluginTracker
-
.getDownloadableListByStatus(PluginStatus.DELETE);
+ List<DownloadableInfo> toDelete =
pluginTracker.getDownloadableListByStatus(
+
PluginStatus.DELETE);
- for (DownloadableInfo infoObj : ToDelete) {
+ for (DownloadableInfo infoObj : toDelete) {
Installable ins = infoObj.getInstallable();
try {
if (ins.uninstall()) {
-
pluginTracker.removeDownloadable(infoObj,
- PluginStatus.DELETE);
-
pluginTracker.removeDownloadable(infoObj,
- PluginStatus.CURRENT);
+
pluginTracker.removeDownloadable(infoObj, PluginStatus.DELETE);
+
pluginTracker.removeDownloadable(infoObj, PluginStatus.CURRENT);
} // TODO um.....XXXX
- } catch (ManagerException me) {
- deleteError = true;
- ErrorMsg += infoObj.getName() + " v"
- + infoObj.getObjectVersion() +
"\n";
- // me.printStackTrace();
+ } catch (Exception me) {
+ throw new ManagerException(
+ "Failed to completely delete the
following installed components:\n" +
+ infoObj.getName() + " v" +
infoObj.getObjectVersion() + "\n", me);
}
-
- if (deleteError) {
- throw new ManagerException(ErrorMsg);
- }
}
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.