Browse Source

Pull request #14835: REPORT-133851 & REPORT-132842

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit 'fd68507f5499c2bb989c8583b8c0c97adb2d41b1':
  REPORT-132842 【fr-fbp回归】【数据集】fbp工程 新增数据连接,什么都不设置,直接保存失败
  REPORT-133851 【fr-fbp回归】文件数据集中新建文件夹
fbp/release
Destiny.Lin-林锦龙 3 months ago
parent
commit
208ec918ca
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java
  2. 6
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java

12
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); ConnectionProcessorFactory.addConnection(bean);
} catch (DriverNotFoundException e) { } catch (DriverNotFoundException e) {
throw new DriverUnExistException(); 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); ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean);
} catch (DriverNotFoundException e) { } catch (DriverNotFoundException e) {
throw new DriverUnExistException(); throw new DriverUnExistException();
} catch (RuntimeException e) {
if (e.getCause() instanceof DriverNotFoundException) {
throw new DriverUnExistException();
} else {
throw e;
}
} }
} }

6
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -172,6 +172,7 @@ public class FILEChooserPane extends BasicPane {
protected boolean showEnv; protected boolean showEnv;
protected boolean showLoc; protected boolean showLoc;
protected boolean showWebReport = false; protected boolean showWebReport = false;
protected boolean showMkdir = true;
private UIDialog dialog; private UIDialog dialog;
@ -245,6 +246,7 @@ public class FILEChooserPane extends BasicPane {
chooserPane.showEnv = true; chooserPane.showEnv = true;
chooserPane.showLoc = false; chooserPane.showLoc = false;
chooserPane.showWebReport = false; chooserPane.showWebReport = false;
chooserPane.showMkdir = false;
// 替换掉 PlaceListModel // 替换掉 PlaceListModel
chooserPane.setFileDataPlaceListModel(FileDataFILE.parseType(filter)); chooserPane.setFileDataPlaceListModel(FileDataFILE.parseType(filter));
chooserPane.removeAllFilter(); chooserPane.removeAllFilter();
@ -338,6 +340,7 @@ public class FILEChooserPane extends BasicPane {
mkdirButton = initMkdirButton(); mkdirButton = initMkdirButton();
locationPane.add(mkdirButton, BorderLayout.EAST); locationPane.add(mkdirButton, BorderLayout.EAST);
mkdirButton.setEnabled(showMkdir);
JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// Richie:placesList includes C,D,E,F and DeskTop etc. // Richie:placesList includes C,D,E,F and DeskTop etc.
@ -1229,7 +1232,7 @@ public class FILEChooserPane extends BasicPane {
currentDirectory = dir; currentDirectory = dir;
this.locationBtnPane.populate(currentDirectory); this.locationBtnPane.populate(currentDirectory);
this.mkdirButton.setEnabled(currentDirectory != null); this.mkdirButton.setEnabled(currentDirectory != null && showMkdir);
refreshSubFileListModel(); refreshSubFileListModel();
} }
@ -1872,7 +1875,6 @@ public class FILEChooserPane extends BasicPane {
private UIButton initMkdirButton() { private UIButton initMkdirButton() {
UIButton folderButton = new UIButton(); UIButton folderButton = new UIButton();
folderButton.setIcon(new LazyIcon("new_folder")); folderButton.setIcon(new LazyIcon("new_folder"));
folderButton.setUI(new UIButtonUI());
folderButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Utils_New_Folder")); folderButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Utils_New_Folder"));
folderButton.addActionListener(new ActionListener() { folderButton.addActionListener(new ActionListener() {
@Override @Override

Loading…
Cancel
Save