Browse Source

Pull request #3589: REPORT-48124 内置缓存插件漏掉了其它提交&方法改个名字

Merge in DESIGN/design from ~RINOUX/design:feature/x to feature/x

* commit '3138498b54aff1b0af7e8dd7812d7b2ad8bad716':
  update
  REPORT-48124 内置缓存插件漏掉了其它提交&方法改个名字
research/11.0
ju|剧浩宇 4 years ago
parent
commit
565ddf53fb
  1. 16
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

16
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -36,6 +36,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.ParameterUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.esd.core.strategy.config.StrategyConfig; import com.fr.esd.core.strategy.config.StrategyConfig;
import com.fr.esd.core.strategy.config.StrategyConfigHelper; import com.fr.esd.core.strategy.config.StrategyConfigHelper;
@ -213,7 +214,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
box.setMinimumSize(new Dimension(300, 400)); box.setMinimumSize(new Dimension(300, 400));
this.connectionTableProcedurePane.setMinimumSize(new Dimension(250, 400)); this.connectionTableProcedurePane.setMinimumSize(new Dimension(230, 400));
this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400)); this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400));
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane);
@ -238,14 +239,14 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
} }
private void refresh() { private void refreshParameters() {
String[] paramTexts = new String[2]; String[] paramTexts = new String[2];
paramTexts[0] = SqlUtils.tryPureSqlText(this.sqlTextPane.getText()); paramTexts[0] = SqlUtils.tryPureSqlText(this.sqlTextPane.getText());
paramTexts[1] = SqlUtils.tryPureSqlText(this.pageQuery); paramTexts[1] = SqlUtils.tryPureSqlText(this.pageQuery);
List<ParameterProvider> existParameterList = this.editorPane.update(); List<ParameterProvider> existParameterList = this.editorPane.update();
Parameter[] ps = (existParameterList == null) ? new Parameter[0] : (Parameter[]) existParameterList.toArray(new Parameter[0]); Parameter[] ps = (existParameterList == null) ? new Parameter[0] : existParameterList.toArray(new Parameter[0]);
this.editorPane.populate(ParameterHelper.analyzeAndUnionSameParameters(paramTexts, ps)); this.editorPane.populate(ParameterUtils.analyzeAndUnionParameters(paramTexts, ps));
} }
@ -382,7 +383,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
return; return;
} }
refresh(); refreshParameters();
} }
@ -487,6 +488,9 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
} }
// 保存前 刷新下参数列表 保证获取到最新的参数
refreshParameters();
List<ParameterProvider> parameterList = this.editorPane.update(); List<ParameterProvider> parameterList = this.editorPane.update();
ParameterProvider[] parameters = parameterList.toArray(new ParameterProvider[0]); ParameterProvider[] parameters = parameterList.toArray(new ParameterProvider[0]);
@ -511,7 +515,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
DBTableDataPane.this.refresh(); DBTableDataPane.this.refreshParameters();
} }

Loading…
Cancel
Save