Browse Source

REPORT-111337 【设计器性能】设计器卡顿优化 模板主题+撤销重做优化

fix-lag
Destiny.Lin 11 months ago
parent
commit
e5e9d0a4c7
  1. 9
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java
  2. 6
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java
  3. 4
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

9
designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java

@ -138,10 +138,11 @@ public class TableDataSourceOP implements UserObjectOP<TableDataWrapper> {
Map<String, TableDataWrapper> templateDataMap; Map<String, TableDataWrapper> templateDataMap;
Map<String, TableDataWrapper> serverDataMap; Map<String, TableDataWrapper> serverDataMap;
Map<String, TableDataWrapper> storeProcedureMap; Map<String, TableDataWrapper> storeProcedureMap;
// init涉及到RPC,不要滥用
templateDataMap = this.init().get(0); List<Map<String, TableDataWrapper>> initList = this.init();
serverDataMap = this.init().get(1); templateDataMap = initList.get(0);
storeProcedureMap = this.init().get(2); serverDataMap = initList.get(1);
storeProcedureMap = initList.get(2);
//所有的数据集 //所有的数据集
List<ExpandMutableTreeNode> list = new ArrayList<>(); List<ExpandMutableTreeNode> list = new ArrayList<>();

6
designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.itree.filetree; package com.fr.design.gui.itree.filetree;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -93,8 +94,9 @@ public class ReportletPane extends BasicPane {
* 刷新Env * 刷新Env
*/ */
public void refreshEnv() { public void refreshEnv() {
// 直接复用模板树的数据
this.templateReportletTree.refreshEnv(); TemplateFileTree tree = TemplateTreePane.getInstance().getTemplateFileTree();
this.templateReportletTree.setModel(tree.getModel());
this.classReportletTree.refreshEnv(); this.classReportletTree.refreshEnv();
} }

4
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -814,7 +814,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
reportComposite.setSelectedIndex(u.getSelectedReportIndex()); reportComposite.setSelectedIndex(u.getSelectedReportIndex());
u.getSelectedEditingState().revert(); u.getSelectedEditingState().revert();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
} }
this.undoState = u; this.undoState = u;
} else { } else {
@ -1319,7 +1319,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) { if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) {
fireTargetModified(shouldCreateUndoState); fireTargetModified(shouldCreateUndoState);
reportComposite.setSelectedIndex(reportComposite.getSelectedIndex()); reportComposite.setSelectedIndex(reportComposite.getSelectedIndex());
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
// 刷新参数面板界面 // 刷新参数面板界面
populateReportParameterAttr(); populateReportParameterAttr();

Loading…
Cancel
Save