From 2d73ecd9fbcc431c5b8f6d508711e305fc07670b Mon Sep 17 00:00:00 2001 From: zheng Date: Fri, 21 Dec 2018 16:13:49 +0800 Subject: [PATCH 01/13] =?UTF-8?q?CHART-3086=20geojson=E8=AF=BB=E5=86=99?= =?UTF-8?q?=E7=A7=BB=E5=88=B0core=E3=80=82service=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E8=BE=83=E5=A4=A7=20=E4=B8=8B=E4=B8=80?= =?UTF-8?q?=E6=B3=A2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drillmap/designer/data/comp/MapDataTree.java | 11 ++++++----- .../designer/type/VanChartMapSourceChoosePane.java | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java index 16f6af6b2..642630f14 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java @@ -4,8 +4,9 @@ import com.fr.design.constants.UIConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; -import com.fr.plugin.chart.map.server.GEOJSONHelper; +import com.fr.geojson.helper.GEOJSONHelper; import com.fr.stable.StringUtils; import javax.swing.JTree; @@ -78,7 +79,7 @@ public class MapDataTree extends JTree { DefaultMutableTreeNode currentSel = (DefaultMutableTreeNode)this.getLastSelectedPathComponent(); - return GEOJSONHelper.getInstance().getJsonUrlByPath(currentSel.getUserObject().toString()); + return CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(currentSel.getUserObject().toString()); } //根据路径精确查找 @@ -96,7 +97,7 @@ public class MapDataTree extends JTree { return null; } String dirPath = el.getUserObject().toString(); - String url = GEOJSONHelper.getInstance().getJsonUrlByPath(dirPath); + String url = CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(dirPath); if (GEOJSONHelper.getInstance().isValidDirPath(dirPath) && ComparatorUtils.equals(jsonUrl, url)){ selectTreeNode(el, m_model); return el; @@ -133,7 +134,7 @@ public class MapDataTree extends JTree { if(treeNode == null || treeNode.getUserObject() == null){ return StringUtils.EMPTY; } - return GEOJSONHelper.getPresentNameWithPath(treeNode.getUserObject().toString()); + return ChartGEOJSONHelper.getPresentNameWithPath(treeNode.getUserObject().toString()); } //模糊搜索 深度优先. @@ -149,7 +150,7 @@ public class MapDataTree extends JTree { DefaultMutableTreeNode el = els.nextElement(); String path = el.getUserObject().toString(); - String fileName = GEOJSONHelper.getPresentNameWithPath(path); + String fileName = ChartGEOJSONHelper.getPresentNameWithPath(path); if (GEOJSONHelper.getInstance().isValidDirPath(path) && StringUtils.contains(fileName, text)) { selectTreeNode(el, m_model); return; diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java index 43fcb5df0..5fa180ffe 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -18,15 +18,15 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; import com.fr.general.ComparatorUtils; - import com.fr.general.http.HttpClient; import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.ViewCenter; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; import com.fr.plugin.chart.map.layer.WMSLayer; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; -import com.fr.plugin.chart.map.server.GEOJSONHelper; +import com.fr.geojson.helper.GEOJSONHelper; import com.fr.plugin.chart.map.server.MapLayerConfigManager; import com.fr.plugin.chart.service.WMSFactory; import com.fr.plugin.chart.type.GISLayerType; @@ -201,7 +201,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { } else if(o instanceof String){//list里面没有 selectTreePath = null; this.tree.setSelectionPath(null); - this.getModel().setSelectedItem(GEOJSONHelper.getPresentNameWithPath((String) o)); + this.getModel().setSelectedItem(ChartGEOJSONHelper.getPresentNameWithPath((String) o)); } } @@ -209,7 +209,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { protected String pathToString(TreePath path) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); //不显示后缀 - return GEOJSONHelper.getPresentNameWithPath(node.toString()); + return ChartGEOJSONHelper.getPresentNameWithPath(node.toString()); } @Override @@ -533,7 +533,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { GEOJSONTreeHelper.getInstance().updateParamRootNode(VanChartMapSourceChoosePane.this.getParams()); if(selectTreePath != null){ - mapDataTree.setSelectNodePath(GEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString())); + mapDataTree.setSelectNodePath(CompatibleGEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString())); selectTreePath = mapDataTree.getSelectionPath(); } From 9475d65d278a7397d00cbc1cee67deee5882180c Mon Sep 17 00:00:00 2001 From: Hades Date: Mon, 24 Dec 2018 14:08:43 +0800 Subject: [PATCH 02/13] =?UTF-8?q?REPORT-13303=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=A6=82=E6=9E=9C=E6=A0=B9=E7=9B=AE=E5=BD=95=E6=9C=89?= =?UTF-8?q?=E5=BE=88=E5=A4=9A=E9=9D=A2=E6=9D=BF,=20=E4=BC=9A=E5=8D=A1?= =?UTF-8?q?=E5=9C=A8=E7=99=BD=E5=B1=8F=E5=BE=88=E4=B9=85,=20=E4=B8=8D?= =?UTF-8?q?=E5=90=88=E7=90=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrame.java | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 5c262da9d..a2c21ccab 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -100,6 +100,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { @@ -247,6 +249,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private ProgressDialog progressDialog; + private ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1); + + public DesignerFrame(ToolBarMenuDock ad) { setName(DESIGNER_FRAME_NAME); @@ -809,18 +814,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * 报表运行环境改变时,需要刷新某些面板 */ public void refreshEnv() { - this.setTitle(); - DesignerFrameFileDealerPane.getInstance().refreshDockingView(); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); - TemplateTreePane.getInstance().refreshDockingView(); - DesignTableDataManager.clearGlobalDs(); - EastRegionContainerPane.getInstance().refreshDownPane(); - - JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (template != null) { - template.refreshToolArea(); - } + fixedThreadPool.execute(new Runnable() { + @Override + public void run() { + DesignerFrameFileDealerPane.getInstance().refreshDockingView(); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); + TemplateTreePane.getInstance().refreshDockingView(); + DesignTableDataManager.clearGlobalDs(); + EastRegionContainerPane.getInstance().refreshDownPane(); + JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (template != null) { + template.refreshToolArea(); + } + } + }); } /** From b5c1870902b772c4ef0e3838b01007e186006d57 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Mon, 24 Dec 2018 15:13:24 +0800 Subject: [PATCH 03/13] REPORT-13810 --- .../src/main/java/com/fr/design/EnvChangeEntrance.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 76ae52894..6b5664970 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -90,15 +90,16 @@ public class EnvChangeEntrance { }); return false; } + //REPORT-13810如果只是添加了工作目录,没有切换,这里ToolArea也是要显示新建的工作目录 + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (template != null) { + template.refreshToolArea(); + } WorkContext.switchTo(workspace, new WorkContextCallback() { @Override public void done() { DesignerEnvManager.getEnvManager().setCurEnvName(envName); DesignUtils.refreshDesignerFrame(); - JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - if (template != null) { - template.refreshToolArea(); - } DesignTableDataManager.fireDSChanged(new HashMap()); if (WorkContext.getCurrent().isLocal()) { //初始化一下serverTray From 3927974c66a4bdb7e0abf057d6b878a3fe52d96f Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Mon, 24 Dec 2018 17:27:38 +0800 Subject: [PATCH 04/13] REPORT-13802 --- .../com/fr/design/insert/formula/variable/cn/servletURL.txt | 2 +- .../com/fr/design/insert/formula/variable/en/servletURL.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt index 2a1e5dfd4..5ba157a70 100644 --- a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt +++ b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt @@ -1 +1 @@ -假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL指的是:/WebReport/ReportServer \ No newline at end of file +假如访问的是http://localhost:8076/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL指的是:/webroot/decision/view/report \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt index b9149deff..fd14304ce 100644 --- a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt +++ b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt @@ -1 +1 @@ -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL is /WebReport/ReportServer \ No newline at end of file +http://localhost:8076/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL is /webroot/decision/view/report \ No newline at end of file From c9d222765ddd72ac379d1742e046e6d5a8127167 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Mon, 24 Dec 2018 17:44:20 +0800 Subject: [PATCH 05/13] REPORT-13802 --- .../com/fr/design/insert/formula/variable/cn/servletURL.txt | 2 +- .../com/fr/design/insert/formula/variable/en/servletURL.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt index 5ba157a70..81dc88965 100644 --- a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt +++ b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/cn/servletURL.txt @@ -1 +1 @@ -假如访问的是http://localhost:8076/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL指的是:/webroot/decision/view/report \ No newline at end of file +假如访问的是http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL指的是:/webroot/decision/view/report \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt index fd14304ce..d8704ba82 100644 --- a/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt +++ b/designer-base/src/main/resources/com/fr/design/insert/formula/variable/en/servletURL.txt @@ -1 +1 @@ -http://localhost:8076/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL is /webroot/decision/view/report \ No newline at end of file +http://localhost:8075/webroot/decision/view/report?viewlet=workbook1.cpt,servletURL is /webroot/decision/view/report \ No newline at end of file From b6f567dab66065b2a89db0ffcfb0d1427147fb6b Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 25 Dec 2018 10:10:16 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89httpclient=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../errorinfo/ErrorInfoUploader.java | 82 ++++++++----------- 1 file changed, 36 insertions(+), 46 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 4d5964426..42298b812 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -3,15 +3,16 @@ package com.fr.design.mainframe.errorinfo; import com.fr.base.FRContext; import com.fr.design.mainframe.SiteCenterToken; import com.fr.general.CloudCenter; -import com.fr.general.ComparatorUtils; +import com.fr.general.CommonIOUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; -import com.fr.general.http.HttpClient; -import com.fr.json.JSONException; +import com.fr.general.http.HttpResponseType; +import com.fr.general.http.HttpToolbox; import com.fr.json.JSONObject; import com.fr.license.function.VT4FR; import com.fr.log.FineLoggerFactory; import com.fr.log.LogHandler; +import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; @@ -93,9 +94,7 @@ public class ErrorInfoUploader { try { String downloadURL = CloudCenter.getInstance().acquireUrlByKind("solution.download", "http://cloud.fanruan.com/api/solution"); downloadURL = String.format("%s?token=%s", downloadURL, SiteCenterToken.generateToken()); - HttpClient hc = new HttpClient(downloadURL); - hc.asGet(); - InputStream in = hc.getResponseStream(); + InputStream in = HttpToolbox.post(downloadURL, new HashMap(), HttpResponseType.STREAM); StableUtils.makesureFileExist(localCacheZip); FileOutputStream out = new FileOutputStream(localCacheZip); IOUtils.copyBinaryTo(in, out); @@ -114,15 +113,11 @@ public class ErrorInfoUploader { // 判断本地文件大小. String checkURL = CloudCenter.getInstance().acquireUrlByKind("solution.check", "http://cloud.fanruan.com/api/solution/cache/check"); checkURL = String.format("%s?token=%s", checkURL, SiteCenterToken.generateToken()); - HttpClient client = new HttpClient(checkURL); - client.asGet(); - if (client.isServerAlive()) { - try { - JSONObject res = new JSONObject(client.getResponseText()); - // 简单粗暴, 直接判断文件大小. - return res.optLong("version") != localCacheZip.length(); - } catch (JSONException ignore) { - } + try { + JSONObject res = new JSONObject(HttpToolbox.get(checkURL)); + // 简单粗暴, 直接判断文件大小. + return res.optLong("version") != localCacheZip.length(); + } catch (Exception ignore) { } return false; } @@ -140,27 +135,29 @@ public class ErrorInfoUploader { } File[] files = folder.listFiles(); - if (files.length > MAX_ERROR_SIZE) { - StableUtils.deleteFile(folder); + if (ArrayUtils.getLength(files) > MAX_ERROR_SIZE) { + CommonIOUtils.deleteFile(folder); return; } try { - for (File file : files) { - String filePath = file.getPath(); - String suffix = filePath.substring(filePath.lastIndexOf(".")); - - if (suffix.endsWith(SUFFIX)) { - Thread.sleep(1000L); - String content = IOUtils.inputStream2String(new FileInputStream(file)); - if (content.length() > MAX_ERROR_SIZE) { - file.delete(); - continue; - } - - String url = CloudCenter.getInstance().acquireUrlByKind("design.error"); - if (sendErroInfo(url, content)) { - file.delete(); + if (ArrayUtils.isNotEmpty(files)) { + for (File file : files) { + String filePath = file.getPath(); + String suffix = filePath.substring(filePath.lastIndexOf(".")); + + if (suffix.endsWith(SUFFIX)) { + Thread.sleep(1000L); + String content = IOUtils.inputStream2String(new FileInputStream(file)); + if (content.length() > MAX_ERROR_SIZE) { + CommonIOUtils.deleteFile(file); + continue; + } + + String url = CloudCenter.getInstance().acquireUrlByKind("design.error"); + if (sendErrorInfo(url, content)) { + CommonIOUtils.deleteFile(file); + } } } } @@ -169,25 +166,18 @@ public class ErrorInfoUploader { } } - private boolean sendErroInfo(String url, String content) { - HashMap para = new HashMap<>(); + private boolean sendErrorInfo(String url, String content) { + HashMap para = new HashMap<>(); para.put("token", SiteCenterToken.generateToken()); para.put("content", content); - HttpClient httpClient = new HttpClient(url, para, true); - httpClient.asGet(); - - if (!httpClient.isServerAlive()) { - return false; - } - String res = httpClient.getResponseText(); - boolean success; try { - success = ComparatorUtils.equals(new JSONObject(res).get("status"), "success"); - } catch (Exception ex) { - success = true; + String responseText = HttpToolbox.post(url, para); + return "success".equals(new JSONObject(responseText).get("status")); + } catch (Exception ignore) { + } - return success; + return false; } From 8055a97d3206fb3afce09ccf82ce958fb3616e9f Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 26 Dec 2018 06:22:14 +0800 Subject: [PATCH 07/13] =?UTF-8?q?REPORT-12718=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=BC=8F=E4=BC=A0=E4=BA=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/ErrorCreator.java | 4 ++-- .../java/com/fr/design/designer/creator/XCreatorUtils.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/ErrorCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/ErrorCreator.java index 54a679fe1..b9a29c041 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/ErrorCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/ErrorCreator.java @@ -1,7 +1,7 @@ package com.fr.design.designer.creator; -import com.fr.form.ui.ErrorMarker; import com.fr.form.ui.Widget; +import com.fr.form.ui.WidgetErrorMarker; import com.fr.stable.StringUtils; import java.awt.*; @@ -18,7 +18,7 @@ public class ErrorCreator extends NullCreator { @Override protected String showText() { - ErrorMarker marker = (ErrorMarker)toData(); + WidgetErrorMarker marker = (WidgetErrorMarker)toData(); String text = marker.getWidgetValue().getDisplayValue(); if (StringUtils.isEmpty(text)) { return super.showText(); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 774010136..f51f6710b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -26,7 +26,6 @@ import com.fr.form.ui.ComboCheckBox; import com.fr.form.ui.DateEditor; import com.fr.form.ui.EditorHolder; import com.fr.form.ui.ElementCaseEditor; -import com.fr.form.ui.ErrorMarker; import com.fr.form.ui.FileEditor; import com.fr.form.ui.FreeButton; import com.fr.form.ui.IframeEditor; @@ -42,6 +41,7 @@ import com.fr.form.ui.TextEditor; import com.fr.form.ui.TreeComboBoxEditor; import com.fr.form.ui.TreeEditor; import com.fr.form.ui.Widget; +import com.fr.form.ui.WidgetErrorMarker; import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBorderLayout; @@ -160,7 +160,7 @@ public class XCreatorUtils { objectMap.put(NameWidget.class, XNameWidget.class); objectMap.put(CardSwitchButton.class, XCardSwitchButton.class); objectMap.put(CardAddButton.class, XCardAddButton.class); - objectMap.put(ErrorMarker.class, ErrorCreator.class); + objectMap.put(WidgetErrorMarker.class, ErrorCreator.class); } private static void reInitExtra() { From 2eb4fa09378bcda62cb5a6d4904065ecf8931372 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Dec 2018 10:38:56 +0800 Subject: [PATCH 08/13] =?UTF-8?q?REPORT-13202=20=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=8E=A7=E4=BB=B6=E7=9A=84=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=8E=AF=E5=A2=83=E5=90=8E=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/file/HistoryTemplateListCache.java | 75 +++++++++++++++++++ .../com/fr/design/mainframe/JTemplate.java | 13 ---- .../com/fr/start/module/DesignerStartup.java | 60 ++++++++++----- 3 files changed, 115 insertions(+), 33 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java index df83cb1a4..91af4c830 100644 --- a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java +++ b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java @@ -1,6 +1,8 @@ package com.fr.design.file; import com.fr.base.chart.chartdata.CallbackEvent; +import com.fr.base.io.BaseBook; +import com.fr.base.io.IOFile; import com.fr.design.DesignerEnvManager; import com.fr.design.base.mode.DesignModeContext; import com.fr.design.data.DesignTableDataManager; @@ -18,10 +20,14 @@ import com.fr.stable.CoreConstants; import com.fr.stable.StringUtils; import com.fr.third.org.apache.commons.io.FilenameUtils; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.ListIterator; +import java.util.Map; /** * 历史模板缓存 @@ -305,4 +311,73 @@ public class HistoryTemplateListCache implements CallbackEvent { } return true; } + + /** + * 切换环境时暂存打开的模板内容,key 是在历史中的index,value 是模板xml 内容byte[] + */ + private Map bytesMap; + + /** + * 切换环境前将正在编辑的模板暂存起来,并且在新环境中重新读取一遍,暂存的不是模板文件的内容而是模板对象的内容 + *

