summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-07-01 14:16:06 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-07-01 14:16:06 (GMT)
commitf05bdb58275a0009d0bb393fc6e1ae3aa62b3d7a (patch)
tree7d9d6e10dca8e58baffa7daee1d1a94714f33893 /idrop-swing
parent0238e889c8dea3f5d48386f87dd1ae6c18c28582 (diff)
downloadQCG-Data-f05bdb58275a0009d0bb393fc6e1ae3aa62b3d7a.zip
QCG-Data-f05bdb58275a0009d0bb393fc6e1ae3aa62b3d7a.tar.gz
QCG-Data-f05bdb58275a0009d0bb393fc6e1ae3aa62b3d7a.tar.bz2
fix multiple file copy npe error
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java41
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java3
-rw-r--r--idrop-swing/todo.txt27
5 files changed, 25 insertions, 50 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
index 82c992b..9bbb448 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DeleteIRODSDialog.java
@@ -337,7 +337,7 @@ public class DeleteIRODSDialog extends javax.swing.JDialog {
throw new IdropRuntimeException(ex);
}
dialog.dispose();
- idrop.showMessageFromOperation(message);
+
}
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
index 5fa9e9f..4f8f5bd 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MoveOrCopyiRODSDialog.java
@@ -38,21 +38,13 @@ import org.slf4j.LoggerFactory;
public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
private final iDrop idrop;
-
private final IRODSTree stagingViewTree;
-
private final IRODSOutlineModel irodsFileSystemModel;
-
private final IRODSNode targetNode;
-
private final String targetAbsolutePath;
-
private final IRODSFile sourceFile;
-
private final List<IRODSFile> sourceFiles;
-
public static org.slf4j.Logger log = LoggerFactory.getLogger(MoveOrCopyiRODSDialog.class);
-
private final boolean isCopy;
public MoveOrCopyiRODSDialog(final iDrop parent, final boolean modal, final IRODSNode targetNode,
@@ -308,7 +300,6 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
private javax.swing.JTextArea txtNewLocation;
// End of variables declaration//GEN-END:variables
-
private void processMoveOrCopy() {
// add the new folder to irods, add to the tree, and scroll the tree into view
final MoveOrCopyiRODSDialog thisDialog = this;
@@ -323,8 +314,7 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
DataTransferOperations dataTransferOperations;
try {
- dataTransferOperations = idrop.getiDropCore().getIRODSAccessObjectFactory()
- .getDataTransferOperations(idrop.getIrodsAccount());
+ dataTransferOperations = idrop.getiDropCore().getIRODSAccessObjectFactory().getDataTransferOperations(idrop.getIrodsAccount());
} catch (Exception e) {
idrop.getiDropCore().closeIRODSConnection(idrop.getIrodsAccount());
thisDialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
@@ -356,10 +346,10 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
for (IRODSFile sourceFileEntry : sourceFiles) {
try {
if (isCopy) {
- processACopyOfAnIndividualFile(dataTransferOperations, sourceFile,
+ processACopyOfAnIndividualFile(dataTransferOperations, sourceFileEntry,
targetAbsolutePath);
} else {
- processAMoveOfAnIndividualFile(dataTransferOperations, sourceFile,
+ processAMoveOfAnIndividualFile(dataTransferOperations, sourceFileEntry,
targetAbsolutePath);
}
} catch (JargonFileOrCollAlreadyExistsException ex) {
@@ -377,10 +367,14 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
}
log.debug("move done");
- if (filesThatHadOverwriteError.isEmpty()) {
- idrop.showMessageFromOperation("irods move/copy processed");
+ if (!isCopy) {
+ if (filesThatHadOverwriteError.isEmpty()) {
+ idrop.showMessageFromOperation("irods move processed");
+ } else {
+ idrop.showMessageFromOperation("irods move processed, some files were not moved as files of the same name already existed");
+ }
} else {
- idrop.showMessageFromOperation("irods move/copy processed, some files were not moved as files of the same name already existed");
+ idrop.showMessageFromOperation("The file copy operation has been placed on the work queue");
}
thisDialog.dispose();
@@ -405,8 +399,7 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
log.debug("source file is a file, do a move");
dataTransferOperations.move(sourceFile.getAbsolutePath(), targetAbsolutePath);
- IRODSFile targetFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount()
- .instanceIRODSFile(targetAbsolutePath);
+ IRODSFile targetFile = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount().instanceIRODSFile(targetAbsolutePath);
String targetPathForNotify = null;
if (targetFile.isDirectory()) {
targetPathForNotify = targetFile.getAbsolutePath() + "/" + sourceFile.getName();
@@ -418,9 +411,8 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
} else {
log.debug("source file is a collection, reparent it");
- dataTransferOperations
- .moveTheSourceCollectionUnderneathTheTargetCollectionUsingSourceParentCollectionName(
- sourceFile.getAbsolutePath(), targetAbsolutePath);
+ dataTransferOperations.moveTheSourceCollectionUnderneathTheTargetCollectionUsingSourceParentCollectionName(
+ sourceFile.getAbsolutePath(), targetAbsolutePath);
irodsFileSystemModel.notifyFileShouldBeAdded(stagingViewTree, targetAbsolutePath);
}
} catch (JargonFileOrCollAlreadyExistsException fcae) {
@@ -442,10 +434,9 @@ public class MoveOrCopyiRODSDialog extends javax.swing.JDialog {
private void processACopyOfAnIndividualFile(DataTransferOperations dataTransferOperations, IRODSFile sourceFile,
String targetAbsolutePath) throws IdropException {
try {
- idrop.getiDropCore()
- .getTransferManager()
- .enqueueACopy(sourceFile.getAbsolutePath(), sourceFile.getResource(), targetAbsolutePath,
- idrop.getiDropCore().getIrodsAccount());
+ idrop.getiDropCore().getTransferManager().enqueueACopy(sourceFile.getAbsolutePath(), sourceFile.getResource(), targetAbsolutePath,
+ idrop.getiDropCore().getIrodsAccount());
+
} catch (JargonException ex) {
Logger.getLogger(MoveOrCopyiRODSDialog.class.getName()).log(Level.SEVERE, null, ex);
throw new IdropException("unable to copy file due to JargonException", ex);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
index bc1e690..40c7bf7 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/RenameIRODSDirectoryDialog.java
@@ -317,7 +317,7 @@ public class RenameIRODSDirectoryDialog extends javax.swing.JDialog {
irodsFileSystemModel.reload(targetParentNode);
stagingViewTree.expandPath(pathForNew);
- idrop.showMessageFromOperation("The rename was successful");
+ // idrop.showMessageFromOperation("The rename was successful");
} catch (IdropException ex) {
Logger.getLogger(RenameIRODSDirectoryDialog.class.getName()).log(Level.SEVERE, null, ex);
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 ca198de..ca9e899 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
@@ -84,10 +84,11 @@ public class IRODSOutlineModel extends DefaultOutlineModel {
//parent.forceReloadOfChildrenOfThisNode();
treeModel.nodeChanged(deletedNode);
+ treeModel.nodeChanged(parent);
//treeModel.nodeChanged(parent);
- stagingViewTree.highlightPath(path);
+ //stagingViewTree.highlightPath(path);
diff --git a/idrop-swing/todo.txt b/idrop-swing/todo.txt
index a7ab1e3..a07510c 100644
--- a/idrop-swing/todo.txt
+++ b/idrop-swing/todo.txt
@@ -1,24 +1,7 @@
-Startup sequence
-
-
-1) init components to build gui, create base iDrop core
-
-in iDrop startup
-
-2) add irodsFileSystem to iDrop Core
-
-3) start splash thread while building other iDrop UI
-
-in Splash thread
-
-4) add idropConfig to iDrop core
-
-5) show login dialog
-
-6) start db
-
-7) get current queue and indicate whether pause/run if enqueued
-
-
+ deleting:/lifelibZone/home/mconway/temp/IRODSFileTest/roger/george/enqueueAPutWhenPaused/testSubdirlvl1nbr0
+2011-07-01 08:48:27,935 89647 [SwingWorker-pool-1-thread-2] INFO org.irods.jargon.core.pub.io.IRODSFileImpl - cached path says dir
+2011-07-01 08:48:27,936 89648 [SwingWorker-pool-1-thread-2] INFO org.irods.jargon.core.connection.IRODSCommands - calling irods function with streams
+2011-07-01 08:48:27,936 89648 [SwingWorker-pool-1-thread-2] INFO org.irods.jargon.core.connection.IRODSCommands - reading message from irods
+2011-07-01 08:48:29,129 90841 [SwingWorker-pool-1-thread-2] INFO org.irods.jargon.core.pub.IRODSFileSystemAOImpl - deletion successful