From 818dd42f99abb566909484e812febbdfb5cdaec6 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 21 Nov 2016 10:34:50 +0800 Subject: [PATCH 01/22] 1 --- designer_base/src/com/fr/env/RemoteEnv.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 6aff74d7ca..0f5cb509d5 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -514,8 +514,10 @@ public class RemoteEnv implements Env { } private void stopLogTimer() { - logTimer.cancel(); - logTimer = null; + if(logTimer != null) { + logTimer.cancel(); + logTimer = null; + } } /** From e3ef655bbcbb416c1edc2d333767d97136f73268 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 29 Nov 2016 17:32:32 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=A5=E4=B8=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20=EF=BC=9A=201=E3=80=81=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9A=84Level=E5=AE=9E=E4=BE=8B=E9=83=BD?= =?UTF-8?q?=E8=A2=AB=E4=BB=A3=E7=90=86=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?isClosed=E6=96=B9=E6=B3=95=E3=80=82=E5=9C=A8=E5=8F=96=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E8=BF=9B=E8=A1=8C=E5=88=A4=E6=96=AD=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=85=B3=E9=97=AD=E5=88=99=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=8F=96=E5=87=BA=202=E3=80=81=E5=8F=AF=E4=BB=A5=E4=BB=8E?= =?UTF-8?q?=E6=8F=92=E4=BB=B6jar=E5=8C=85=E4=B8=AD=E5=AF=BB=E6=89=BE?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E7=9A=84=E6=8F=92=E4=BB=B6=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8A=A0=E8=BD=BD=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98=EF=BC=9A=201=E3=80=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=8C=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E5=8F=AA=E6=98=AF=E4=B8=8D=E8=83=BD=E5=86=8D=E4=BB=8E?= =?UTF-8?q?manager=E9=87=8C=E9=9D=A2=E5=8F=96=E5=87=BA=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E4=BE=8B=EF=BC=8C=E4=BD=86=E6=98=AF=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E5=8F=96=E5=87=BA=E5=B9=B6=E6=8F=92=E5=85=A5=E5=88=B0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=AD=E7=9A=84=E5=9C=B0=E6=96=B9=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E5=AD=98=E5=9C=A8=EF=BC=8C=E9=9C=80=E8=A6=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BE=88=E5=A4=9A=E7=9B=91=E5=90=AC=E6=89=8D=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E7=BB=A7=E7=BB=AD=E6=83=B3=E5=8A=9E=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E3=80=82=202=E3=80=81=E5=A6=82=E6=9E=9C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8D=87=E7=BA=A7=E4=BA=86=E6=80=A7=E8=83=BD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=85=B6=E4=B8=AD=E6=B6=89=E5=8F=8A=E5=88=B0?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E5=8A=9F=E8=83=BD=E6=8E=A5=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E7=9A=84=E8=AF=9D=EF=BC=8C=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=85=88=E4=BB=8E=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=AD=E8=AF=BB=E5=8F=96plugin.xml=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E6=97=B6=E5=B0=B1=E4=BC=9A=E5=87=BA=E7=8E=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=82=E9=9C=80=E8=A6=81=E5=9C=A8=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BE=9D=E8=B5=96=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=E4=BE=9D=E8=B5=96=E7=9A=84=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E7=9A=84=E6=A3=80=E6=9F=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 70c18fbd0d..a4fa529180 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2063,6 +2063,17 @@ public class RemoteEnv implements Env { } + + /** + * 获取插件的配置目录 + * + * @param plugin + */ + public File getPluginFilePath(Plugin plugin) { + + return null; + } + public void readPluginLicenses() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); HashMap para = new HashMap(); From 033898e6ba4c5281d3dd4a70eb789b755eb1b972 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 1 Dec 2016 16:46:38 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=A4?= =?UTF-8?q?=E7=A7=8D=E7=9B=91=E5=90=AC=EF=BC=9A=201=E3=80=81=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=8F=98=E5=8A=A8=E7=9A=84=E7=9B=91=E5=90=AC=202?= =?UTF-8?q?=E3=80=81StableFactory=E7=94=9F=E4=BA=A7=E8=80=85=E5=92=8C?= =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=80=85=E7=9A=84=E7=9B=91=E5=90=AC=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8=E6=A8=A1=E5=9D=97=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=94=9F=E4=BA=A7=E8=80=85=E7=9B=91?= =?UTF-8?q?=E5=90=AC=20=E7=9B=AE=E5=89=8D=E8=BF=98=E9=9C=80=EF=BC=9A=201?= =?UTF-8?q?=E3=80=81=E6=B7=BB=E5=8A=A0FSPlate=E4=BD=9C=E4=B8=BA=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=80=85=202=E3=80=81JavaScript=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E6=B6=88=E8=B4=B9=E8=80=85=203=E3=80=81FSPla?= =?UTF-8?q?te=E6=AF=94=E8=BE=83=E7=89=B9=E6=AE=8A=EF=BC=8C=E5=AE=83?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=98=AF=E6=8F=92=E4=BB=B6=E5=8F=98=E5=8A=A8?= =?UTF-8?q?=E7=9A=84=E7=9B=91=E5=90=AC=E5=92=8CStableFactory=E7=9A=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=80=85=EF=BC=8C=E9=9C=80=E8=A6=81=E5=86=8D?= =?UTF-8?q?=E8=80=83=E8=99=91=E5=A6=82=E4=BD=95=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginConstants.java | 15 --------------- .../src/com/fr/design/extra/PluginHelper.java | 1 + .../plugindependence/DownLoadDependenceUI.java | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 designer_base/src/com/fr/design/extra/PluginConstants.java diff --git a/designer_base/src/com/fr/design/extra/PluginConstants.java b/designer_base/src/com/fr/design/extra/PluginConstants.java deleted file mode 100644 index 4704ed129a..0000000000 --- a/designer_base/src/com/fr/design/extra/PluginConstants.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.fr.design.extra; - -/** - * @author richie - * @date 2015-03-11 - * @since 8.0 - */ -public class PluginConstants { - - - public static final int BYTES_NUM = 1024; - - - -} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index ecaa34ea00..3248df0b48 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -7,6 +7,7 @@ import com.fr.design.extra.plugindependence.DownLoadDependenceUI; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.plugin.Plugin; +import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginManagerHelper; import com.fr.plugin.dependence.PluginDependence; diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 958d8d160e..8fa4f6c31c 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -1,13 +1,13 @@ package com.fr.design.extra.plugindependence; import com.fr.base.FRContext; -import com.fr.design.extra.PluginConstants; import com.fr.design.extra.PluginHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; +import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.dependence.PluginDependenceException; import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.StableUtils; From f505360f9f46b7967e1b2d279d3a8c905cb19241 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Fri, 2 Dec 2016 11:18:32 +0800 Subject: [PATCH 04/22] PMD --- .../design/extra/plugindependence/DownLoadDependenceUI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 8fa4f6c31c..abb52e2493 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -40,8 +40,9 @@ public class DownLoadDependenceUI implements ActionListener { private boolean flag = true; // 定义加载窗口大小 - private final int LOAD_WIDTH = 455; - private final int LOAD_HEIGHT = 295; + private static final int LOAD_WIDTH = 455; + + private static final int LOAD_HEIGHT = 295; //安装环境相关信息 private String currentID; From 287ad1a53e16a470861aa8bc8bef1d9a94853841 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Fri, 2 Dec 2016 16:53:08 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9Env=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8F=92=E4=BB=B6plugin.xml=E8=B7=AF=E5=BE=84=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E3=80=82=20=E4=BF=AE=E6=94=B9Plugin=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E4=BE=9D=E8=B5=96=E7=9A=84=E6=96=B9=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E5=8F=AF=E4=BB=A5=E8=AF=BB=E5=8F=96=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E4=BE=9D=E8=B5=96=20=E7=BB=99=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9A=84=E7=AE=A1=E7=90=86=E5=99=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=8E=AF=E5=A2=83=E5=88=87=E6=8D=A2=E7=9B=91=E5=90=AC?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=BD=93=E7=8E=AF=E5=A2=83=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E4=BB=A5=E5=90=8C=E6=AD=A5=E7=9A=84=E5=8E=BB?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=80=A7=E8=83=BD=E6=8F=92=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a4fa529180..11edf2948c 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2069,9 +2069,9 @@ public class RemoteEnv implements Env { * * @param plugin */ - public File getPluginFilePath(Plugin plugin) { + public String getPluginFilePath(Plugin plugin) { - return null; + return StringUtils.EMPTY; } public void readPluginLicenses() throws Exception { From 6fe979c0c94a1e7f5f58262bfd3e451a59f784b1 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Mon, 5 Dec 2016 17:06:14 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E6=95=B4=E5=90=88pdfstram=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=88=B0=E6=80=A7=E8=83=BD=E6=8F=92=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/export/AbstractExportAction.java | 3 +-- .../com/fr/design/actions/file/export/PDFExportAction.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java index 0c6f0c8ed0..a5f8fdc0fe 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -5,7 +5,6 @@ package com.fr.design.actions.file.export; import com.fr.base.FRContext; import com.fr.base.Parameter; -import com.fr.io.exporter.pdfstream.PDFStreamExporter; import com.fr.page.PageSetProvider; import com.fr.design.actions.JWorkBookAction; import com.fr.design.gui.iprogressbar.FRProgressBar; @@ -140,7 +139,7 @@ public abstract class AbstractExportAction extends JWorkBookAction { if (exporter instanceof AppExporter) { AppExporter appExporter = (AppExporter) exporter; if (exporter instanceof ExcelExporter || exporter instanceof CSVExporter - || exporter instanceof PDFExporter || exporter instanceof PDFStreamExporter || exporter instanceof WordExporter) { + || exporter instanceof PDFExporterProcessor || exporter instanceof WordExporter) { ReportHelper.clearFormulaResult(tpl);// 清空rpt中的公式计算结果 appExporter.export(fileOutputStream, tpl.execute(parameterMap, ActorFactory.getActor(ActorConstants.TYPE_PAGE) diff --git a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java index 64cf5dabf5..6016699e64 100644 --- a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java @@ -9,8 +9,7 @@ import com.fr.design.menu.KeySetUtils; import com.fr.file.filter.ChooseFileFilter; import com.fr.general.Inter; import com.fr.io.exporter.Exporter; -import com.fr.io.exporter.PDFExporter; -import com.fr.io.exporter.pdfstream.PDFStreamExporter; +import com.fr.web.core.reserve.PDFExporterFactory; /** * Export pdf @@ -29,7 +28,8 @@ public class PDFExportAction extends AbstractExportAction { @Override protected Exporter getExporter() { - return new PDFStreamExporter(); + + return PDFExporterFactory.getPDFExporter(); } @Override From 8b227714c0d28c623007ab13c3a6624d840c450f Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 10:08:38 +0800 Subject: [PATCH 07/22] PMD --- .../DownLoadDependenceUI.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index abb52e2493..29097a5eea 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -2,16 +2,17 @@ package com.fr.design.extra.plugindependence; import com.fr.base.FRContext; import com.fr.design.extra.PluginHelper; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.DesignerContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.dependence.PluginDependenceException; import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; +import com.fr.stable.plugin.PluginConstants; import javax.swing.*; import java.awt.*; @@ -20,7 +21,9 @@ import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; -import java.io.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; import java.net.HttpURLConnection; import java.util.List; @@ -42,8 +45,11 @@ public class DownLoadDependenceUI implements ActionListener { // 定义加载窗口大小 private static final int LOAD_WIDTH = 455; + private static final int INCIDENT_WIDTH = 15; + private static final int LOAD_HEIGHT = 295; + //安装环境相关信息 private String currentID; private List list = null; @@ -69,8 +75,8 @@ public class DownLoadDependenceUI implements ActionListener { // 创建标签,并在标签上放置一张图片 BufferedImage image = IOUtils.readImage("/com/fr/design/extra/plugindependence/image/background.png"); ImageIcon imageIcon = new ImageIcon(image); - label = new JLabel(imageIcon); - label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT - 15); + label = new UILabel(imageIcon); + label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT - INCIDENT_WIDTH); progressbar = new JProgressBar(); // 显示当前进度值信息 @@ -81,7 +87,7 @@ public class DownLoadDependenceUI implements ActionListener { progressbar.setForeground(new Color(0x38aef5)); // 设置进度条的背景色 progressbar.setBackground(new Color(188, 190, 194)); - progressbar.setBounds(0, LOAD_HEIGHT - 15, LOAD_WIDTH, 15); + progressbar.setBounds(0, LOAD_HEIGHT - INCIDENT_WIDTH, LOAD_WIDTH, INCIDENT_WIDTH); progressbar.setMinimum(0); progressbar.setMaximum(totalSize); progressbar.setValue(0); @@ -250,7 +256,8 @@ public class DownLoadDependenceUI implements ActionListener { } public void installOnline()throws PluginDependenceException { - int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_Plugin") + Inter.getLocText("FR-Designer-Need") + Inter.getLocText("FR-Designer-Dependence") + Inter.getLocText("FR-Designer-Support") + "," + Inter.getLocText("FR-Designer-Dependence_Need_Install") + "(" + showFileLength() + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION); + + int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_DownLoadMessage", showFileLength()), "install tooltip", JOptionPane.YES_NO_OPTION); if (choose == 0) {//下载安装 if (!connectToServer()) { throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error")); From 15e063aa96f9247c0be2832076d74e133eb724f4 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 11:39:08 +0800 Subject: [PATCH 08/22] PDM --- .../actions/file/export/AbstractExportAction.java | 10 +++++----- .../fr/design/actions/file/export/PDFExportAction.java | 2 +- .../actions/EmbeddedFormExportExportAction.java | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java index a5f8fdc0fe..e80e75fb9b 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -93,10 +93,10 @@ public abstract class AbstractExportAction extends JWorkBookAction { FRLogger.getLogger().error("Error In Make New File"); } fileChooserPane = null; - FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("Prepare_Export") + "!"); + FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("FR-Designer_Prepare_Export") + "!"); (progressbar = new FRProgressBar(createExportWork(file, tpl, parameterMap), designerFrame, - Inter.getLocText("Exporting"), "", 0, 100)).start(); + Inter.getLocText("FR-Designer_Exporting"), "", 0, 100)).start(); } } @@ -116,13 +116,13 @@ public abstract class AbstractExportAction extends JWorkBookAction { fileOutputStream.close(); this.setProgress(100); - FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("Finish_Export") + "!"); + FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!"); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Inter.getLocText("Exported_successfully") + "\n" + filePath); + Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath); } catch (Exception exp) { this.setProgress(100); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Export_failed") + "\n" + filePath); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Export_failed") + "\n" + filePath); } return null; } diff --git a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java index 6016699e64..15082031b8 100644 --- a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java @@ -34,7 +34,7 @@ public class PDFExportAction extends AbstractExportAction { @Override protected ChooseFileFilter getChooseFileFilter() { - return new ChooseFileFilter(new String[]{"pdf"}, Inter.getLocText("Export-PDF")); + return new ChooseFileFilter(new String[]{"pdf"}, Inter.getLocText("FR-Designer_Export-PDF")); } @Override diff --git a/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java b/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java index 4d4a3b7e40..20c44f65dd 100644 --- a/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java +++ b/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java @@ -87,10 +87,10 @@ public class EmbeddedFormExportExportAction extends JTemplateAction{ FRLogger.getLogger().error("Error In Make New File"); } fileChooserPane = null; - FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("Prepare_Export") + "!"); + FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("FR-Designer_Prepare_Export") + "!"); (progressbar = new FRProgressBar(createExportWork(file, tpl, parameterMap), designerFrame, - Inter.getLocText("Exporting"), "", 0, 100)).start(); + Inter.getLocText("FR-Designer_Exporting"), "", 0, 100)).start(); } private boolean isOk(int saveValue){ @@ -136,13 +136,13 @@ public class EmbeddedFormExportExportAction extends JTemplateAction{ fileOutputStream.close(); this.setProgress(100); - FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("Finish_Export") + "!"); + FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!"); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Inter.getLocText("Exported_successfully") + "\n" + filePath); + Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath); } catch (Exception exp) { this.setProgress(100); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Export_failed") + "\n" + filePath); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Export_failed") + "\n" + filePath); } return null; } From 74abc8207edf0a1cb0bd8ffcec36ec07fe0ce397 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 16:26:45 +0800 Subject: [PATCH 09/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 3 ++- .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 3515be8f24..5d09ed95e8 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -25,6 +25,7 @@ import com.fr.general.*; import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginMessage; +import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; import com.fr.stable.fun.Authorize; @@ -85,7 +86,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); - if(rowChart == null) { + if(ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index 38034efd04..979be5c92a 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if (ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From f5db96ab730ea4d30eef605caa9fedf3f841b2ea Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 16:28:42 +0800 Subject: [PATCH 10/22] PMD --- designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 5d09ed95e8..58b2543dc7 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -164,7 +164,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); String imagePath = getIconPath(priority, plotID); - if (!StringUtils.isEmpty(imagePath)) { + if (StringUtils.isNotEmpty(imagePath)) { return imagePath; } } From 069129066ecbed65cdd85994a3dc1626b2d07f09 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Wed, 7 Dec 2016 21:15:17 +0800 Subject: [PATCH 11/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.performance.gradle | 76 +++++++++++++++++++ build.performance.gradle.bak | 86 ++++++++++++++++++++++ designer_base/build.performance.gradle | 69 +++++++++++++++++ designer_base/build.performance.gradle.bak | 71 ++++++++++++++++++ designer_chart/build.performance.gradle | 69 +++++++++++++++++ designer_form/build.performance.gradle | 69 +++++++++++++++++ designer_form/build.performance.gradle.bak | 69 +++++++++++++++++ 7 files changed, 509 insertions(+) create mode 100644 build.performance.gradle create mode 100644 build.performance.gradle.bak create mode 100644 designer_base/build.performance.gradle create mode 100644 designer_base/build.performance.gradle.bak create mode 100644 designer_chart/build.performance.gradle create mode 100644 designer_form/build.performance.gradle create mode 100644 designer_form/build.performance.gradle.bak diff --git a/build.performance.gradle b/build.performance.gradle new file mode 100644 index 0000000000..b49f2ef827 --- /dev/null +++ b/build.performance.gradle @@ -0,0 +1,76 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../" +def libDir="${basicDir}/lib" + +task appletJar<<{ + ant{ + mkdir(dir:"./tmp") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/core/build/classes/main") + fileset(dir:"${basicDir}/chart/build/classes/main") + fileset(dir:"${basicDir}/report/build/classes/main") + fileset(dir:"${basicDir}/platform/build/classes/main") + fileset(dir:"${basicDir}/performance/build/classes/main") + } + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"./tmp"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"./tmp") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak new file mode 100644 index 0000000000..1efdd55cc8 --- /dev/null +++ b/build.performance.gradle.bak @@ -0,0 +1,86 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"./tmp") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"./tmp"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"./tmp") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/designer_base/build.performance.gradle b/designer_base/build.performance.gradle new file mode 100644 index 0000000000..225b0e48d0 --- /dev/null +++ b/designer_base/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-core' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_base/build.performance.gradle.bak b/designer_base/build.performance.gradle.bak new file mode 100644 index 0000000000..c263e5c172 --- /dev/null +++ b/designer_base/build.performance.gradle.bak @@ -0,0 +1,71 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-core' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + +compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") + + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_chart/build.performance.gradle b/designer_chart/build.performance.gradle new file mode 100644 index 0000000000..7a57794c43 --- /dev/null +++ b/designer_chart/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle new file mode 100644 index 0000000000..63aaf0cf02 --- /dev/null +++ b/designer_form/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-report' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak new file mode 100644 index 0000000000..7a57794c43 --- /dev/null +++ b/designer_form/build.performance.gradle.bak @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + From 67f353aeb1cba7169ab4bfb45fa203ab9b0c7c4f Mon Sep 17 00:00:00 2001 From: sunmondong Date: Wed, 7 Dec 2016 22:03:01 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.performance.gradle | 2 +- designer_base/build.performance.gradle.bak | 8 +-- designer_chart/build.performance.gradle | 2 +- designer_chart/build.performance.gradle.bak | 69 +++++++++++++++++++++ designer_form/build.performance.gradle | 2 +- designer_form/build.performance.gradle.bak | 2 +- 6 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 designer_chart/build.performance.gradle.bak diff --git a/designer_base/build.performance.gradle b/designer_base/build.performance.gradle index 225b0e48d0..af0dc75f05 100644 --- a/designer_base/build.performance.gradle +++ b/designer_base/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_base/build.performance.gradle.bak b/designer_base/build.performance.gradle.bak index c263e5c172..225b0e48d0 100644 --- a/designer_base/build.performance.gradle.bak +++ b/designer_base/build.performance.gradle.bak @@ -32,10 +32,8 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ - -compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") - + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") testCompile 'junit:junit:4.12' } //复制非.java文件到classes文件夹下参与打包 @@ -54,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_chart/build.performance.gradle b/designer_chart/build.performance.gradle index 7a57794c43..c8f7e2ac3d 100644 --- a/designer_chart/build.performance.gradle +++ b/designer_chart/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_chart/build.performance.gradle.bak b/designer_chart/build.performance.gradle.bak new file mode 100644 index 0000000000..7a57794c43 --- /dev/null +++ b/designer_chart/build.performance.gradle.bak @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle index 63aaf0cf02..8d1c708777 100644 --- a/designer_form/build.performance.gradle +++ b/designer_form/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak index 7a57794c43..63aaf0cf02 100644 --- a/designer_form/build.performance.gradle.bak +++ b/designer_form/build.performance.gradle.bak @@ -9,7 +9,7 @@ sourceCompatibility=1.7 version='8.0' //生成jar包重命名 jar{ - baseName='fr-designer-chart' + baseName='fr-designer-report' } From 5d381d4fd58e4e9fc3bd4447e7655382c2ceae01 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Sat, 10 Dec 2016 18:47:20 +0800 Subject: [PATCH 13/22] no message --- build.performance.gradle | 2 +- build.performance.gradle.bak | 28 +++++++++------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/build.performance.gradle b/build.performance.gradle index b49f2ef827..58899a9c24 100644 --- a/build.performance.gradle +++ b/build.performance.gradle @@ -9,7 +9,7 @@ def libDir="${basicDir}/lib" task appletJar<<{ ant{ mkdir(dir:"./tmp") - mkdir(dir:"build/classes/") + mkdir(dir:"build/classes/main") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/core/build/classes/main") fileset(dir:"${basicDir}/chart/build/classes/main") diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak index 1efdd55cc8..b49f2ef827 100644 --- a/build.performance.gradle.bak +++ b/build.performance.gradle.bak @@ -3,32 +3,22 @@ tasks.withType(JavaCompile){ options.encoding = "UTF-8" } -def basicDir="../../" -def libDir="${basicDir}/finereport-lib-stable" -//获取什么分支名 -FileTree files =fileTree(dir:"./",include:"build.*.gradle") -def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) -def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) +def basicDir="../" +def libDir="${basicDir}/lib" task appletJar<<{ - ant{ mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ - fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") - + fileset(dir:"${basicDir}/core/build/classes/main") + fileset(dir:"${basicDir}/chart/build/classes/main") + fileset(dir:"${basicDir}/report/build/classes/main") + fileset(dir:"${basicDir}/platform/build/classes/main") + fileset(dir:"${basicDir}/performance/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") From 0d6e14c271c125519f774ecccac9254e2899df7c Mon Sep 17 00:00:00 2001 From: sunmondong Date: Sat, 10 Dec 2016 18:50:33 +0800 Subject: [PATCH 14/22] =?UTF-8?q?applet=E5=8E=BB=E9=99=A4performance?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.performance.gradle | 1 - build.performance.gradle.bak | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.performance.gradle b/build.performance.gradle index 58899a9c24..132db468fb 100644 --- a/build.performance.gradle +++ b/build.performance.gradle @@ -15,7 +15,6 @@ task appletJar<<{ fileset(dir:"${basicDir}/chart/build/classes/main") fileset(dir:"${basicDir}/report/build/classes/main") fileset(dir:"${basicDir}/platform/build/classes/main") - fileset(dir:"${basicDir}/performance/build/classes/main") } unjar(src:"${libDir}/3rd.jar",dest:"./tmp") unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak index b49f2ef827..58899a9c24 100644 --- a/build.performance.gradle.bak +++ b/build.performance.gradle.bak @@ -9,7 +9,7 @@ def libDir="${basicDir}/lib" task appletJar<<{ ant{ mkdir(dir:"./tmp") - mkdir(dir:"build/classes/") + mkdir(dir:"build/classes/main") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/core/build/classes/main") fileset(dir:"${basicDir}/chart/build/classes/main") From 0a1e4b4cf6b790c43874cf86653f67862096daa0 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 12 Dec 2016 09:49:47 +0800 Subject: [PATCH 15/22] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.dev.gradle | 2 +- designer_form/build.dev.gradle.bak | 2 +- designer_form/build.performance.gradle | 3 ++- designer_form/build.performance.gradle.bak | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_form/build.dev.gradle b/designer_form/build.dev.gradle index 2b727caac9..20dc49a335 100644 --- a/designer_form/build.dev.gradle +++ b/designer_form/build.dev.gradle @@ -20,7 +20,7 @@ sourceSets{ main{ java{ srcDirs=["${srcDir}/src", -"${srcDir}/../designer/src"] + "${srcDir}/../designer/src"] } } } diff --git a/designer_form/build.dev.gradle.bak b/designer_form/build.dev.gradle.bak index 24ee9430a9..2b727caac9 100644 --- a/designer_form/build.dev.gradle.bak +++ b/designer_form/build.dev.gradle.bak @@ -34,7 +34,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //显示依赖jar包 FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") f.each{File file-> - println "----${f.path}" + println "----${file.path}" } //声明外部依赖 diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle index 8d1c708777..5c14f78a49 100644 --- a/designer_form/build.performance.gradle +++ b/designer_form/build.performance.gradle @@ -20,7 +20,8 @@ def baseDir=".." sourceSets{ main{ java{ - srcDirs=["${srcDir}/src"] + srcDirs=["${srcDir}/src", + "${srcDir}/../designer/src"] } } } diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak index 63aaf0cf02..8d1c708777 100644 --- a/designer_form/build.performance.gradle.bak +++ b/designer_form/build.performance.gradle.bak @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ From 618303fd74370a476ff8156585a18c7cf5ec8fe6 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 15 Dec 2016 09:30:55 +0800 Subject: [PATCH 16/22] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 +++ .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_ja_JP.properties | 3 +++ .../src/com/fr/design/locale/designer_ko_KR.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_TW.properties | 3 +++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 8827ff7929..65c4aac8cf 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -487,3 +487,6 @@ FR-Designer-LayerPageReport_PageQuery= FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer_Event= FR-Designer_Properties= +FR-Designer_Export_failed=Export failed +FR-Designer_Exported_successfully=Exported successfully +FR-Designer_Exporting=Exporting diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 6562f726af..ee654f73d6 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -486,3 +486,6 @@ FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event FR-Designer_Properties=Properties +FR-Designer_Export_failed=Export failed +FR-Designer_Exported_successfully=Exported successfully +FR-Designer_Exporting=Exporting diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 4ab48d0e6b..df2a8623dd 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -466,3 +466,6 @@ FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C FR-Designer_Event=\ FR-Designer_Properties=FR-Designer_Properties=\ \ +FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F +FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F +FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 64bee79036..9a0829387d 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -460,4 +460,7 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer_Event=\ -FR-Designer_Properties=\ \ No newline at end of file +FR-Designer_Properties=\uFFFD +FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 +FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 +FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 738ec6cd1b..d33b654c6b 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -490,3 +490,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Properties=\u5C5E\u6027 +FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 +FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F +FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 74d7ea26d7..ec2460524b 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -478,3 +478,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Event=\u4E8B\u4EF6 +FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 +FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F +FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... From 8974e4eb3121aa2e0344a7bb33a81e5a2893d41a Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 15 Dec 2016 09:33:48 +0800 Subject: [PATCH 17/22] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 3 ++- .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 65c4aac8cf..89cacea3c5 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -490,3 +490,4 @@ FR-Designer_Properties= FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting +FR-Designer_Export-PDF=PDF diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index ee654f73d6..d126c968e8 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -489,3 +489,4 @@ FR-Designer_Properties=Properties FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting +FR-Designer_Export-PDF=PDF diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index df2a8623dd..3462043598 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -468,4 +468,5 @@ FR-Designer_Properties=FR-Designer_Properties=\ \ FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F -FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 \ No newline at end of file +FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 +FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 9a0829387d..28407cc871 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -463,4 +463,5 @@ FR-Designer_Event=\ FR-Designer_Properties=\uFFFD FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 -FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 \ No newline at end of file +FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 +FR-Designer_Export-PDF=PDF\uC11C\uC2DD \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index d33b654c6b..0a8dfac915 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -493,3 +493,4 @@ FR-Designer_Properties=\u5C5E\u6027 FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA +FR-Designer_Export-PDF=PDF\u683C\u5F0F diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index ec2460524b..0535762f9c 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -481,3 +481,4 @@ FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... +FR-Designer_Export-PDF=PDF\u683C\u5F0F From 08220632e4f0150d54a54df9e827d595f9dbc8f5 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 16:38:36 +0800 Subject: [PATCH 18/22] =?UTF-8?q?calculator=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java | 2 +- .../com/fr/design/data/datapane/preview/PreviewTableModel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java b/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java index acd192b86e..922aa4a1c6 100644 --- a/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java +++ b/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java @@ -52,7 +52,7 @@ public class WorkBookModelAdapter extends DesignModelAdapter list = new java.util.ArrayList(); java.util.Iterator nameIt = this.getBook().getTableDataNameIterator(); while (nameIt.hasNext()) { diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index d7918609c1..4949661d01 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -50,7 +50,7 @@ public class PreviewTableModel extends AbstractTableModel { maxRowCount = rowCount; } final int finalRowCount = maxRowCount; - DataModel dm = new DataModel() { + DataModel dm = new AbstractDataModel() { @Override public void release() throws Exception { From 531af20825f700a5dd37f921cb4fab772b15abf3 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 18:09:03 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/preview/PreviewTableModel.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index 4949661d01..0580aee093 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -100,7 +100,7 @@ public class PreviewTableModel extends AbstractTableModel { } catch (TableDataException e) { FRContext.getLogger().error(e.getMessage(), e); DesignUtils.errorMessage(e.getMessage()); - return Inter.getLocText("Error"); + return Inter.getLocText("FR-Designer_Error"); } } @@ -166,7 +166,7 @@ public class PreviewTableModel extends AbstractTableModel { private String checkType(int column) { if (dateIndexs.contain(column)) { - String s = Inter.getLocText("Date"); + String s = Inter.getLocText("FR-Designer_Date"); return ("(" + s + ")"); } @@ -187,23 +187,23 @@ public class PreviewTableModel extends AbstractTableModel { if (o == null) { s = "?"; } else if (o instanceof String) { - s = Inter.getLocText("Parameter-String"); + s = Inter.getLocText("FR-Designer_Parameter_String"); if (FRContext.getCurrentEnv() instanceof RemoteEnv && dataModel instanceof EmbeddedTDDataModel) { Class clzz = ((EmbeddedTDDataModel) dataModel).getColumnClass(column); if (Number.class.isAssignableFrom(clzz)) { - s = Inter.getLocText("Number");//bigdecimal + s = Inter.getLocText("FR-Designer_Number");//bigdecimal } else if (java.sql.Date.class.isAssignableFrom(clzz)) { - s = Inter.getLocText("Date"); + s = Inter.getLocText("FR-Designer_Date"); } } } else if (o instanceof Integer) { - s = Inter.getLocText("Integer"); + s = Inter.getLocText("FR-Designer_Integer"); } else if (o instanceof Double || o instanceof Float) { - s = Inter.getLocText("Double"); + s = Inter.getLocText("FR-Designer_Double"); } else if (o instanceof java.sql.Date || o instanceof java.util.Date) { - s = Inter.getLocText("Date"); + s = Inter.getLocText("FR-Designer_Date"); } else if (o instanceof Number) { - s = Inter.getLocText("Number");//bigdecimal + s = Inter.getLocText("FR-Designer_Number");//bigdecimal } else { s = "?"; } From 3baecb853541768efb591deeebc8322add8b2054 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 18:11:34 +0800 Subject: [PATCH 20/22] 1 --- .../com/fr/design/data/datapane/preview/PreviewTableModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index 0580aee093..9cd3d60348 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -149,7 +149,7 @@ public class PreviewTableModel extends AbstractTableModel { } public String getColumnName(int column) { - return Inter.getLocText("Error"); + return Inter.getLocText("FR-Designer_Error"); } public int getColumnCount() { From e5cd4f7471d51dfa7bec950245f37b2b689a9384 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 22 Dec 2016 17:21:06 +0800 Subject: [PATCH 21/22] object instance --- designer/src/com/fr/design/actions/cell/NewPresentAction.java | 2 +- designer_form/src/com/fr/design/designer/creator/XCreator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/NewPresentAction.java b/designer/src/com/fr/design/actions/cell/NewPresentAction.java index a35333d616..5f3d4b563a 100644 --- a/designer/src/com/fr/design/actions/cell/NewPresentAction.java +++ b/designer/src/com/fr/design/actions/cell/NewPresentAction.java @@ -73,7 +73,7 @@ public class NewPresentAction extends PresentCheckBoxAction { try { Class clazz = GeneralUtils.classForName(itemName); if (itemName.equals(currentPresent.getClass().getName())) { - return StableUtils.classInstanceOf(currentPresent.getClass(), clazz); + return StableUtils.objectInstanceOf(currentPresent, clazz); } } catch (Exception e) { return "NOPRESENT".equals(itemName) && currentPresent == null; diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index ed692cd428..411f3c9eab 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -426,7 +426,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo */ public boolean acceptType(Class... acceptTypes) { for (Class type : acceptTypes) { - if (StableUtils.classInstanceOf(this.getClass(), type)) { + if (StableUtils.objectInstanceOf(this, type)) { return true; } } From 16836bcceed76907c629fd2caf57a50834abe640 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 22 Dec 2016 17:39:46 +0800 Subject: [PATCH 22/22] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/actions/cell/NewPresentAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/actions/cell/NewPresentAction.java b/designer/src/com/fr/design/actions/cell/NewPresentAction.java index 5f3d4b563a..ac9fef4721 100644 --- a/designer/src/com/fr/design/actions/cell/NewPresentAction.java +++ b/designer/src/com/fr/design/actions/cell/NewPresentAction.java @@ -26,7 +26,7 @@ public class NewPresentAction extends PresentCheckBoxAction { @Override public boolean executeActionReturnUndoRecordNeeded() { if (!ComparatorUtils.equals(this.itemName, "NOPRESENT")) { - CellElementPropertyPane.getInstance().GoToPane(Inter.getLocText("Present"), this.itemName); + CellElementPropertyPane.getInstance().GoToPane(Inter.getLocText("FR-Designer_Present"), this.itemName); } else { TemplateCellElement ce = getSelectedCellElement(); // 只有原来ce设置了形态的情况下才有undo操作