+ * 防止新环境加载到的同名 Class 和模板对象中的 Class 不一致,在新环境存储失败 + * + * @see HistoryTemplateListCache#load() + */ + public void stash() { + FineLoggerFactory.getLogger().info("Env Change Template Stashing..."); + if (bytesMap == null) { + bytesMap = new HashMap(); + } else { + bytesMap.clear(); + } + int size = historyList.size(); + for (int i = 0; i < size; i++) { + JTemplate template = historyList.get(i); + try { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + BaseBook target = template.getTarget(); + if (target != null) { + target.export(outputStream); + bytesMap.put(i, outputStream.toByteArray()); + } + // 如果 target == null 那么这个模板是被模板内存优化功能处理过的,不用处理 + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + FineLoggerFactory.getLogger().info("Env Change Template Stashed."); + } + + /** + * 切换环境前将正在编辑的模板暂存起来后,在新环境重新读取一遍 + *

+ * 防止新环境加载到的同名 Class 和模板对象中的 Class 不一致,在新环境存储失败 + * + * @see HistoryTemplateListCache#stash() + */ + public void load() { + FineLoggerFactory.getLogger().info("Env Change Template Loading..."); + if (bytesMap != null && bytesMap.size() != 0) { + int size = historyList.size(); + for (int i = 0; i < size; i++) { + try { + byte[] bytes = bytesMap.get(i); + // 可能有模板 stash 失败的情况,在 load 的时候不更新它 + if (bytes == null) { + continue; + } + ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); + // todo readStream 这个行为应该上升到 BaseBook 上 + ((IOFile) historyList.get(i).getTarget()).readStream(inputStream); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + bytesMap.clear(); + MutilTempalteTabPane.getInstance().refreshOpenedTemplate(historyList); + MutilTempalteTabPane.getInstance().repaint(); + } + FineLoggerFactory.getLogger().info("Env Change Template Loaded."); + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 7f5cab744..3e7b95286 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -522,19 +522,6 @@ public abstract class JTemplate> if (editingFILE == null) { return false; } -// //检查一下连接是否成功 -// try { -// if (FRContext.getCommonOperator() != null && !FRContext.getCommonOperator().testServerConnectionWithOutShowMessagePane()) { -// //连接不成功,提示 -// JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), -// com.fr.design.i18n.Toolkit.i18nText(new String[]{"server_disconnected", "template_unsaved"}, new String[]{",", "!"}) -// , com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Error"), JOptionPane.ERROR_MESSAGE); -// return false; -// } -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage(), e); -// } - // 检查一下editingFILE是不是已存在的文件,如果不存在则用saveAs if (!editingFILE.exists()) { diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 701a6936c..4ec518940 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -1,6 +1,7 @@ package com.fr.start.module; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.mainframe.DesignerContext; import com.fr.event.Event; import com.fr.event.Listener; @@ -28,13 +29,13 @@ public class DesignerStartup extends Activator { @Override @Metrics public void start() { - + startSub(PreStartActivator.class); //启动基础部分 startSub(BasicActivator.class); final String[] args = getModule().upFindSingleton(StartupArgs.class).get(); final Designer designer = new Designer(args); - + startSub(DesignerWorkspaceProvider.class); registerEnvListener(); //启动env @@ -49,7 +50,7 @@ public class DesignerStartup extends Activator { } }); service.submit(new Runnable() { - + @Override public void run() { try { @@ -63,46 +64,65 @@ public class DesignerStartup extends Activator { DesignerContext.getDesignerFrame().setVisible(true); //启动画面结束 SplashContext.getInstance().hide(); - + DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); FineRuntime.startFinish(); } - + private void browserDemo() { - + if (getModule().leftFindSingleton(StartupArgs.class) != null && getModule().leftFindSingleton(StartupArgs.class).isDemo()) { ServerStarter.browserDemoURL(); } } - + /** - * 切换环境时,重新启动所有相关模块 + * 注册切换环境前后事件监听 */ private void registerEnvListener() { + + /*切换环境前,关闭所有相关模块*/ listenEvent(WorkspaceEvent.BeforeSwitch, new Listener() { @Override - public void on(Event event, Workspace param) { - + public void on(Event event, Workspace current) { getSub(EnvBasedModule.class).stop(); } }); + /*切换环境后,重新启动所有相关模块*/ listenEvent(WorkspaceEvent.AfterSwitch, new Listener(Integer.MAX_VALUE) { @Override - public void on(Event event, Workspace param) { - + public void on(Event event, Workspace current) { getSub(EnvBasedModule.class).start(); - ExecutorService service = Executors.newSingleThreadExecutor(); - service.submit(new Runnable() { - @Override - public void run() { - FineEmbedServer.start(); - } - }); - service.shutdown(); + // 切换后的环境是本地环境才启动内置服务器 + if (current.isLocal()) { + ExecutorService service = Executors.newSingleThreadExecutor(); + service.submit(new Runnable() { + @Override + public void run() { + FineEmbedServer.start(); + } + }); + service.shutdown(); + } + } + }); + /*切换环境前,存储一下打开的所有文件对象,优先级高于默认优先级,要先于 关闭相关模块部分 被触发*/ + listenEvent(WorkspaceEvent.BeforeSwitch, new Listener(1) { + @Override + public void on(Event event, Workspace workspace) { + HistoryTemplateListCache.getInstance().stash(); + } + }); + + /*切换环境后,装载一下打开的所有文件对象,优先级低于默认优先级,要后于 启动相关模块部分 被触发*/ + listenEvent(WorkspaceEvent.AfterSwitch, new Listener(-1) { + @Override + public void on(Event event, Workspace workspace) { + HistoryTemplateListCache.getInstance().load(); } }); } From 382549ac3bc824b35da504690e4b3f5c98701c39 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Dec 2018 11:27:42 +0800 Subject: [PATCH 09/13] =?UTF-8?q?load=20=E5=9C=BA=E6=99=AF=E4=B8=8B=20?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=86=85=E5=AD=98=E4=BC=98=E5=8C=96=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/HistoryTemplateListCache.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java index 91af4c830..a84442c58 100644 --- a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java +++ b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java @@ -368,8 +368,12 @@ public class HistoryTemplateListCache implements CallbackEvent { continue; } ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); - // todo readStream 这个行为应该上升到 BaseBook 上 - ((IOFile) historyList.get(i).getTarget()).readStream(inputStream); + BaseBook target = historyList.get(i).getTarget(); + if (target != null) { + // todo readStream 这个行为应该上升到 BaseBook 上 + ((IOFile) target).readStream(inputStream); + } + // 如果 target == null 那么这个模板是被模板内存优化功能处理过的,不用处理 } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } From b23f8e74c6429479e0e94020877f2bb81bba2341 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Dec 2018 12:00:37 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerStartup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 4ec518940..98e1f8f18 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -111,7 +111,7 @@ public class DesignerStartup extends Activator { } }); /*切换环境前,存储一下打开的所有文件对象,优先级高于默认优先级,要先于 关闭相关模块部分 被触发*/ - listenEvent(WorkspaceEvent.BeforeSwitch, new Listener(1) { + listenEvent(WorkspaceEvent.BeforeSwitch, new Listener(Integer.MAX_VALUE) { @Override public void on(Event event, Workspace workspace) { HistoryTemplateListCache.getInstance().stash(); @@ -119,7 +119,7 @@ public class DesignerStartup extends Activator { }); /*切换环境后,装载一下打开的所有文件对象,优先级低于默认优先级,要后于 启动相关模块部分 被触发*/ - listenEvent(WorkspaceEvent.AfterSwitch, new Listener(-1) { + listenEvent(WorkspaceEvent.AfterSwitch, new Listener(Integer.MIN_VALUE) { @Override public void on(Event event, Workspace workspace) { HistoryTemplateListCache.getInstance().load(); From 10e88ac516e292fdaaf5465dd8d53b4744d04e38 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 27 Dec 2018 09:40:12 +0800 Subject: [PATCH 11/13] =?UTF-8?q?REPORT-13902=20=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84test=E4=BE=9D=E8=B5=96,=20=E5=85=88=E7=A7=BB=E5=87=BA?= =?UTF-8?q?=E6=9D=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/form/ui/WidgetNameCopyTest.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 designer-form/src/test/java/com/fr/form/ui/WidgetNameCopyTest.java diff --git a/designer-form/src/test/java/com/fr/form/ui/WidgetNameCopyTest.java b/designer-form/src/test/java/com/fr/form/ui/WidgetNameCopyTest.java new file mode 100644 index 000000000..8a2f498de --- /dev/null +++ b/designer-form/src/test/java/com/fr/form/ui/WidgetNameCopyTest.java @@ -0,0 +1,29 @@ +package com.fr.form.ui; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.mainframe.FormSelectionUtils; +import com.fr.form.main.Form; +import com.fr.general.ComparatorUtils; +import junit.framework.TestCase; + +import java.awt.Dimension; + +/** + * @author kerry + * @date 2018/7/27 + */ +public class WidgetNameCopyTest extends TestCase { + + public void testWidgetNameCopy() throws Exception { + Widget button = new FreeButton(); + Form form = new Form(); + button.setWidgetName("button0"); + XCreator xCreator = XCreatorUtils.createXCreator(button, new Dimension(100, 100)); + XCreator copyXcreator1 = FormSelectionUtils.copyXcreator(form, xCreator); + XCreator copyXcreator2 = FormSelectionUtils.copyXcreator(form, xCreator); + copyXcreator1.toData().setWidgetName("button_test"); + assertTrue(!ComparatorUtils.equals(copyXcreator2.toData().getWidgetName(), copyXcreator1.toData().getWidgetName())); + } + +} From b35dfc96e3b8e341a297a5e16424430544b04fed Mon Sep 17 00:00:00 2001 From: Hades Date: Thu, 27 Dec 2018 09:56:56 +0800 Subject: [PATCH 12/13] =?UTF-8?q?REPORT-13895=20release=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E6=97=B6=E5=BC=82=E6=AD=A5=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=A8=A1=E6=9D=BF=E5=90=8E=EF=BC=8C=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8D=E6=96=AD=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrame.java | 48 +++++++++++-------- .../DesignerFrameFileDealerPane.java | 30 +++++++++++- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index e68d00434..714c561e7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -38,7 +38,6 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.menu.MenuManager; import com.fr.design.menu.ShortCut; -import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.exception.DecryptTemplateException; import com.fr.file.FILE; @@ -69,6 +68,7 @@ import javax.swing.JLayeredPane; import javax.swing.JMenuBar; import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.WindowConstants; import javax.swing.border.MatteBorder; @@ -102,8 +102,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { @@ -243,9 +241,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private ProgressDialog progressDialog; - private ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1); - - public DesignerFrame(ToolBarMenuDock ad) { setName(DESIGNER_FRAME_NAME); @@ -418,7 +413,16 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta public void on(PluginEvent event) { refreshNorthEastPane(northEastPane, ad); - DesignUtils.refreshDesignerFrame(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + if (DesignerContext.getDesignerFrame() == null) { + return; + } + DesignerContext.getDesignerFrame().refresh(); + DesignerContext.getDesignerFrame().repaint(); + } + }); } }, new PluginFilter() { @@ -820,21 +824,23 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * 报表运行环境改变时,需要刷新某些面板 */ public void refreshEnv() { + refresh(); + DesignerFrameFileDealerPane.getInstance().refreshDockingView(); + TemplateTreePane.getInstance().refreshDockingView(); + } + + /** + * 安装设计器相关插件时的刷新 + */ + public void refresh() { this.setTitle(); - fixedThreadPool.execute(new Runnable() { - @Override - public void run() { - DesignerFrameFileDealerPane.getInstance().refreshDockingView(); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); - TemplateTreePane.getInstance().refreshDockingView(); - DesignTableDataManager.clearGlobalDs(); - EastRegionContainerPane.getInstance().refreshDownPane(); - JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (template != null) { - template.refreshToolArea(); - } - } - }); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); + DesignTableDataManager.clearGlobalDs(); + EastRegionContainerPane.getInstance().refreshDownPane(); + JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (template != null) { + template.refreshToolArea(); + } } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 7127c9763..4f43e998b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -30,11 +30,18 @@ import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.FileNodeFILE; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralContext; import com.fr.log.FineLoggerFactory; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.injectable.PluginModule; +import com.fr.plugin.manage.PluginFilter; +import com.fr.plugin.observer.PluginEvent; +import com.fr.plugin.observer.PluginEventListener; import com.fr.stable.CoreConstants; import com.fr.stable.StringUtils; import com.fr.third.org.apache.commons.io.FilenameUtils; @@ -68,6 +75,22 @@ import static javax.swing.JOptionPane.WARNING_MESSAGE; public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarStateChangeListener, ResponseDataSourceChange { + static { + GeneralContext.listenPluginRunningChanged(new PluginEventListener() { + + @Override + public void on(PluginEvent event) { + DesignUtils.refreshDesignerFrame(); + } + }, new PluginFilter() { + + @Override + public boolean accept(PluginContext context) { + return context.contain(PluginModule.ExtraDesign, ShortCut.TEMPLATE_TREE); + } + }); + } + private static final String FILE = "file"; private static volatile DesignerFrameFileDealerPane THIS; @@ -163,7 +186,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt * 刷新菜单 */ public void refreshDockingView() { - + long start = System.currentTimeMillis(); ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(newFolderAction, refreshTreeAction); if (WorkContext.getCurrent().isLocal()) { @@ -176,7 +199,12 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } toolbarDef.updateToolBar(toolBar); resetActionStatus(); + long end = System.currentTimeMillis(); + System.out.println("----------------------->refreshDockingView 菜单: " + (end - start)); + long start1 = System.currentTimeMillis(); refresh(); + long end1 = System.currentTimeMillis(); + System.out.println("-------------------------->菜单 refresh: " + (end1 - start1)); } From dbd31a94ed0192eafa5c99613b3f84928a632e5f Mon Sep 17 00:00:00 2001 From: Hades Date: Thu, 27 Dec 2018 10:33:43 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrameFileDealerPane.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 4f43e998b..d60735257 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -186,7 +186,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt * 刷新菜单 */ public void refreshDockingView() { - long start = System.currentTimeMillis(); ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(newFolderAction, refreshTreeAction); if (WorkContext.getCurrent().isLocal()) { @@ -199,12 +198,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } toolbarDef.updateToolBar(toolBar); resetActionStatus(); - long end = System.currentTimeMillis(); - System.out.println("----------------------->refreshDockingView 菜单: " + (end - start)); - long start1 = System.currentTimeMillis(); refresh(); - long end1 = System.currentTimeMillis(); - System.out.println("-------------------------->菜单 refresh: " + (end1 - start1)); }