summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-07-06 11:20:52 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-07-06 11:20:52 (GMT)
commite3acc6c8fee97fc8a46b10012908728f4a966c82 (patch)
tree06da6ea7e59e08b022c892c51c2238d15d744d2f
parent9c8035907ae29c4be0024ad35dea7594457fe0d8 (diff)
downloadQCG-Data-e3acc6c8fee97fc8a46b10012908728f4a966c82.zip
QCG-Data-e3acc6c8fee97fc8a46b10012908728f4a966c82.tar.gz
QCG-Data-e3acc6c8fee97fc8a46b10012908728f4a966c82.tar.bz2
[#315] delete nodes in ll, refresh issue?
-rw-r--r--idrop-swing/release_notes.txt2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java29
2 files changed, 11 insertions, 20 deletions
diff --git a/idrop-swing/release_notes.txt b/idrop-swing/release_notes.txt
index a19f326..b9db52f 100644
--- a/idrop-swing/release_notes.txt
+++ b/idrop-swing/release_notes.txt
@@ -10,3 +10,5 @@ work in progress -- Milestone 0.9.8
*[#153] local file dir copy/move
* [#316] feedback on tree node expansion
*[#313] info not synchronizing on tree select
+*[#315] delete nodes in ll, refresh issue?
+
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
index a73e12b..66dbd55 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
@@ -32,9 +32,7 @@ import org.slf4j.LoggerFactory;
public class IRODSOutlineModel extends DefaultOutlineModel {
public static final org.slf4j.Logger log = LoggerFactory.getLogger(IRODSOutlineModel.class);
-
private final IRODSFileSystemModel treeModel;
-
private IDROPDesktop idrop;
public IRODSOutlineModel(IDROPDesktop idrop, TreeModel tm, TableModel tm1, boolean bln, String string) {
@@ -68,29 +66,22 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
@Override
public void run() {
- CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) ((IRODSNode) parent)
- .getUserObject();
+ CollectionAndDataObjectListingEntry deletedEntry = (CollectionAndDataObjectListingEntry) deletedNode.getUserObject();
+ CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) ((IRODSNode) parent).getUserObject();
IRODSTree stagingViewTree = idrop.getIrodsTree();
TreePath path;
+
try {
path = TreeUtils.buildTreePathForIrodsAbsolutePath(stagingViewTree,
entry.getFormattedAbsolutePath());
+
} catch (IdropException ex) {
Logger.getLogger(IRODSOutlineModel.class.getName()).log(Level.SEVERE, null, ex);
throw new IdropRuntimeException(ex);
}
-
- // thisModel.getTreePathSupport().removePath(path);
- parent.remove(deletedNode);
-
- // parent.forceReloadOfChildrenOfThisNode();
- // treeModel.nodeChanged(deletedNode);
- // treeModel.nodeChanged(parent);
-
- // treeModel.nodeChanged(parent);
-
- // stagingViewTree.highlightPath(path);
-
+
+ thisModel.treeModel.removeNodeFromParent(deletedNode);
+
}
});
}
@@ -134,8 +125,7 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
return;
}
IRODSNode irodsNode = (IRODSNode) currentPath.getLastPathComponent();
- CollectionAndDataObjectListingEntry lastPathNodeEntry = (CollectionAndDataObjectListingEntry) irodsNode
- .getUserObject();
+ CollectionAndDataObjectListingEntry lastPathNodeEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
if (irodsFileAbsolutePath.equals(lastPathNodeEntry.getFormattedAbsolutePath())) {
log.info("path already exists, do not double-add");
return;
@@ -180,8 +170,7 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
newEntry.setPathOrName(addedFile.getName());
}
- IRODSNode newNode = new IRODSNode(newEntry, idrop.getiDropCore().getIrodsAccount(), idrop
- .getiDropCore().getIrodsFileSystem(), irodsTree);
+ IRODSNode newNode = new IRODSNode(newEntry, idrop.getiDropCore().getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem(), irodsTree);
((IRODSNode) parentPath.getLastPathComponent()).add(newNode);
irodsTree.highlightPath(parentPath);
} catch (JargonException ex) {