From e30cc7581b9cebe115c0f93cb3e9ce48453a3e7f Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 16 Apr 2018 14:42:48 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-7500=20=E3=80=9010.0=E4=B8=80?= =?UTF-8?q?=E8=BD=AE=E8=BF=AD=E4=BB=A3=E3=80=9110.0=20exe=E5=86=85?= =?UTF-8?q?=E7=BD=AEtomcat=E7=BC=96=E7=A0=81=E6=96=B9=E5=BC=8F=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E4=BF=AE=E6=94=B9=E4=B8=BAUTF-8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/server/TomcatHost.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_base/src/com/fr/start/server/TomcatHost.java b/designer_base/src/com/fr/start/server/TomcatHost.java index 288975104..c8a3c0a92 100644 --- a/designer_base/src/com/fr/start/server/TomcatHost.java +++ b/designer_base/src/com/fr/start/server/TomcatHost.java @@ -71,6 +71,7 @@ public class TomcatHost { this.listener = new AprLifecycleListener(); this.server.addLifecycleListener(listener); this.tomcat.getHost().setAppBase(StableUtils.getInstallHome() + File.separator + "."); + this.tomcat.getConnector().setURIEncoding("UTF-8"); } catch (Exception e) { //todo 最好加一个用server.xml FRContext.getLogger().error(e.getMessage(), e); From 48b0e25fbf0224edac1d0cb70fde4e746738b8da Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 16 Apr 2018 15:44:13 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-7689=20=E9=A2=84=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B2=A1=E5=8A=9E=E6=B3=95=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/style/FormatPane.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/designer_base/src/com/fr/design/style/FormatPane.java b/designer_base/src/com/fr/design/style/FormatPane.java index 59e3cda2f..5b642bdb4 100644 --- a/designer_base/src/com/fr/design/style/FormatPane.java +++ b/designer_base/src/com/fr/design/style/FormatPane.java @@ -3,15 +3,20 @@ */ package com.fr.design.style; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.FlowLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.text.DecimalFormat; -import java.text.Format; -import java.text.SimpleDateFormat; -import java.util.Date; +import com.fr.base.FRContext; +import com.fr.base.TextFormat; +import com.fr.data.core.FormatField; +import com.fr.data.core.FormatField.FormatContents; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; @@ -25,21 +30,15 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; - -import com.fr.base.FRContext; -import com.fr.base.TextFormat; -import com.fr.data.core.FormatField; -import com.fr.data.core.FormatField.FormatContents; -import com.fr.design.gui.ibutton.UIRadioButton; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.dialog.BasicPane; -import com.fr.general.ComparatorUtils; -import com.fr.general.Inter; -import com.fr.stable.ArrayUtils; -import com.fr.stable.StringUtils; -import com.fr.design.utils.gui.GUICoreUtils; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.DecimalFormat; +import java.text.Format; +import java.text.SimpleDateFormat; +import java.util.Date; /** * 属性界面中的格式面板 @@ -316,6 +315,9 @@ public class FormatPane extends BasicPane { */ public Format update() { String text = patternTextField.getText(); + if (getFormatContents() == FormatContents.TEXT) { + return FormatField.getInstance().getFormat(getFormatContents(), text); + } if(StringUtils.isEmpty(text)) { return null; } From 7393027f4db8372fc7580d68fcb788c5b6edbd44 Mon Sep 17 00:00:00 2001 From: ju Date: Mon, 16 Apr 2018 17:20:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/module/DesignerStartup.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/start/module/DesignerStartup.java b/designer/src/com/fr/start/module/DesignerStartup.java index 9abb23dfe..315ccc763 100644 --- a/designer/src/com/fr/start/module/DesignerStartup.java +++ b/designer/src/com/fr/start/module/DesignerStartup.java @@ -26,12 +26,13 @@ public class DesignerStartup extends Activator { @Override public void start() { - - startSub(PreStartActivator.class); - + if (checkMultiStart()) { return; } + + startSub(PreStartActivator.class); + //启动基础部分 startSub(BasicActivator.class); //启动画面 From 4777f44fb372da892dc1451de2cdce2c9f805094 Mon Sep 17 00:00:00 2001 From: ju Date: Tue, 17 Apr 2018 14:47:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-7707=20=E3=80=9010.0=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E4=B8=80=E8=BD=AE=E3=80=91=E5=B7=A5=E5=85=B7=E6=A0=8F?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E5=9B=BE=E6=A0=87=E9=83=BD=E6=B2=A1=E4=BA=86?= =?UTF-8?q?=20=E9=A1=BA=E4=BE=BF=E6=94=B9=E5=87=A0=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/StartServer.java | 4 ++-- .../src/com/fr/van/chart/map/server/ChartMapEditorAction.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/start/StartServer.java b/designer_base/src/com/fr/start/StartServer.java index af86fc409..c2e31353d 100644 --- a/designer_base/src/com/fr/start/StartServer.java +++ b/designer_base/src/com/fr/start/StartServer.java @@ -55,7 +55,7 @@ public class StartServer { } if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用 String web = GeneralContext.getCurrentAppNameOfEnv(); - browserURLWithLocalEnv("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getServletName()); + browserURLWithLocalEnv("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getDecisionServletName()); return; } DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); @@ -102,7 +102,7 @@ public class StartServer { } finally { //先访问Demo, 后访问报表, 不需要重置服务器. NEED_LOAD_ENV = false; - browser("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + ProjectConstants.WEBAPP_NAME + "/" + ServerConfig.getInstance().getServletName()); + browser("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + ProjectConstants.WEBAPP_NAME + "/" + ServerConfig.getInstance().getDecisionServletName()); } } diff --git a/designer_chart/src/com/fr/van/chart/map/server/ChartMapEditorAction.java b/designer_chart/src/com/fr/van/chart/map/server/ChartMapEditorAction.java index 10ccfdb6b..9c8096cde 100644 --- a/designer_chart/src/com/fr/van/chart/map/server/ChartMapEditorAction.java +++ b/designer_chart/src/com/fr/van/chart/map/server/ChartMapEditorAction.java @@ -25,7 +25,7 @@ public class ChartMapEditorAction extends UpdateAction { public void actionPerformed(ActionEvent evt) { int port = DesignerEnvManager.getEnvManager().getJettyServerPort(); String web = GeneralContext.getCurrentAppNameOfEnv(); - String serverlet = ServerConfig.getInstance().getServletMapping(); + String serverlet = ServerConfig.getInstance().getReportServletName(); Env env = FRContext.getCurrentEnv(); StartServer.browserURLWithLocalEnv(env.isLocalEnv() ? String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet) : env.getPath() + "?op=map"); } From f094c9f299a86f29e37e7f096b218a864b654379 Mon Sep 17 00:00:00 2001 From: ju Date: Tue, 17 Apr 2018 15:15:38 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-7707=20=E3=80=9010.0=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E4=B8=80=E8=BD=AE=E3=80=91=E5=B7=A5=E5=85=B7=E6=A0=8F?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E5=9B=BE=E6=A0=87=E9=83=BD=E6=B2=A1=E4=BA=86?= =?UTF-8?q?=20=E9=A1=BA=E4=BE=BF=E6=94=B9=E5=87=A0=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/StartServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/start/StartServer.java b/designer_base/src/com/fr/start/StartServer.java index c2e31353d..af86fc409 100644 --- a/designer_base/src/com/fr/start/StartServer.java +++ b/designer_base/src/com/fr/start/StartServer.java @@ -55,7 +55,7 @@ public class StartServer { } if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用 String web = GeneralContext.getCurrentAppNameOfEnv(); - browserURLWithLocalEnv("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getDecisionServletName()); + browserURLWithLocalEnv("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getServletName()); return; } DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); @@ -102,7 +102,7 @@ public class StartServer { } finally { //先访问Demo, 后访问报表, 不需要重置服务器. NEED_LOAD_ENV = false; - browser("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + ProjectConstants.WEBAPP_NAME + "/" + ServerConfig.getInstance().getDecisionServletName()); + browser("http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + ProjectConstants.WEBAPP_NAME + "/" + ServerConfig.getInstance().getServletName()); } } From a52503737ad60ac7808b34ddc2ac1cdd31ea85ef Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 17 Apr 2018 20:41:00 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=2010.0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=B0=83=E8=AF=95=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E8=AE=BE=E7=BD=AE=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=9C=A8=E8=AE=BE=E7=BD=AEbuildfile=E4=B9=8B?= =?UTF-8?q?=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/start/module/DesignerStartup.java | 63 ++----------------- .../fr/start/module/PreStartActivator.java | 57 +++++++++++++++-- 2 files changed, 58 insertions(+), 62 deletions(-) diff --git a/designer/src/com/fr/start/module/DesignerStartup.java b/designer/src/com/fr/start/module/DesignerStartup.java index 315ccc763..dd2b09c53 100644 --- a/designer/src/com/fr/start/module/DesignerStartup.java +++ b/designer/src/com/fr/start/module/DesignerStartup.java @@ -1,11 +1,7 @@ package com.fr.start.module; -import com.fr.design.DesignerEnvManager; -import com.fr.design.utils.DesignUtils; -import com.fr.general.ComparatorUtils; import com.fr.module.Activator; import com.fr.stable.CoreActivator; -import com.fr.stable.ProductConstants; import com.fr.stable.module.ModuleListener; import com.fr.start.Designer; import com.fr.start.EnvSwitcher; @@ -13,26 +9,15 @@ import com.fr.start.ReportSplashPane; import com.fr.start.SplashWindow; import com.fr.startup.activators.BasicActivator; -import java.io.File; - /** * Created by juhaoyu on 2018/1/8. */ public class DesignerStartup extends Activator { - - private static final int MESSAGE_PORT = 51462; - - private static final int DEBUG_PORT = 51463; - + @Override public void start() { - - if (checkMultiStart()) { - return; - } - + startSub(PreStartActivator.class); - //启动基础部分 startSub(BasicActivator.class); //启动画面 @@ -52,53 +37,17 @@ public class DesignerStartup extends Activator { splashWindow.dispose(); startSub(StartFinishActivator.class); } - + private SplashWindow createSplashWindow() { - + ReportSplashPane reportSplashPane = new ReportSplashPane(); SplashWindow splashWindow = new SplashWindow(reportSplashPane); getModule().setSingleton(ModuleListener.class, reportSplashPane.getModuleListener()); return splashWindow; } - - private boolean checkMultiStart() { - - if (isDebug()) { - setDebugEnv(); - } else { - DesignUtils.setPort(getStartPort()); - } - // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 - if (DesignUtils.isStarted()) { - DesignUtils.clientSend(getModule().upFindSingleton(StartupArgs.class).get()); - return true; - } - return false; - } - - private int getStartPort() { - - return MESSAGE_PORT; - } - - - //在VM options里加入-Ddebug=true激活 - private boolean isDebug() { - - return ComparatorUtils.equals("true", System.getProperty("debug")); - } - - - //端口改一下,环境配置文件改一下。便于启动两个设计器,进行对比调试 - private void setDebugEnv() { - - DesignUtils.setPort(DEBUG_PORT); - DesignerEnvManager.setEnvFile(new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env_debug.xml")); - } - - + @Override public void stop() { - + } } diff --git a/designer/src/com/fr/start/module/PreStartActivator.java b/designer/src/com/fr/start/module/PreStartActivator.java index 9ef1af8dc..eba3996b1 100644 --- a/designer/src/com/fr/start/module/PreStartActivator.java +++ b/designer/src/com/fr/start/module/PreStartActivator.java @@ -3,32 +3,79 @@ package com.fr.start.module; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; +import com.fr.design.utils.DesignUtils; +import com.fr.general.ComparatorUtils; import com.fr.general.SiteCenter; import com.fr.module.Activator; import com.fr.stable.BuildContext; +import com.fr.stable.ProductConstants; + +import java.io.File; /** * Created by juhaoyu on 2018/1/8. */ public class PreStartActivator extends Activator { - + + private static final int MESSAGE_PORT = 51462; + + private static final int DEBUG_PORT = 51463; + @Override public void start() { - + RestartHelper.deleteRecordFilesWhenStart(); BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); SiteCenter.getInstance(); + if (checkMultiStart()) { + return; + } initLanguage(); } - + + private boolean checkMultiStart() { + + if (isDebug()) { + setDebugEnv(); + } else { + DesignUtils.setPort(getStartPort()); + } + // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 + if (DesignUtils.isStarted()) { + DesignUtils.clientSend(getModule().upFindSingleton(StartupArgs.class).get()); + return true; + } + return false; + } + + private int getStartPort() { + + return MESSAGE_PORT; + } + + + //在VM options里加入-Ddebug=true激活 + private boolean isDebug() { + + return ComparatorUtils.equals("true", System.getProperty("debug")); + } + + + //端口改一下,环境配置文件改一下。便于启动两个设计器,进行对比调试 + private void setDebugEnv() { + + DesignUtils.setPort(DEBUG_PORT); + DesignerEnvManager.setEnvFile(new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env_debug.xml")); + } + private void initLanguage() { //这两句的位置不能随便调换,因为会影响语言切换的问题 FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage()); DesignerEnvManager.checkNameEnvMap(); } - + @Override public void stop() { - + } }