summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-06-04 02:38:54 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-06-04 02:38:54 (GMT)
commit6cd1fb0e3751676b0a3ac25f38f5d73e230b85f2 (patch)
tree3d393a1fd2dd5465c3b8644e6c039b374630cf6b
parent379c8df2edec4547148d04ed068242b075dfb8eb (diff)
downloadQCG-Data-6cd1fb0e3751676b0a3ac25f38f5d73e230b85f2.zip
QCG-Data-6cd1fb0e3751676b0a3ac25f38f5d73e230b85f2.tar.gz
QCG-Data-6cd1fb0e3751676b0a3ac25f38f5d73e230b85f2.tar.bz2
[#1441] actions from diff dialog
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form183
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java415
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffTreeCustomRenderer.java26
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTreeTransferHandler.java3
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties8
6 files changed, 491 insertions, 146 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form
index 4aa83fa..22bca1a 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.form
@@ -216,44 +216,6 @@
</Constraint>
</Constraints>
</Component>
- <Component class="javax.swing.JButton" name="btnResolveGet">
- <Properties>
- <Property name="mnemonic" type="int" value="103"/>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolveGet.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolveGet.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResolveGetActionPerformed"/>
- </Events>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="3" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
- </Constraint>
- </Constraints>
- </Component>
- <Component class="javax.swing.JButton" name="btnResolvePut">
- <Properties>
- <Property name="mnemonic" type="int" value="112"/>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolvePut.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolvePut.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResolvePutActionPerformed"/>
- </Events>
- <Constraints>
- <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="1" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="3" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
- </Constraint>
- </Constraints>
- </Component>
<Component class="javax.swing.JLabel" name="lblIrodsSelectedPathLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
@@ -302,6 +264,151 @@
</Constraint>
</Constraints>
</Component>
+ <Container class="javax.swing.JPanel" name="pnlFileDiffDetails">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="6" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnResolveGet">
+ <Properties>
+ <Property name="mnemonic" type="int" value="103"/>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolveGet.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolveGet.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResolveGetActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="3" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnResolvePut">
+ <Properties>
+ <Property name="mnemonic" type="int" value="112"/>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolvePut.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.btnResolvePut.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnResolvePutActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="3" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblLocalFileLengthLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblLocalFileLengthLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="3" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblLocalFileLength">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblLocalFileLength.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblIrodsFileLengthLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblIrodsFileLengthLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblIrodsFileLength">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblIrodsFileLength.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="3" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblLocalFileChecksumLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblLocalFileChecksumLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblLocalFileChecksum">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblLocalFileChecksum.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblIrodsFileChecksumLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblIrodsFileChecksumLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblIrodsFileChecksum">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="DiffViewDialog.lblIrodsFileChecksum.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="3" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
</SubComponents>
</Container>
</SubComponents>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java
index 92bcd79..8f5ed3a 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/DiffViewDialog.java
@@ -36,6 +36,7 @@ public class DiffViewDialog extends javax.swing.JDialog {
public DiffViewDialog(final iDrop parent, final boolean modal, final DiffViewData diffViewData) {
super(parent, modal);
initComponents();
+ pnlSelectionInfo.setVisible(false);
btnResolve.setVisible(false);
btnResolveGet.setVisible(false);
btnResolvePut.setVisible(false);
@@ -70,12 +71,21 @@ public class DiffViewDialog extends javax.swing.JDialog {
lblDescriptionOfDiffInfo = new javax.swing.JLabel();
btnResolve = new javax.swing.JButton();
lblSuggestedResolution = new javax.swing.JLabel();
- btnResolveGet = new javax.swing.JButton();
- btnResolvePut = new javax.swing.JButton();
lblIrodsSelectedPathLabel = new javax.swing.JLabel();
lblIrodsSelectedPath = new javax.swing.JLabel();
lblTypeLabel = new javax.swing.JLabel();
lblType = new javax.swing.JLabel();
+ pnlFileDiffDetails = new javax.swing.JPanel();
+ btnResolveGet = new javax.swing.JButton();
+ btnResolvePut = new javax.swing.JButton();
+ lblLocalFileLengthLbl = new javax.swing.JLabel();
+ lblLocalFileLength = new javax.swing.JLabel();
+ lblIrodsFileLengthLbl = new javax.swing.JLabel();
+ lblIrodsFileLength = new javax.swing.JLabel();
+ lblLocalFileChecksumLbl = new javax.swing.JLabel();
+ lblLocalFileChecksum = new javax.swing.JLabel();
+ lblIrodsFileChecksumLbl = new javax.swing.JLabel();
+ lblIrodsFileChecksum = new javax.swing.JLabel();
pnlBottom = new javax.swing.JPanel();
pnlUploadDownloadButtons = new javax.swing.JPanel();
btnOK = new javax.swing.JButton();
@@ -189,6 +199,38 @@ public class DiffViewDialog extends javax.swing.JDialog {
gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
pnlSelectionInfo.add(lblSuggestedResolution, gridBagConstraints);
+ lblIrodsSelectedPathLabel.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsSelectedPathLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
+ pnlSelectionInfo.add(lblIrodsSelectedPathLabel, gridBagConstraints);
+
+ lblIrodsSelectedPath.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsSelectedPath.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlSelectionInfo.add(lblIrodsSelectedPath, gridBagConstraints);
+
+ lblTypeLabel.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblTypeLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlSelectionInfo.add(lblTypeLabel, gridBagConstraints);
+
+ lblType.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblType.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlSelectionInfo.add(lblType, gridBagConstraints);
+
+ pnlFileDiffDetails.setLayout(new java.awt.GridBagLayout());
+
btnResolveGet.setMnemonic('g');
btnResolveGet.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.btnResolveGet.text")); // NOI18N
btnResolveGet.setToolTipText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.btnResolveGet.toolTipText")); // NOI18N
@@ -201,7 +243,7 @@ public class DiffViewDialog extends javax.swing.JDialog {
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 6;
gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
- pnlSelectionInfo.add(btnResolveGet, gridBagConstraints);
+ pnlFileDiffDetails.add(btnResolveGet, gridBagConstraints);
btnResolvePut.setMnemonic('p');
btnResolvePut.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.btnResolvePut.text")); // NOI18N
@@ -215,37 +257,67 @@ public class DiffViewDialog extends javax.swing.JDialog {
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 6;
gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
- pnlSelectionInfo.add(btnResolvePut, gridBagConstraints);
+ pnlFileDiffDetails.add(btnResolvePut, gridBagConstraints);
- lblIrodsSelectedPathLabel.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsSelectedPathLabel.text")); // NOI18N
+ lblLocalFileLengthLbl.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblLocalFileLengthLbl.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0);
- pnlSelectionInfo.add(lblIrodsSelectedPathLabel, gridBagConstraints);
+ pnlFileDiffDetails.add(lblLocalFileLengthLbl, gridBagConstraints);
- lblIrodsSelectedPath.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsSelectedPath.text")); // NOI18N
+ lblLocalFileLength.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblLocalFileLength.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlSelectionInfo.add(lblIrodsSelectedPath, gridBagConstraints);
+ pnlFileDiffDetails.add(lblLocalFileLength, gridBagConstraints);
- lblTypeLabel.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblTypeLabel.text")); // NOI18N
+ lblIrodsFileLengthLbl.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsFileLengthLbl.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlSelectionInfo.add(lblTypeLabel, gridBagConstraints);
+ pnlFileDiffDetails.add(lblIrodsFileLengthLbl, gridBagConstraints);
- lblType.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblType.text")); // NOI18N
+ lblIrodsFileLength.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsFileLength.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlSelectionInfo.add(lblType, gridBagConstraints);
+ pnlFileDiffDetails.add(lblIrodsFileLength, gridBagConstraints);
+
+ lblLocalFileChecksumLbl.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblLocalFileChecksumLbl.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlFileDiffDetails.add(lblLocalFileChecksumLbl, gridBagConstraints);
+
+ lblLocalFileChecksum.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblLocalFileChecksum.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlFileDiffDetails.add(lblLocalFileChecksum, gridBagConstraints);
+
+ lblIrodsFileChecksumLbl.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsFileChecksumLbl.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlFileDiffDetails.add(lblIrodsFileChecksumLbl, gridBagConstraints);
+
+ lblIrodsFileChecksum.setText(org.openide.util.NbBundle.getMessage(DiffViewDialog.class, "DiffViewDialog.lblIrodsFileChecksum.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 3;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlFileDiffDetails.add(lblIrodsFileChecksum, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ pnlSelectionInfo.add(pnlFileDiffDetails, gridBagConstraints);
pnlCenter.add(pnlSelectionInfo, java.awt.BorderLayout.SOUTH);
@@ -294,11 +366,68 @@ public class DiffViewDialog extends javax.swing.JDialog {
}//GEN-LAST:event_treeDiffValueChanged
private void btnResolveGetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResolveGetActionPerformed
- // TODO add your handling code here:
+
+ log.info("btnResolveGetActionPerformed()");
+ FileTreeNode node = (FileTreeNode) treeDiff.getLastSelectedPathComponent();
+ log.info("selected node:{}", node);
+ FileTreeDiffEntry entry = (FileTreeDiffEntry) node.getUserObject();
+
+ log.info("entry:{}", entry);
+
+ // the diff shows the full computed path, you want to use the parent name for the target so that /x/y doesnt get put to x/y/y
+ CollectionAndPath collectionAndPath = MiscIRODSUtils.separateCollectionAndPathFromGivenAbsolutePath(entry.getAbsPathOppositeFile());
+
+ try {
+ idropGui.getiDropCore()
+ .getTransferManager()
+ .enqueueAGet(
+ entry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath(),
+ collectionAndPath.getCollectionParent(),
+ idropGui.getIrodsAccount().getDefaultStorageResource(), idropGui.getIrodsAccount());
+ entry.setResolved(true);
+ setDiffTypeDescriptionBasedOnNode(entry);
+
+ } catch (JargonException ex) {
+ log.error("error enquing get", ex);
+ MessageUtil
+ .showWarning(
+ this,
+ ex.getMessage(),
+ "");
+ }
}//GEN-LAST:event_btnResolveGetActionPerformed
private void btnResolvePutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResolvePutActionPerformed
- // TODO add your handling code here:
+
+ log.info("btnResolvePutActionPerformed()");
+ FileTreeNode node = (FileTreeNode) treeDiff.getLastSelectedPathComponent();
+ log.info("selected node:{}", node);
+ FileTreeDiffEntry entry = (FileTreeDiffEntry) node.getUserObject();
+
+ log.info("entry:{}", entry);
+
+ // the diff shows the full computed path, you want to use the parent name for the target so that /x/y doesnt get put to x/y/y
+ CollectionAndPath collectionAndPath = MiscIRODSUtils.separateCollectionAndPathFromGivenAbsolutePath(entry.getAbsPathOppositeFile());
+
+ try {
+ idropGui.getiDropCore()
+ .getTransferManager()
+ .enqueueAPut(
+ entry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath(),
+ collectionAndPath.getCollectionParent(),
+ idropGui.getIrodsAccount().getDefaultStorageResource(),
+ idropGui.getIrodsAccount());
+ entry.setResolved(true);
+ setDiffTypeDescriptionBasedOnNode(entry);
+
+ } catch (JargonException ex) {
+ log.error("error enquing put", ex);
+ MessageUtil
+ .showWarning(
+ this,
+ ex.getMessage(),
+ "");
+ }
}//GEN-LAST:event_btnResolvePutActionPerformed
private void btnResolveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResolveActionPerformed
@@ -312,11 +441,11 @@ public class DiffViewDialog extends javax.swing.JDialog {
if (entry.getDiffType() == DiffType.LEFT_HAND_PLUS) {
log.info("schedule a put");
-
+
// the diff shows the full computed path, you want to use the parent name for the target so that /x/y doesnt get put to x/y/y
CollectionAndPath collectionAndPath = MiscIRODSUtils.separateCollectionAndPathFromGivenAbsolutePath(entry.getAbsPathOppositeFile());
-
-
+
+
try {
idropGui.getiDropCore()
.getTransferManager()
@@ -325,8 +454,10 @@ public class DiffViewDialog extends javax.swing.JDialog {
collectionAndPath.getCollectionParent(),
idropGui.getIrodsAccount().getDefaultStorageResource(),
idropGui.getIrodsAccount());
+ entry.setResolved(true);
+ setDiffTypeDescriptionBasedOnNode(entry);
} catch (JargonException ex) {
- log.error("error checking is strict, warn and set to false");
+ log.error("error enquing put", ex);
MessageUtil
.showWarning(
this,
@@ -334,9 +465,34 @@ public class DiffViewDialog extends javax.swing.JDialog {
"");
}
+ } else if (entry.getDiffType() == DiffType.RIGHT_HAND_PLUS) {
+ log.info("schedule a get");
+
+ // the diff shows the full computed path, you want to use the parent name for the target so that /x/y doesnt get put to x/y/y
+ CollectionAndPath collectionAndPath = MiscIRODSUtils.separateCollectionAndPathFromGivenAbsolutePath(entry.getAbsPathOppositeFile());
+
+ try {
+ idropGui.getiDropCore()
+ .getTransferManager()
+ .enqueueAGet(
+ entry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath(),
+ collectionAndPath.getCollectionParent(),
+ idropGui.getIrodsAccount().getDefaultStorageResource(), idropGui.getIrodsAccount());
+ entry.setResolved(true);
+ setDiffTypeDescriptionBasedOnNode(entry);
+
+ } catch (JargonException ex) {
+ log.error("error enquing get", ex);
+ MessageUtil
+ .showWarning(
+ this,
+ ex.getMessage(),
+ "");
+ }
}
+
}//GEN-LAST:event_btnResolveActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnOK;
@@ -345,12 +501,20 @@ public class DiffViewDialog extends javax.swing.JDialog {
private javax.swing.JButton btnResolvePut;
private javax.swing.JLabel lblDescriptionOfDiffInfo;
private javax.swing.JLabel lblDiffResult;
+ private javax.swing.JLabel lblIrodsFileChecksum;
+ private javax.swing.JLabel lblIrodsFileChecksumLbl;
+ private javax.swing.JLabel lblIrodsFileLength;
+ private javax.swing.JLabel lblIrodsFileLengthLbl;
private javax.swing.JLabel lblIrodsPath;
private javax.swing.JLabel lblIrodsPathLabel;
private javax.swing.JLabel lblIrodsSelectedPath;
private javax.swing.JLabel lblIrodsSelectedPathLabel;
private javax.swing.JLabel lblLocalAbsPath;
private javax.swing.JLabel lblLocalAbsPathLabel;
+ private javax.swing.JLabel lblLocalFileChecksum;
+ private javax.swing.JLabel lblLocalFileChecksumLbl;
+ private javax.swing.JLabel lblLocalFileLength;
+ private javax.swing.JLabel lblLocalFileLengthLbl;
private javax.swing.JLabel lblLocalSelectedPath;
private javax.swing.JLabel lblSelectedPathLabel;
private javax.swing.JLabel lblSuggestedResolution;
@@ -358,6 +522,7 @@ public class DiffViewDialog extends javax.swing.JDialog {
private javax.swing.JLabel lblTypeLabel;
private javax.swing.JPanel pnlBottom;
private javax.swing.JPanel pnlCenter;
+ private javax.swing.JPanel pnlFileDiffDetails;
private javax.swing.JPanel pnlSelectionInfo;
private javax.swing.JPanel pnlTop;
private javax.swing.JPanel pnlUploadDownloadButtons;
@@ -369,13 +534,14 @@ public class DiffViewDialog extends javax.swing.JDialog {
* Initialize the components for the diff view
*/
private void initializeDiffView() {
- this.lblIrodsPath.setText(diffViewData.getIrodsAbsolutePath());
- this.lblLocalAbsPath.setText(diffViewData.getLocalAbsolutePath());
+ this.lblIrodsPath.setText(MiscIRODSUtils.abbreviateFileName(diffViewData.getIrodsAbsolutePath()));
+ this.lblIrodsPath.setToolTipText(diffViewData.getIrodsAbsolutePath());
+ this.lblLocalAbsPath.setText(MiscIRODSUtils.abbreviateFileName(diffViewData.getLocalAbsolutePath()));
+ this.lblLocalAbsPath.setToolTipText(diffViewData.getIrodsAbsolutePath());
DiffTreeCustomRenderer renderer = new DiffTreeCustomRenderer();
treeDiff.setCellRenderer(renderer);
ToolTipManager.sharedInstance().registerComponent(treeDiff);
treeDiff.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
-
}
public DiffViewData getDiffViewData() {
@@ -395,71 +561,134 @@ public class DiffViewDialog extends javax.swing.JDialog {
return;
}
- lblType.setText(diffEntry.getCollectionAndDataObjectListingEntry().getObjectType().name());
- StringBuilder sb = new StringBuilder();
-
- if (diffEntry.getDiffType() == DiffType.DIRECTORY_NO_DIFF) {
- sb.append("No diffs detected at this directory");
- if (diffEntry.getCountOfDiffsInChildren() > 0) {
- sb.append("...there are ");
- sb.append(diffEntry.getCountOfDiffsInChildren());
- sb.append(" diffs detected in children of this directory");
- lblDescriptionOfDiffInfo.setForeground(Color.BLUE);
- } else {
- lblDescriptionOfDiffInfo.setForeground(Color.BLACK);
- }
- btnResolve.setVisible(false);
- btnResolveGet.setVisible(false);
- btnResolvePut.setVisible(false);
- lblSuggestedResolution.setText("");
- lblDescriptionOfDiffInfo.setText(sb.toString());
- lblLocalSelectedPath.setText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
- lblIrodsSelectedPath.setText(diffEntry.getAbsPathOppositeFile());
-
- } else if (diffEntry.getDiffType() == DiffType.FILE_NAME_DIR_NAME_COLLISION) {
- lblDescriptionOfDiffInfo.setForeground(Color.RED);
- lblDescriptionOfDiffInfo.setText("A data object name collided with a collection name");
- lblSuggestedResolution.setText("This diff must be manually managed using the iDrop GUI");
- btnResolve.setVisible(false);
- btnResolveGet.setVisible(false);
- btnResolvePut.setVisible(false);
- lblLocalSelectedPath.setText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
- lblIrodsSelectedPath.setText(diffEntry.getAbsPathOppositeFile());
- } else if (diffEntry.getDiffType() == DiffType.FILE_OUT_OF_SYNCH) {
- lblDescriptionOfDiffInfo.setForeground(Color.RED);
- lblDescriptionOfDiffInfo.setText("A file is out of synch");
- lblSuggestedResolution.setText("This file may be either uploaded or downloaded, overwriting the existing data");
- btnResolve.setVisible(false);
- btnResolveGet.setVisible(true);
- btnResolvePut.setVisible(true);
- } else if (diffEntry.getDiffType() == DiffType.LEFT_HAND_PLUS) {
- lblDescriptionOfDiffInfo.setForeground(Color.RED);
- lblDescriptionOfDiffInfo.setText("The local file or collection does not exist in iRODS");
- lblSuggestedResolution.setText("Selecting the file or collection will upload to iRODS");
- btnResolve.setVisible(true);
- btnResolveGet.setVisible(false);
- btnResolvePut.setVisible(false);
- lblLocalSelectedPath.setText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
- lblIrodsSelectedPath.setText(diffEntry.getAbsPathOppositeFile());
- } else if (diffEntry.getDiffType() == DiffType.RIGHT_HAND_PLUS) {
- lblDescriptionOfDiffInfo.setForeground(Color.RED);
- lblDescriptionOfDiffInfo.setText("The iRODS file or collection does not exist in the local directory");
- lblSuggestedResolution.setText("Selecting the file or collection will download from iRODS");
- btnResolve.setVisible(true);
- btnResolveGet.setVisible(false);
- btnResolvePut.setVisible(false);
- lblLocalSelectedPath.setText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
- lblIrodsSelectedPath.setText(diffEntry.getAbsPathOppositeFile());
- } else {
- lblDescriptionOfDiffInfo.setForeground(Color.RED);
- lblDescriptionOfDiffInfo.setText(diffEntry.getDiffType().toString());
- lblSuggestedResolution.setText("Diff must be manually resolved");
- btnResolve.setVisible(false);
- btnResolveGet.setVisible(false);
- btnResolvePut.setVisible(false);
- lblLocalSelectedPath.setText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
- lblIrodsSelectedPath.setText(diffEntry.getAbsPathOppositeFile());
- }
+ final DiffViewDialog thisGui = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ thisGui.pnlSelectionInfo.setVisible(true);
+ lblType.setText(diffEntry.getCollectionAndDataObjectListingEntry().getObjectType().name());
+ StringBuilder sb = new StringBuilder();
+
+
+ if (diffEntry.isCountAsDiff() && diffEntry.isResolved()) {
+ lblDescriptionOfDiffInfo.setForeground(Color.BLUE);
+ sb.append("Diffs were resolved by user action");
+
+ btnResolve.setVisible(false);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblSuggestedResolution.setText("");
+ lblDescriptionOfDiffInfo.setText(sb.toString());
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ pnlFileDiffDetails.setVisible(false);
+ } else if (diffEntry.getDiffType() == DiffType.DIRECTORY_NO_DIFF) {
+ lblDescriptionOfDiffInfo.setForeground(Color.BLUE);
+ sb.append("No diffs detected at this directory");
+ if (diffEntry.getCountOfDiffsInChildren() > 0) {
+ sb.append("...there are ");
+ sb.append(diffEntry.getCountOfDiffsInChildren());
+ sb.append(" diffs detected in children of this directory");
+ }
+
+ btnResolve.setVisible(false);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblSuggestedResolution.setText("");
+ lblDescriptionOfDiffInfo.setText(sb.toString());
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ pnlFileDiffDetails.setVisible(false);
+
+ } else if (diffEntry.getDiffType() == DiffType.FILE_NAME_DIR_NAME_COLLISION) {
+ lblDescriptionOfDiffInfo.setForeground(Color.RED);
+ lblDescriptionOfDiffInfo.setText("A data object name collided with a collection name");
+ lblSuggestedResolution.setText("This diff must be manually managed using the iDrop GUI");
+ btnResolve.setVisible(false);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ pnlFileDiffDetails.setVisible(false);
+
+ } else if (diffEntry.getDiffType() == DiffType.FILE_OUT_OF_SYNCH) {
+ lblDescriptionOfDiffInfo.setForeground(Color.RED);
+ lblDescriptionOfDiffInfo.setText("A file is out of synch");
+ lblSuggestedResolution.setText("This file may be either uploaded or downloaded, overwriting the existing data");
+ btnResolve.setVisible(false);
+ btnResolveGet.setVisible(true);
+ btnResolvePut.setVisible(true);
+ pnlFileDiffDetails.setVisible(true);
+ lblIrodsFileLength.setText(String.valueOf(diffEntry.getLengthOppositeFile()));
+ lblLocalFileLength.setText(String.valueOf(diffEntry.getCollectionAndDataObjectListingEntry().getDataSize()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+
+ if (diffEntry.getChecksumOppositeFile().isEmpty()) {
+ lblIrodsFileChecksum.setVisible(false);
+ lblIrodsFileChecksumLbl.setVisible(false);
+ lblLocalFileChecksum.setVisible(false);
+ lblLocalFileChecksumLbl.setVisible(false);
+ } else {
+ lblIrodsFileChecksum.setVisible(true);
+ lblIrodsFileChecksumLbl.setVisible(true);
+ lblLocalFileChecksum.setVisible(true);
+ lblLocalFileChecksumLbl.setVisible(true);
+ lblIrodsFileChecksum.setText(diffEntry.getChecksumOppositeFile());
+ lblLocalFileChecksum.setText(String.valueOf(diffEntry.getChecksumThisFile()));
+ }
+
+ } else if (diffEntry.getDiffType() == DiffType.LEFT_HAND_PLUS) {
+ lblDescriptionOfDiffInfo.setForeground(Color.RED);
+ lblDescriptionOfDiffInfo.setText("The local file or collection does not exist in iRODS");
+ lblSuggestedResolution.setText("Selecting the file or collection will upload to iRODS");
+ btnResolve.setVisible(true);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ pnlFileDiffDetails.setVisible(false);
+
+ } else if (diffEntry.getDiffType() == DiffType.RIGHT_HAND_PLUS) {
+ lblDescriptionOfDiffInfo.setForeground(Color.RED);
+ lblDescriptionOfDiffInfo.setText("The iRODS file or collection does not exist in the local directory");
+ lblSuggestedResolution.setText("Selecting the file or collection will download from iRODS");
+ btnResolve.setVisible(true);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ pnlFileDiffDetails.setVisible(false);
+
+ } else {
+ lblDescriptionOfDiffInfo.setForeground(Color.RED);
+ lblDescriptionOfDiffInfo.setText(diffEntry.getDiffType().toString());
+ lblSuggestedResolution.setText("Diff must be manually resolved");
+ btnResolve.setVisible(false);
+ btnResolveGet.setVisible(false);
+ btnResolvePut.setVisible(false);
+ lblLocalSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath()));
+ lblIrodsSelectedPath.setText(MiscIRODSUtils.abbreviateFileName(diffEntry.getAbsPathOppositeFile()));
+ lblLocalSelectedPath.setToolTipText(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
+ lblIrodsSelectedPath.setToolTipText(diffEntry.getAbsPathOppositeFile());
+ }
+
+
+ }
+ });
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
index 79524d2..42b28bb 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
@@ -1,5 +1,5 @@
package org.irods.jargon.idrop.desktop.systraygui.utils;
public final class Version {
public static String VERSION="2.0.1-SNAPSHOT";
- public static String BUILD_TIME="20130531-1101";
+ public static String BUILD_TIME="20130603-1956";
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffTreeCustomRenderer.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffTreeCustomRenderer.java
index 66cbbf2..5edcd69 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffTreeCustomRenderer.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/DiffTreeCustomRenderer.java
@@ -24,20 +24,23 @@ public class DiffTreeCustomRenderer extends DefaultTreeCellRenderer {
boolean leaf,
int row,
boolean hasFocus) {
-
+
FileTreeNode fileTreeNode = (FileTreeNode) value;
FileTreeDiffEntry diffEntry = (FileTreeDiffEntry) fileTreeNode.getUserObject();
StringBuilder sb = new StringBuilder();
sb.append(diffEntry.getCollectionAndDataObjectListingEntry().getNodeLabelDisplayValue());
-
- // Allow the original renderer to set up the label
+
+ // Allow the original renderer to set up the label
Component c = super.getTreeCellRendererComponent(
tree, value, selected,
expanded, diffEntry.getCollectionAndDataObjectListingEntry().isDataObject(), row,
hasFocus);
- if (diffEntry.isCountAsDiff()) {
+ if (diffEntry.isCountAsDiff() && diffEntry.isResolved()) {
+ c.setForeground(resolvedForeground);
+ sb.append(" : resolved thru user action");
+ } else if (diffEntry.isCountAsDiff()) {
c.setForeground(diffForeground);
sb.append(" : ");
sb.append(diffEntry.getDiffType());
@@ -49,24 +52,25 @@ public class DiffTreeCustomRenderer extends DefaultTreeCellRenderer {
//c.setName(sb.toString());
this.setText(sb.toString());
-
+
StringBuilder tt = new StringBuilder();
tt.append("<html>");
tt.append(diffEntry.getCollectionAndDataObjectListingEntry().getFormattedAbsolutePath());
if (diffEntry.isCountAsDiff()) {
tt.append("<br/><h3>there was a difference here:</h3>");
tt.append(diffEntry.getDiffType());
- } else if (!fileTreeNode.isLeaf()) {
- tt.append("<br/>there were ");
- tt.append(diffEntry.getCountOfDiffsInChildren());
- tt.append(" diffs in children nodes");
+ } else if (!fileTreeNode.isLeaf()) {
+ tt.append("<br/>there were ");
+ tt.append(diffEntry.getCountOfDiffsInChildren());
+ tt.append(" diffs in children nodes");
}
- tt.append("</html>");
-
+ tt.append("</html>");
+
this.setToolTipText(tt.toString());
return c;
}
private Color diffForeground = Color.RED;
private Color diffChildForeground = Color.BLUE;
+ private Color resolvedForeground = Color.BLACK;
}
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 91451db..debee98 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
@@ -36,9 +36,6 @@ import org.slf4j.LoggerFactory;
*/
public class IRODSTreeTransferHandler extends TransferHandler {
- /**
- *
- */
private static final long serialVersionUID = -6898535370470093766L;
@Override
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
index 2f78ea9..256d63c 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -338,3 +338,11 @@ DiffViewDialog.lblIrodsSelectedPathLabel.text=iRODS Path:
DiffViewDialog.lblIrodsSelectedPath.text=
DiffViewDialog.lblTypeLabel.text=Type:
DiffViewDialog.lblType.text=
+DiffViewDialog.lblLocalFileLengthLbl.text=Local File Length:
+DiffViewDialog.lblLocalFileLength.text=localFileLength
+DiffViewDialog.lblIrodsFileLengthLbl.text=iRODS File Length:
+DiffViewDialog.lblIrodsFileLength.text=iRODSFileLength
+DiffViewDialog.lblLocalFileChecksumLbl.text=Local File Checksum:
+DiffViewDialog.lblLocalFileChecksum.text=localfilechecksum
+DiffViewDialog.lblIrodsFileChecksumLbl.text=iRODS File Checksum:
+DiffViewDialog.lblIrodsFileChecksum.text=irodsfilechecksum