summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorMike Conway <michael.c.conway@gmail.com>2011-10-10 15:02:30 (GMT)
committer Mike Conway <michael.c.conway@gmail.com>2011-10-10 15:02:30 (GMT)
commite27f53421078176aeb0c36729fe1dd2a97edcb88 (patch)
treeffe98dab9eecb6f39748f0c44ce145246d47c570 /idrop-swing
parent374cb9f90d61ed510e4c3c64b9a4128d709035a8 (diff)
downloadQCG-Data-e27f53421078176aeb0c36729fe1dd2a97edcb88.zip
QCG-Data-e27f53421078176aeb0c36729fe1dd2a97edcb88.tar.gz
QCG-Data-e27f53421078176aeb0c36729fe1dd2a97edcb88.tar.bz2
[#314] in login preset mode, drag of top level folder for get oper results in no data found warning
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/release_notes.txt2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java63
-rw-r--r--idrop-swing/src/main/resources/idrop.properties2
-rw-r--r--idrop-swing/src/main/resources/log4j.properties2
5 files changed, 33 insertions, 38 deletions
diff --git a/idrop-swing/release_notes.txt b/idrop-swing/release_notes.txt
index 9185740..162cb10 100644
--- a/idrop-swing/release_notes.txt
+++ b/idrop-swing/release_notes.txt
@@ -117,6 +117,8 @@ iRODS iDrop > idrop-swing does not get irods file list 2011-04-18 09:21:37
iRODS iDrop > -511017 on copy
+ [#314] in login preset mode, drag of top level folder for get oper results in no data found warning
+
==Features==
iRODS iDrop > refresh remote tree after transfer completes - if queue is small/empty 2011-02-10 07:00:51
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
index 57accc5..a8dd05b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
@@ -953,9 +953,11 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
sb.append("home");
root.setParentPath(sb.toString());
root.setPathOrName(getIrodsAccount().getHomeDirectory());
+ root.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.COLLECTION);
} else {
log.info("using root path, no login preset");
root.setPathOrName("/");
+ root.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.COLLECTION);
}
IRODSOutlineModel mdl = null;
log.info("building new iRODS tree");
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java
index c5727eb..543eece 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java
@@ -21,6 +21,7 @@ import javax.swing.tree.TreeSelectionModel;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.io.IRODSFile;
+import org.irods.jargon.core.pub.io.IRODSFileFactory;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.idrop.desktop.systraygui.MoveOrCopyiRODSDialog;
import org.irods.jargon.idrop.desktop.systraygui.iDrop;
@@ -150,14 +151,7 @@ public class IRODSTreeTransferHandler extends TransferHandler {
@Override
public void exportDone(final JComponent comp, final Transferable trans,
final int action) {
- /*
- * test code for drag to native, please leave in place MC DropTarget dt
- * = comp.getDropTarget(); log.debug("dt is:{}", dt); FlavorMap
- * dtFlavorMap = dt.getFlavorMap(); log.debug("flavormap:{}",
- * dtFlavorMap); Component dropTargetComponent = dt.getComponent();
- * log.debug("dt component:{}", dropTargetComponent); if (action !=
- * MOVE) { // return; }
- */
+ // no action
}
/**
@@ -179,41 +173,38 @@ public class IRODSTreeTransferHandler extends TransferHandler {
log.debug("selected rows for delete:{}", rows);
List<IRODSNode> nodesToTransfer = new ArrayList<IRODSNode>();
- for (int row : rows) {
- nodesToTransfer.add((IRODSNode) idropGui.getIrodsTree().getValueAt(
- row, 0));
- }
- IRODSFileService irodsFileService;
try {
- irodsFileService = new IRODSFileService(idropGui.getIrodsAccount(),
- idropGui.getiDropCore().getIrodsFileSystem());
- } catch (IdropException ex) {
- Logger.getLogger(IRODSTreeTransferHandler.class.getName()).log(
- Level.SEVERE, null, ex);
- throw new IdropRuntimeException(ex);
- }
- String objectPath;
- for (IRODSNode nodeToTransfer : nodesToTransfer) {
- CollectionAndDataObjectListingEntry listingEntry = (CollectionAndDataObjectListingEntry) nodeToTransfer.getUserObject();
- if (listingEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.COLLECTION) {
- objectPath = listingEntry.getPathOrName();
- } else {
- objectPath = listingEntry.getParentPath() + "/"
- + listingEntry.getPathOrName();
+ for (int row : rows) {
+ nodesToTransfer.add((IRODSNode) idropGui.getIrodsTree().getValueAt(
+ row, 0));
}
- try {
- transferFiles.add((File) irodsFileService.getIRODSFileForPath(objectPath));
- } catch (IdropException ex) {
- Logger.getLogger(IRODSTreeTransferHandler.class.getName()).log(
- Level.SEVERE, null, ex);
- throw new IdropRuntimeException(ex);
+ IRODSFileFactory irodsFileFactory = this.idropGui.getiDropCore().getIRODSFileFactoryForLoggedInAccount();
+
+ String objectPath;
+ for (IRODSNode nodeToTransfer : nodesToTransfer) {
+ CollectionAndDataObjectListingEntry listingEntry = (CollectionAndDataObjectListingEntry) nodeToTransfer.getUserObject();
+ if (listingEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.COLLECTION) {
+ objectPath = listingEntry.getPathOrName();
+ } else {
+ objectPath = listingEntry.getParentPath() + "/"
+ + listingEntry.getPathOrName();
+ }
+
+ transferFiles.add((File) irodsFileFactory.instanceIRODSFile(objectPath));
+
}
- }
- return new IRODSTreeTransferable(transferFiles, stagingViewTree);
+ return new IRODSTreeTransferable(transferFiles, stagingViewTree);
+ } catch (Exception ex) {
+ Logger.getLogger(IRODSTreeTransferHandler.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropRuntimeException(ex);
+ } finally {
+ this.idropGui.getiDropCore().closeIRODSConnectionForLoggedInAccount();
+ }
}
diff --git a/idrop-swing/src/main/resources/idrop.properties b/idrop-swing/src/main/resources/idrop.properties
index f8dc221..2f7567c 100644
--- a/idrop-swing/src/main/resources/idrop.properties
+++ b/idrop-swing/src/main/resources/idrop.properties
@@ -1,5 +1,5 @@
policy.aware=false
-login.preset=false
+login.preset=true
force.mode=false
force.no.synch=false
advanced.view=true
diff --git a/idrop-swing/src/main/resources/log4j.properties b/idrop-swing/src/main/resources/log4j.properties
index eb27e27..260b46d 100644
--- a/idrop-swing/src/main/resources/log4j.properties
+++ b/idrop-swing/src/main/resources/log4j.properties
@@ -1,7 +1,7 @@
# Set root logger level to DEBUG and its only appender to A1.
#log4j.rootCategory=WARN, A1
log4j.category.org.irods.jargon.idrop=INFO, A1
-log4j.category.org.irods.jargon.core= INFO, A1
+log4j.category.org.irods.jargon.core= DEBUG, A1
log4j.categor.org.irods.jargon.usertagging=ERROR,A1
log4j.category.org.irods.jargon.transfer=WARN, A1
log4j.category.org.irods.jargon.datautils=WARN, A1