From c86ab83bba7795403311fba27cefe8dc7b40036a Mon Sep 17 00:00:00 2001 From: Hades Date: Fri, 23 Nov 2018 15:59:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-12877=20=E9=80=89=E4=B8=AD=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E6=9D=BF=EF=BC=8C=E7=82=B9=E5=87=BB=E5=88=A0?= =?UTF-8?q?=E9=99=A4=EF=BC=8C=E6=8F=90=E7=A4=BA=E6=B2=A1=E6=9C=89=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/file/TemplateTreePane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index 7f2fcd2cf..88f4ee262 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -20,9 +20,14 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; +import com.fr.stable.script.CalculatorProvider; +import com.fr.stable.web.BrowserProvider; +import com.fr.stable.web.Device; +import com.fr.stable.web.Repository; import com.fr.workspace.WorkContext; import com.fr.workspace.server.lock.TplOperator; +import javax.servlet.http.HttpServletRequest; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.ToolTipManager; @@ -43,6 +48,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Enumeration; +import java.util.Map; import static javax.swing.JOptionPane.WARNING_MESSAGE; import static javax.swing.JOptionPane.YES_NO_OPTION; @@ -377,7 +383,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { TreePath[] selectedTreePaths = reportletsTree.getSelectionPaths(); - if (selectedTreePaths == null || selectedTreePaths.length != 1) { + if (selectedTreePaths == null || selectedTreePaths.length == 0) { return false; } // 选中的是文件夹 From 9a240682a50545c17a19cfed21e54d6baf77d59d Mon Sep 17 00:00:00 2001 From: Hades Date: Fri, 23 Nov 2018 16:02:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-12877=20=E9=80=89=E4=B8=AD=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E6=9D=BF=EF=BC=8C=E7=82=B9=E5=87=BB=E5=88=A0?= =?UTF-8?q?=E9=99=A4=EF=BC=8C=E6=8F=90=E7=A4=BA=E6=B2=A1=E6=9C=89=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/TemplateTreePane.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index 88f4ee262..fe23ac416 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -20,14 +20,9 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; -import com.fr.stable.script.CalculatorProvider; -import com.fr.stable.web.BrowserProvider; -import com.fr.stable.web.Device; -import com.fr.stable.web.Repository; import com.fr.workspace.WorkContext; import com.fr.workspace.server.lock.TplOperator; -import javax.servlet.http.HttpServletRequest; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.ToolTipManager; @@ -48,7 +43,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Enumeration; -import java.util.Map; import static javax.swing.JOptionPane.WARNING_MESSAGE; import static javax.swing.JOptionPane.YES_NO_OPTION; From 79b8564360ff0788cd0f1b731ccd511b2783838e Mon Sep 17 00:00:00 2001 From: Hades Date: Fri, 23 Nov 2018 16:06:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/TemplateTreePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index fe23ac416..11f0daf63 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -17,6 +17,7 @@ import com.fr.file.filetree.IOFileNodeFilter; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; +import com.fr.stable.ArrayUtils; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; @@ -377,7 +378,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { TreePath[] selectedTreePaths = reportletsTree.getSelectionPaths(); - if (selectedTreePaths == null || selectedTreePaths.length == 0) { + if (selectedTreePaths == null || ArrayUtils.isEmpty(selectedTreePaths)) { return false; } // 选中的是文件夹 From 2dbbe0cdc1d1a108c9fad0e0544c7111a462717c Mon Sep 17 00:00:00 2001 From: Hades Date: Fri, 23 Nov 2018 16:17:56 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/TemplateTreePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index 11f0daf63..ed63b06ce 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -378,7 +378,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { TreePath[] selectedTreePaths = reportletsTree.getSelectionPaths(); - if (selectedTreePaths == null || ArrayUtils.isEmpty(selectedTreePaths)) { + if (ArrayUtils.isEmpty(selectedTreePaths)) { return false; } // 选中的是文件夹