From dfac0a32108c9e9fd68851d12386e9db023431c4 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 13 Sep 2024 15:13:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-133851=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E6=96=87=E4=BB=B6=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E4=B8=AD=E6=96=B0=E5=BB=BA=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/file/FILEChooserPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 8b6d645fb3..8ca9918274 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -172,6 +172,7 @@ public class FILEChooserPane extends BasicPane { protected boolean showEnv; protected boolean showLoc; protected boolean showWebReport = false; + protected boolean showMkdir = true; private UIDialog dialog; @@ -245,6 +246,7 @@ public class FILEChooserPane extends BasicPane { chooserPane.showEnv = true; chooserPane.showLoc = false; chooserPane.showWebReport = false; + chooserPane.showMkdir = false; // 替换掉 PlaceListModel chooserPane.setFileDataPlaceListModel(FileDataFILE.parseType(filter)); chooserPane.removeAllFilter(); @@ -338,6 +340,7 @@ public class FILEChooserPane extends BasicPane { mkdirButton = initMkdirButton(); locationPane.add(mkdirButton, BorderLayout.EAST); + mkdirButton.setEnabled(showMkdir); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); // Richie:placesList includes C,D,E,F and DeskTop etc. @@ -1229,7 +1232,7 @@ public class FILEChooserPane extends BasicPane { currentDirectory = dir; this.locationBtnPane.populate(currentDirectory); - this.mkdirButton.setEnabled(currentDirectory != null); + this.mkdirButton.setEnabled(currentDirectory != null && showMkdir); refreshSubFileListModel(); } @@ -1872,7 +1875,6 @@ public class FILEChooserPane extends BasicPane { private UIButton initMkdirButton() { UIButton folderButton = new UIButton(); folderButton.setIcon(new LazyIcon("new_folder")); - folderButton.setUI(new UIButtonUI()); folderButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Utils_New_Folder")); folderButton.addActionListener(new ActionListener() { @Override From 2634ecbde6314e5c5265576990e94652ce42927a Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 13 Sep 2024 15:19:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-132842=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E3=80=90=E6=95=B0=E6=8D=AE=E9=9B=86=E3=80=91?= =?UTF-8?q?fbp=E5=B7=A5=E7=A8=8B=20=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=EF=BC=8C=E4=BB=80=E4=B9=88=E9=83=BD=E4=B8=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/LocalConnectionSource.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java index cf3066f9eb..4b91320829 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java @@ -65,6 +65,12 @@ public class LocalConnectionSource extends BaseConnectionSource { ConnectionProcessorFactory.addConnection(bean); } catch (DriverNotFoundException e) { throw new DriverUnExistException(); + } catch (RuntimeException e) { + if (e.getCause() instanceof DriverNotFoundException) { + throw new DriverUnExistException(); + } else { + throw e; + } } } @@ -82,6 +88,12 @@ public class LocalConnectionSource extends BaseConnectionSource { ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean); } catch (DriverNotFoundException e) { throw new DriverUnExistException(); + } catch (RuntimeException e) { + if (e.getCause() instanceof DriverNotFoundException) { + throw new DriverUnExistException(); + } else { + throw e; + } } }