Browse Source

REPORT-52526 【来源于迭代任务】【V2.1.0】设计器数据集查询界面增加复制传参后sql的功能

feature/10.0
Bruce.Deng 4 years ago
parent
commit
b5c89e6c6e
  1. 16
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

16
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -208,12 +208,22 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
StringSelection selection = new StringSelection(sql);
java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
// 弹窗
PreviewPerformedSqlPane pane;
if (isShowSpecialCharSqlPane(specialCharParamIndex)) {
pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql, specialCharParamIndex, ConfigService.getInstance().getPSIConfig().getSelectedSpecialChar(), highlight);
showSpecialCharSqlPane(sql, specialCharParamIndex, highlight);
} else {
pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql);
showNormalPreviewPane(sql);
}
}
// 埋点方法
private static void showNormalPreviewPane(String sql) {
PreviewPerformedSqlPane pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql);
pane.setVisible(true);
}
// 埋点方法
private static void showSpecialCharSqlPane(String sql, List<int[]> specialCharParamIndex, boolean highlight) {
PreviewPerformedSqlPane pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql, specialCharParamIndex, ConfigService.getInstance().getPSIConfig().getSelectedSpecialChar(), highlight);
pane.setVisible(true);
}

Loading…
Cancel
Save