From 068fe844e6ea29cffa702cf109008e050aa3cde3 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 8 Jun 2018 13:38:34 +0800 Subject: [PATCH 01/16] env --- .../src/com/fr/start/module/DesignerModuleActivator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java b/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java index 2855a45f4..a32ba54b2 100644 --- a/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java +++ b/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java @@ -1,5 +1,6 @@ package com.fr.start.module; +import com.fr.common.rpc.netty.RemoteCallClient; import com.fr.design.mainframe.loghandler.socketio.DesignerSocketIO; import com.fr.design.module.DesignerModule; import com.fr.general.ModuleContext; @@ -19,6 +20,7 @@ public class DesignerModuleActivator extends Activator implements Prepare { ModuleContext.startModule(DesignerModule.class.getName()); DesignerSocketIO.init(); + RemoteCallClient.getInstance(); } @Override From 5219c6e0d2ba2530fe4c5bd0ea02dc6b062f487c Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 8 Jun 2018 13:49:10 +0800 Subject: [PATCH 02/16] env --- designer-base/src/com/fr/env/RemoteEnv.java | 76 ++++++--------------- 1 file changed, 20 insertions(+), 56 deletions(-) diff --git a/designer-base/src/com/fr/env/RemoteEnv.java b/designer-base/src/com/fr/env/RemoteEnv.java index ffb42c122..2fbd34d41 100644 --- a/designer-base/src/com/fr/env/RemoteEnv.java +++ b/designer-base/src/com/fr/env/RemoteEnv.java @@ -8,7 +8,6 @@ import com.fr.base.remote.RemoteDeziConstants; import com.fr.common.rpc.RemoteCallServerConfig; import com.fr.common.rpc.netty.MessageSendExecutor; import com.fr.common.rpc.netty.RemoteCallClient; -import com.fr.core.env.EnvConstants; import com.fr.core.env.EnvContext; import com.fr.core.env.resource.RemoteEnvConfig; import com.fr.data.TableDataSource; @@ -27,7 +26,6 @@ import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.LogRecordTime; import com.fr.general.LogUtils; -import com.fr.general.http.HttpToolbox; import com.fr.io.utils.ResourceIOUtils; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -39,18 +37,15 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.Filter; import com.fr.stable.JavaCompileInfo; -import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.SvgProvider; import com.fr.stable.file.XMLFileManagerProvider; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLTools; -import com.fr.third.guava.base.Strings; -import com.fr.third.guava.collect.ImmutableMap; import com.fr.web.ResourceConstants; -import javax.swing.*; +import javax.swing.JOptionPane; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; @@ -58,7 +53,7 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import java.awt.*; +import java.awt.Component; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -75,8 +70,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import static com.fr.third.guava.base.Preconditions.checkArgument; - /** * @author null */ @@ -217,7 +210,13 @@ public class RemoteEnv extends AbstractEnv implements DesignAut * @throws Exception 异常 */ public boolean testServerConnection() throws Exception { - return testConnection(true, true, DesignerContext.getDesignerFrame()); + try { + connectOnce(); + return true; + } catch (Exception e) { + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_failed")); + return false; + } } /** @@ -228,7 +227,12 @@ public class RemoteEnv extends AbstractEnv implements DesignAut */ @Override public boolean testServerConnectionWithOutShowMessagePane() throws Exception { - return testConnection(false, true, DesignerContext.getDesignerFrame()); + try { + connectOnce(); + return true; + } catch (Exception e) { + return false; + } } /** @@ -239,55 +243,15 @@ public class RemoteEnv extends AbstractEnv implements DesignAut * @throws Exception 异常 */ public boolean testConnectionWithOutRegisteServer(Component messageParentPane) throws Exception { - return testConnection(true, false, messageParentPane); - } - - - private boolean testConnection(boolean needMessage, boolean isRegisteServer, Component parentComponent) throws Exception { - checkArgument(parentComponent instanceof Component, "parentComponent should be a java.awt.component"); - Component component = parentComponent; - String url = String.format("%s/connection", EnvConstants.toDecisionPath(getPath())); - ImmutableMap params = ImmutableMap.of( - "version", (Object) ProductConstants.DESIGNER_VERSION - ); - ImmutableMap headers = ImmutableMap.of( - EnvConstants.USERNAME, getUser(), - EnvConstants.PWD, getPassword()); - String res = HttpToolbox.post(url, params, headers); - if (Strings.isNullOrEmpty(res)) { - if (needMessage) { - JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); - } - return false; - } else if (ComparatorUtils.equals(res, "true")) { + try { + connectOnce(); return true; - } else { - if (ComparatorUtils.equals(res, EnvConstants.AUTH_ERROR)) { - JOptionPane.showMessageDialog(component, - Inter.getLocText(new String[]{"Datasource-Connection_failed", "Registration-User_Name", "Password", "Error"}, new String[]{",", "", "", "!"}) - , Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); - return false; - } else { - if (ComparatorUtils.equals(res, EnvConstants.WAR_ERROR)) { - if (needMessage) { - JOptionPane.showMessageDialog(component, Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); - } else { - FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); - } - return false; - } else { - if (needMessage) { - JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); - } else { - FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "Version-does-not-support"}, new String[]{",", "!"})); - } - return false; - } - } + } catch (Exception e) { + JOptionPane.showMessageDialog(messageParentPane, Inter.getLocText("Datasource-Connection_failed")); + return false; } } - private void refreshHttpSProperty() { if (getPath().startsWith(HTTPS_PREFIX) && System.getProperty(CERT_KEY) == null) { DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); From ed0a5118faaa72345285ad9f5454cdc725e00d12 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 8 Jun 2018 16:57:15 +0800 Subject: [PATCH 03/16] env --- designer-base/src/com/fr/env/SignIn.java | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/designer-base/src/com/fr/env/SignIn.java b/designer-base/src/com/fr/env/SignIn.java index 902acdaf1..b76c67853 100644 --- a/designer-base/src/com/fr/env/SignIn.java +++ b/designer-base/src/com/fr/env/SignIn.java @@ -1,9 +1,15 @@ package com.fr.env; +import com.fr.base.operator.connect.ConnectOperator; +import com.fr.common.rpc.RemoteCallServerConfig; +import com.fr.common.rpc.netty.RemoteCallClient; +import com.fr.common.rpc.serialize.SerializeProtocol; import com.fr.core.env.EnvConfig; import com.fr.core.env.EnvContext; import com.fr.core.env.EnvEvent; +import com.fr.core.env.proxy.EnvMessageSendProxy; +import com.fr.core.env.resource.RemoteEnvConfig; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.DesignUtils; import com.fr.event.Event; @@ -12,8 +18,9 @@ import com.fr.event.Listener; import com.fr.event.Null; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.third.guava.reflect.Reflection; -import javax.swing.*; +import javax.swing.JOptionPane; public class SignIn { @@ -34,10 +41,26 @@ public class SignIn { * @throws Exception 异常 */ public static void signIn(EnvConfig selectedEnv) throws Exception { - + SerializeProtocol serializeProtocol = RemoteCallServerConfig.getInstance().getSerializeProtocol(); + if (EnvContext.currentEnv() != null && !ComparatorUtils.equals(EnvContext.currentEnv(), selectedEnv)) { EnvContext.signOut(); } + if (selectedEnv instanceof RemoteEnvConfig) { + RemoteCallClient.getInstance().load( + ((RemoteEnvConfig) selectedEnv).getHost(), + ((RemoteEnvConfig) selectedEnv).getPort(), + serializeProtocol); + } DesignUtils.switchToEnv(selectedEnv); } + + public static void main(String[] args) { + RemoteCallClient.getInstance().load( + "127.0.0.1", + 39999, + SerializeProtocol.KRYOSERIALIZE); + ConnectOperator connectOperator = Reflection.newProxy(ConnectOperator.class, new EnvMessageSendProxy()); + connectOperator.connect("1", "1"); + } } \ No newline at end of file From ef411f86d0f038e02d95e11cd1bdb04365152f43 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 15 Jun 2018 09:19:45 +0800 Subject: [PATCH 04/16] env --- designer-base/src/com/fr/env/RemoteEnv.java | 87 +++++++++++++++------ 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/designer-base/src/com/fr/env/RemoteEnv.java b/designer-base/src/com/fr/env/RemoteEnv.java index 1e76a6ac7..d5b10071d 100644 --- a/designer-base/src/com/fr/env/RemoteEnv.java +++ b/designer-base/src/com/fr/env/RemoteEnv.java @@ -9,6 +9,7 @@ import com.fr.base.remote.RemoteDeziConstants; import com.fr.common.rpc.RemoteCallServerConfig; import com.fr.common.rpc.netty.MessageSendExecutor; import com.fr.common.rpc.netty.RemoteCallClient; +import com.fr.core.env.EnvConstants; import com.fr.core.env.EnvContext; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.dav.AbstractEnv; @@ -22,7 +23,6 @@ import com.fr.general.ComparatorUtils; import com.fr.general.EnvProxyFactory; import com.fr.general.IOUtils; import com.fr.general.Inter; - import com.fr.general.http.HttpToolbox; import com.fr.io.utils.ResourceIOUtils; import com.fr.json.JSONArray; @@ -34,18 +34,16 @@ import com.fr.share.ShareConstants; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.Filter; - import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.SvgProvider; import com.fr.stable.project.ProjectConstants; - import com.fr.third.guava.base.Strings; import com.fr.third.guava.collect.ImmutableMap; import com.fr.web.ResourceConstants; -import javax.swing.JOptionPane; +import javax.swing.*; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; @@ -53,7 +51,6 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; - import java.awt.*; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -68,6 +65,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; +import static com.fr.third.guava.base.Preconditions.checkArgument; + /** * @author null */ @@ -109,15 +108,15 @@ public class RemoteEnv extends AbstractEnv implements DesignAut MessageSendExecutor.getInstance().stop(); return true; } - + @Override public EnvProxyFactory getProxyFactory() { - + return new EnvProxyFactory() { - + @Override public T get(Class clazz, T obj) { - + assert clazz != null; try { return MessageSendExecutor.getInstance().execute(clazz); @@ -127,10 +126,10 @@ public class RemoteEnv extends AbstractEnv implements DesignAut } }; } - + @Override public FileOperator getFileOperator() throws Exception { - + return MessageSendExecutor.getInstance().execute(FileOperator.class); } @@ -143,7 +142,7 @@ public class RemoteEnv extends AbstractEnv implements DesignAut public OrganizationOperator getOrganizationOperator() throws Exception { return MessageSendExecutor.getInstance().execute(OrganizationOperator.class); } - + @Override public RemoteEnvConfig getEnvConfig() { return config; @@ -254,12 +253,7 @@ public class RemoteEnv extends AbstractEnv implements DesignAut */ @Override public boolean testServerConnectionWithOutShowMessagePane() throws Exception { - try { - connectOnce(); - return true; - } catch (Exception e) { - return false; - } + return testConnection(false, true, DesignerContext.getDesignerFrame()); } /** @@ -270,15 +264,55 @@ public class RemoteEnv extends AbstractEnv implements DesignAut * @throws Exception 异常 */ public boolean testConnectionWithOutRegisteServer(Component messageParentPane) throws Exception { - try { - connectOnce(); - return true; - } catch (Exception e) { - JOptionPane.showMessageDialog(messageParentPane, Inter.getLocText("Datasource-Connection_failed")); + return testConnection(true, false, messageParentPane); + } + + + private boolean testConnection(boolean needMessage, boolean isRegisteServer, Component parentComponent) throws Exception { + checkArgument(parentComponent instanceof Component, "parentComponent should be a java.awt.component"); + Component component = parentComponent; + String url = String.format("%s/connection", EnvConstants.toDecisionPath(getPath())); + ImmutableMap params = ImmutableMap.of( + "version", (Object) ProductConstants.DESIGNER_VERSION + ); + ImmutableMap headers = ImmutableMap.of( + EnvConstants.USERNAME, getUser(), + EnvConstants.PWD, getPassword()); + String res = HttpToolbox.post(url, params, headers); + if (Strings.isNullOrEmpty(res)) { + if (needMessage) { + JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); + } return false; + } else if (ComparatorUtils.equals(res, "true")) { + return true; + } else { + if (ComparatorUtils.equals(res, EnvConstants.AUTH_ERROR)) { + JOptionPane.showMessageDialog(component, + Inter.getLocText(new String[]{"Datasource-Connection_failed", "Registration-User_Name", "Password", "Error"}, new String[]{",", "", "", "!"}) + , Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); + return false; + } else { + if (ComparatorUtils.equals(res, EnvConstants.WAR_ERROR)) { + if (needMessage) { + JOptionPane.showMessageDialog(component, Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); + } else { + FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); + } + return false; + } else { + if (needMessage) { + JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); + } else { + FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "Version-does-not-support"}, new String[]{",", "!"})); + } + return false; + } + } } } + private void refreshHttpSProperty() { if (getPath().startsWith(HTTPS_PREFIX) && System.getProperty(CERT_KEY) == null) { DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); @@ -409,8 +443,8 @@ public class RemoteEnv extends AbstractEnv implements DesignAut return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); } - - + + /** * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 * @@ -543,7 +577,8 @@ public class RemoteEnv extends AbstractEnv implements DesignAut */ @Override public String getWebReportPath() { - return getPath().substring(0, getPath().lastIndexOf("/")); + + return StableUtils.pathJoin(getPath(), getAppName()); } public String[] getProcedureColumns(StoreProcedure storeProcedure, Map parameterMap) throws Exception { From 4438e0f36b128dc9c50029d869220bdddabfbe47 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 21 Jun 2018 15:19:47 +0800 Subject: [PATCH 05/16] . --- designer-base/src/com/fr/env/SignIn.java | 43 ------------------- .../start/module/DesignerModuleActivator.java | 1 - 2 files changed, 44 deletions(-) delete mode 100644 designer-base/src/com/fr/env/SignIn.java diff --git a/designer-base/src/com/fr/env/SignIn.java b/designer-base/src/com/fr/env/SignIn.java deleted file mode 100644 index 3b36bf514..000000000 --- a/designer-base/src/com/fr/env/SignIn.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.fr.env; - - -import com.fr.base.Env; -import com.fr.base.FRContext; -import com.fr.core.env.EnvConfig; -import com.fr.core.env.EnvEvent; -import com.fr.design.mainframe.DesignerContext; -import com.fr.event.Event; -import com.fr.event.EventDispatcher; -import com.fr.event.Listener; -import com.fr.event.Null; -import com.fr.general.Inter; -import com.fr.stable.AssistUtils; - -import javax.swing.JOptionPane; - - -public class SignIn { - - static { - EventDispatcher.listen(EnvEvent.CONNECTION_ERROR, new Listener() { - @Override - public void on(Event event, Null param) { - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_failed")); - } - }); - } - - /** - * 注册入环境 - * - * @param selectedEnv 选择的环境 - * @throws Exception 异常 - */ - public static void signIn(EnvConfig selectedEnv) throws Exception { - Env env = FRContext.getCurrentEnv(); - if (env != null && AssistUtils.equals(env.getEnvConfig(), selectedEnv)) { - env.disconnect(); - } - //DesignUtils.switchToEnv(selectedEnv); - } -} \ No newline at end of file diff --git a/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java b/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java index 65dc90fff..3c3462b7f 100644 --- a/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java +++ b/designer-realize/src/com/fr/start/module/DesignerModuleActivator.java @@ -1,6 +1,5 @@ package com.fr.start.module; -import com.fr.common.rpc.netty.RemoteCallClient; import com.fr.design.mainframe.loghandler.socketio.DesignerSocketIO; import com.fr.design.module.ChartDesignerModule; import com.fr.design.module.DesignerModule; From b36a15e59d5278855a6d6c9c9193582d427468b3 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Jun 2018 15:29:31 +0800 Subject: [PATCH 06/16] REPORT-8933 --- .../com/fr/design/env/DesignerWorkspaceGenerator.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-base/src/com/fr/design/env/DesignerWorkspaceGenerator.java b/designer-base/src/com/fr/design/env/DesignerWorkspaceGenerator.java index b666b0f63..b7b550739 100644 --- a/designer-base/src/com/fr/design/env/DesignerWorkspaceGenerator.java +++ b/designer-base/src/com/fr/design/env/DesignerWorkspaceGenerator.java @@ -8,13 +8,13 @@ import com.fr.workspace.connect.WorkspaceClient; * 根据配置生成运行环境 */ public class DesignerWorkspaceGenerator { - + public static Workspace generate(DesignerWorkspaceInfo config) { - + if (config == null || config.getType() == null) { return null; } - + Workspace workspace = null; switch (config.getType()) { case Local: { @@ -23,7 +23,9 @@ public class DesignerWorkspaceGenerator { } case Remote: { WorkspaceClient client = WorkContext.getConnector().connect(config.getConnection()); - workspace = new RemoteWorkspace(client, config.getConnection()); + if (client != null) { + workspace = new RemoteWorkspace(client, config.getConnection()); + } break; } } From c7ceef3d658a5f8240020d9c38efc59425e2c757 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Jun 2018 15:31:49 +0800 Subject: [PATCH 07/16] . --- designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java b/designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java index 0db58dc36..c08f49d0c 100644 --- a/designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java +++ b/designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java @@ -114,7 +114,6 @@ public class SwitchExistEnv extends MenuDef { @Override public void fail() { - TemplatePane.getInstance().editItems(); JOptionPane.showMessageDialog( DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"M-SwitchWorkspace", "Failed"})); From 21f9dd2f30bf310f22fcc378785511651da9a387 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Jun 2018 15:35:15 +0800 Subject: [PATCH 08/16] . --- designer-base/pom.xml | 1 + designer-realize/pom.xml | 11 +++-------- pom.xml | 1 + 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/designer-base/pom.xml b/designer-base/pom.xml index f4588ede4..d97a42093 100644 --- a/designer-base/pom.xml +++ b/designer-base/pom.xml @@ -15,6 +15,7 @@ 0.7.0 + com.fr.report designer-base 10.0-RELEASE-SNAPSHOT \ No newline at end of file diff --git a/designer-realize/pom.xml b/designer-realize/pom.xml index 7fe12ff32..1e9d72c76 100644 --- a/designer-realize/pom.xml +++ b/designer-realize/pom.xml @@ -8,9 +8,10 @@ design 10.0-RELEASE-SNAPSHOT + com.fr.report designer-realize 10.0-RELEASE-SNAPSHOT - + com.fr.report designer-form @@ -21,11 +22,5 @@ designer-chart 10.0-RELEASE-SNAPSHOT - - com.fr.report - designer-base - 10.0-RELEASE-SNAPSHOT - compile - - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index c8b2ebc60..c3bed349c 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ designer-form designer-realize + com.fr.report design 10.0-RELEASE-SNAPSHOT pom From 4909e035c81a89e81bfe3a77c40d395242abfac9 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 28 Jun 2018 17:44:14 +0800 Subject: [PATCH 09/16] =?UTF-8?q?REPORT-9189=E3=80=9010.0=E4=B8=80?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E6=95=B0=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E6=9E=90=E4=B8=8B=E6=A8=A1=E6=9D=BF=E4=B8=80=E7=9B=B4=E5=9C=A8?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD,=20=E4=B8=8D=E9=9C=80=E8=A6=81=E8=AF=BB?= =?UTF-8?q?=E5=8F=96super=E9=87=8C=E7=9A=84tabledata.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index 51bba7487..74b36372b 100644 --- a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -120,7 +120,6 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { @Override public void readXML(XMLableReader reader) { - super.readXML(reader); readDesign(reader); } From ccfa66c79163fa646afac74517ce2f4b66fee57d Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 28 Jun 2018 18:23:50 +0800 Subject: [PATCH 10/16] =?UTF-8?q?CORE-101=20AOP=E5=9F=BA=E7=A1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/com/fr/start/Designer.java | 3 +++ designer-realize/src/com/fr/start/module/DesignerStartup.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/designer-realize/src/com/fr/start/Designer.java b/designer-realize/src/com/fr/start/Designer.java index fad29deb3..178739fe3 100644 --- a/designer-realize/src/com/fr/start/Designer.java +++ b/designer-realize/src/com/fr/start/Designer.java @@ -44,6 +44,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.module.Module; import com.fr.module.ModuleContext; +import com.fr.record.analyzer.FineAnalyzer; import com.fr.stable.BuildContext; import com.fr.stable.OperatingSystem; import com.fr.stable.ProductConstants; @@ -97,6 +98,8 @@ public class Designer extends BaseDesigner { */ public static void main(String[] args) { + FineAnalyzer.init(); + BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); diff --git a/designer-realize/src/com/fr/start/module/DesignerStartup.java b/designer-realize/src/com/fr/start/module/DesignerStartup.java index 1936451f2..bd43d4c83 100644 --- a/designer-realize/src/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/com/fr/start/module/DesignerStartup.java @@ -4,6 +4,8 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.event.Event; import com.fr.event.Listener; import com.fr.module.Activator; +import com.fr.record.analyzer.EnableMetrics; +import com.fr.record.analyzer.Metrics; import com.fr.start.Designer; import com.fr.start.EnvSwitcher; import com.fr.start.SplashContext; @@ -17,9 +19,11 @@ import java.util.concurrent.Executors; /** * Created by juhaoyu on 2018/1/8. */ +@EnableMetrics public class DesignerStartup extends Activator { @Override + @Metrics public void start() { startSub(PreStartActivator.class); //启动基础部分 From db70ac80303753c6e83f5b894ce98afd56ce919a Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 29 Jun 2018 13:51:23 +0800 Subject: [PATCH 11/16] . --- designer-base/src/com/fr/env/RemoteEnv.java | 759 -------------------- 1 file changed, 759 deletions(-) delete mode 100644 designer-base/src/com/fr/env/RemoteEnv.java diff --git a/designer-base/src/com/fr/env/RemoteEnv.java b/designer-base/src/com/fr/env/RemoteEnv.java deleted file mode 100644 index 1bb606417..000000000 --- a/designer-base/src/com/fr/env/RemoteEnv.java +++ /dev/null @@ -1,759 +0,0 @@ -//package com.fr.env; -// -//import com.fr.base.EnvException; -//import com.fr.base.operator.common.CommonOperator; -//import com.fr.base.operator.connect.ConnectOperator; -//import com.fr.base.operator.file.FileOperator; -//import com.fr.base.operator.org.OrganizationOperator; -//import com.fr.base.remote.RemoteDeziConstants; -//import com.fr.data.impl.storeproc.StoreProcedure; -//import com.fr.dav.AbstractEnv; -//import com.fr.dav.DavXMLUtils; -//import com.fr.design.DesignerEnvManager; -//import com.fr.design.mainframe.DesignerContext; -//import com.fr.file.CacheManager; -//import com.fr.general.CommonIOUtils; -//import com.fr.general.ComparatorUtils; -//import com.fr.general.IOUtils; -//import com.fr.general.Inter; -//import com.fr.general.http.HttpToolbox; -//import com.fr.io.utils.ResourceIOUtils; -//import com.fr.json.JSONArray; -//import com.fr.json.JSONObject; -//import com.fr.log.FineLoggerFactory; -//import com.fr.report.DesignAuthority; -//import com.fr.report.util.AuthorityXMLUtils; -//import com.fr.share.ShareConstants; -//import com.fr.stable.ArrayUtils; -//import com.fr.stable.EncodeConstants; -//import com.fr.stable.Filter; -//import com.fr.stable.ProductConstants; -//import com.fr.stable.StableUtils; -//import com.fr.stable.StringUtils; -//import com.fr.stable.SvgProvider; -//import com.fr.stable.project.ProjectConstants; -//import com.fr.third.guava.base.Strings; -//import com.fr.third.guava.collect.ImmutableMap; -//import com.fr.web.ResourceConstants; -//import com.fr.workspace.engine.server.rpc.RemoteCallServerConfig; -//import com.fr.workspace.engine.server.rpc.netty.MessageSendExecutor; -//import com.fr.workspace.engine.server.rpc.netty.RemoteCallClient; -// -//import javax.swing.*; -//import javax.xml.transform.Source; -//import javax.xml.transform.Transformer; -//import javax.xml.transform.TransformerConfigurationException; -//import javax.xml.transform.TransformerException; -//import javax.xml.transform.TransformerFactory; -//import javax.xml.transform.dom.DOMSource; -//import javax.xml.transform.stream.StreamResult; -//import java.awt.*; -//import java.io.ByteArrayInputStream; -//import java.io.ByteArrayOutputStream; -//import java.io.File; -//import java.io.FileInputStream; -//import java.io.IOException; -//import java.io.InputStream; -//import java.io.OutputStream; -//import java.io.OutputStreamWriter; -//import java.io.UnsupportedEncodingException; -//import java.util.ArrayList; -//import java.util.HashMap; -//import java.util.Map; -// -//import static com.fr.third.guava.base.Preconditions.checkArgument; -// -///** -// * @author null -// */ -//public class RemoteEnv extends AbstractEnv implements DesignAuthorityConfigurable { -// -// private static final String CERT_KEY = "javax.net.ssl.trustStore"; -// private static final String PWD_KEY = "javax.net.ssl.trustStorePassword"; -// private static final String HTTPS_PREFIX = "https:"; -// private final static String[] FILE_TYPE = {"cptx", "cpt", "frm", "form", "cht", "chart"}; -// private String buildFilePath; -// private RemoteEnvConfig config; -// -// public RemoteEnv(RemoteEnvConfig config) { -// this.config = config; -// } -// -// @Override -// public void connect() throws Exception { -// RemoteCallClient.getInstance().load(config.getHost(), config.getPort(), RemoteCallServerConfig.getInstance().getSerializeProtocol()); -// } -// -// @Override -// public void connectOnce() throws Exception { -// RemoteCallClient.getInstance().loadOnce(config.getHost(), config.getPort(), RemoteCallServerConfig.getInstance().getSerializeProtocol(), 10 * 1000); -// ConnectOperator operator = RemoteCallClient.getInstance().execute(ConnectOperator.class); -// boolean result = false; -// try { -// result = operator.connect(config.getUsername(), config.getPassword()); -// } catch (Exception ignore) { -// -// } -// if (!result) { -// throw new Exception("Cannot connect to the remote server!"); -// } -// } -// -// @Override -// public boolean disconnect() { -// MessageSendExecutor.getInstance().stop(); -// return true; -// } -// -// @Override -// public FileOperator getFileOperator() throws Exception { -// -// return MessageSendExecutor.getInstance().execute(FileOperator.class); -// } -// -// @Override -// public CommonOperator getCommonOperator() throws Exception { -// return MessageSendExecutor.getInstance().execute(CommonOperator.class); -// } -// -// @Override -// public OrganizationOperator getOrganizationOperator() throws Exception { -// return MessageSendExecutor.getInstance().execute(OrganizationOperator.class); -// } -// -// @Override -// public String getPath() { -// return config.getPath(); -// } -// -// @Override -// public String getUser() { -// return config.getUsername(); -// } -// -// public String getPassword() { -// return config.getPassword(); -// } -// -// @Override -// public String getUserID() { -// return EnvContext.currentToken(); -// } -// -// @Override -// public boolean isLocalEnv() { -// return false; -// } -// -// /** -// * execute method之后,取返回的 InputStream -// */ -// private InputStream filterInputStream(InputStream in) throws Exception { -// if (in == null) { -// return null; -// } -// ByteArrayOutputStream out = new ByteArrayOutputStream(); -// try { -// IOUtils.copyBinaryTo(in, out); -// // 看一下传过来的byte[]是不是DesignProcessor.INVALID,如果是的话,就抛Exception -// byte[] bytes = out.toByteArray(); -// // carl:格式一致传中文 -// String message = new String(bytes, EncodeConstants.ENCODING_UTF_8); -// if (ComparatorUtils.equals(message, RemoteDeziConstants.NO_SUCH_RESOURCE)) { -// return null; -// } else if (ComparatorUtils.equals(message, RemoteDeziConstants.INVALID_USER)) { -// throw new EnvException(RemoteDeziConstants.INVALID_USER); -// } else if (ComparatorUtils.equals(message, RemoteDeziConstants.FILE_LOCKED)) { -// JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Remote_File_is_Locked")); -// return null; -// } -// return new ByteArrayInputStream(bytes); -// } finally { -// synchronized (this) { -// in.close(); -// out.close(); -// } -// } -// } -// -// -// /** -// * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 -// * -// * @param bytes 数据 -// * @return 是否成功提交 -// * @throws Exception 异常 -// */ -// private boolean postBytes2Server(byte[] bytes, HashMap para) throws Exception { -// filterInputStream(RemoteEnvUtils.simulateRPCByHttpPost(bytes, para, false, this)); -// return true; -// } -// -// /** -// * 把InputStream转成一段String -// * -// * @param in InputStream输入流 -// * @return 转换后的字符串 -// */ -// private static String stream2String(InputStream in) { -// if (in == null) { -// return null; -// } -// String result = null; -// try { -// result = CommonIOUtils.inputStream2String(in, EncodeConstants.ENCODING_UTF_8); -// } catch (UnsupportedEncodingException e) { -// FineLoggerFactory.getLogger().error(e.getMessage(), e); -// } -// return result; -// } -// -// /** -// * 测试连接服务器 -// * -// * @return 测试连接成功返回true -// * @throws Exception 异常 -// */ -// private boolean testServerConnection() throws Exception { -// return testConnection(true, true, DesignerContext.getDesignerFrame()); -// } -// -// /** -// * 测试当前配置是否正确 -// * -// * @return 链接是否成功 -// * @throws Exception 异常 -// */ -// @Override -// public boolean testServerConnectionWithOutShowMessagePane() throws Exception { -// return testConnection(false, true, DesignerContext.getDesignerFrame()); -// } -// -// /** -// * 主要用于在环境配置面板中的测试连接按钮时,不要注册进远程环境 -// * -// * @param messageParentPane 弹框的依赖的面板 -// * @return 是否测试连接成功 -// * @throws Exception 异常 -// */ -// public boolean testConnectionWithOutRegisteServer(Component messageParentPane) throws Exception { -// return testConnection(true, false, messageParentPane); -// } -// -// -// private boolean testConnection(boolean needMessage, boolean isRegisteServer, Component parentComponent) throws Exception { -// checkArgument(parentComponent instanceof Component, "parentComponent should be a java.awt.component"); -// Component component = parentComponent; -// String url = String.format("%s/connection", EnvConstants.toDecisionPath(getPath())); -// ImmutableMap params = ImmutableMap.of( -// "version", (Object) ProductConstants.DESIGNER_VERSION -// ); -// ImmutableMap headers = ImmutableMap.of( -// EnvConstants.USERNAME, getUser(), -// EnvConstants.PWD, getPassword()); -// String res = HttpToolbox.post(url, params, headers); -// if (Strings.isNullOrEmpty(res)) { -// if (needMessage) { -// JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); -// } -// return false; -// } else if (ComparatorUtils.equals(res, "true")) { -// return true; -// } else { -// if (ComparatorUtils.equals(res, EnvConstants.AUTH_ERROR)) { -// JOptionPane.showMessageDialog(component, -// Inter.getLocText(new String[]{"Datasource-Connection_failed", "Registration-User_Name", "Password", "Error"}, new String[]{",", "", "", "!"}) -// , Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); -// return false; -// } else { -// if (ComparatorUtils.equals(res, EnvConstants.WAR_ERROR)) { -// if (needMessage) { -// JOptionPane.showMessageDialog(component, Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); -// } else { -// FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "NS-war-remote"}, new String[]{",", "!"})); -// } -// return false; -// } else { -// if (needMessage) { -// JOptionPane.showMessageDialog(component, Inter.getLocText("Datasource-Connection_failed")); -// } else { -// FineLoggerFactory.getLogger().info(Inter.getLocText(new String[]{"Datasource-Connection_failed", "Version-does-not-support"}, new String[]{",", "!"})); -// } -// return false; -// } -// } -// } -// } -// -// -// private void refreshHttpSProperty() { -// if (getPath().startsWith(HTTPS_PREFIX) && System.getProperty(CERT_KEY) == null) { -// DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); -// System.setProperty(CERT_KEY, envManager.getCertificatePath()); -// System.setProperty(PWD_KEY, envManager.getCertificatePass()); -// } -// } -// -// -// /** -// * 心跳访问,用来更新当前用户的访问时间 -// * -// * @throws Exception e -// */ -// -// public class Bytes2ServerOutputStream extends OutputStream { -// private ByteArrayOutputStream out = new ByteArrayOutputStream(); -// private HashMap nameValuePairs; -// -// public Bytes2ServerOutputStream(HashMap nameValuePairs) { -// this.nameValuePairs = nameValuePairs; -// } -// -// public HashMap getNameValuePairs() { -// return nameValuePairs; -// } -// -// public ByteArrayOutputStream getOut() { -// return out; -// } -// -// public OutputStream getZipOutputStream() throws Exception { -// return IOUtils.toZipOut(out); -// } -// -// /** -// * post ro Server 提交到服务器 -// * -// * @return 是否提交成功 -// */ -// public boolean post2Server() { -// try { -// return postBytes2Server(out.toByteArray(), nameValuePairs); -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage(), e); -// return false; -// } -// } -// -// /** -// * 刷新数出流,并提交 -// * -// * @throws IOException e -// */ -// @Override -// public void flush() throws IOException { -// super.flush(); -// post2Server(); -// } -// -// /** -// * 将指定字节写入输入流数组 -// * -// * @param b 写入的字节 -// */ -// @Override -// public void write(int b) { -// out.write(b); -// -// } -// } -// -// @Override -// public boolean updateAuthorities(DesignAuthority[] authorities) { -// refreshHttpSProperty(); -// String res = null; -// try { -// InputStream inputStream = RemoteEnvUtils.updateAuthorities(authorities, this); -// inputStream = filterInputStream(inputStream); -// res = IOUtils.inputStream2String(inputStream, EncodeConstants.ENCODING_UTF_8); -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } -// return StringUtils.isNotEmpty(res) && Boolean.valueOf(res); -// } -// -// @Override -// public DesignAuthority[] getAuthorities() { -// refreshHttpSProperty(); -// DesignAuthority[] authorities = new DesignAuthority[0]; -// try { -// InputStream inputStream = RemoteEnvUtils.getAuthorities(this); -// inputStream = filterInputStream(inputStream); -// authorities = AuthorityXMLUtils.readDesignAuthoritiesXML(inputStream); -// return authorities; -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } -// return authorities; -// } -// -// /** -// * 远程设计器设计时,假如开了权限就不可预览了。这边放一个全局的map来开后门 -// * -// * @param key 键值 -// * @param value 值 -// * @return 如果写入成功,返回true -// * @throws Exception e -// */ -// public boolean writePrivilegeMap(String key, String value) throws Exception { -// refreshHttpSProperty(); -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "write_privilege_map"); -// para.put("current_user", getUser()); -// para.put("current_password", getPassword()); -// para.put("key", key); -// para.put("value", value); -// -// //jim :加上user,远程设计点击预览时传递用户角色信息 -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// -// if (input == null) { -// return false; -// } -// -// return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); -// } -// -// -// /** -// * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 -// * -// * @param bytes 数据 -// * @param para 参数 -// * @return 从服务器端得到InputStream -// * @throws Exception 异常 -// */ -// public InputStream postBytes2ServerB(byte[] bytes, HashMap para) throws Exception { -// refreshHttpSProperty(); -// return filterInputStream(RemoteEnvUtils.simulateRPCByHttpPost(bytes, para, false, this)); -// } -// -// -// /** -// * 读取路径下的svg文件 -// * -// * @param path 制定路径,是基于报表目录下resource文件夹路径 -// * @return 读到的文件 -// */ -// @Override -// public String[] readPathSvgFiles(String path) { -// refreshHttpSProperty(); -// String cataloguePath = StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getPath(), SvgProvider.SERVER, path); -// -// ArrayList fileArray = new ArrayList<>(); -// try { -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "design_read_svgfile"); -// para.put("resourcePath", path); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// JSONArray ja = new JSONArray(stream2String(input)); -// for (int i = 0; i < ja.length(); i++) { -// JSONObject jsonObject = (JSONObject) ja.get(i); -// String svgFileName = (String) jsonObject.get("svgfileName"); -// String svgFileContent = (String) jsonObject.get("svgfileContent"); -// -// String file = StableUtils.pathJoin(cataloguePath, svgFileName); -// InputStream in = new ByteArrayInputStream(svgFileContent.getBytes(EncodeConstants.ENCODING_UTF_8)); -// ResourceIOUtils.write(file, in); -// fileArray.add(file); -// } -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } -// -// return fileArray.toArray(new String[0]); -// } -// -// -// /** -// * 写svg文件 -// * -// * @param svgFile svg文件 -// * @return 是否写入成功 -// * @throws Exception 异常 -// */ -// @Override -// public boolean writeSvgFile(SvgProvider svgFile) throws Exception { -// testServerConnection(); -// -// HashMap para = new HashMap<>(); -// para.put("op", "svgrelate"); -// para.put("cmd", "design_save_svg"); -// para.put("filePath", svgFile.getFilePath()); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// -// // 通过ByteArrayOutputStream将svg写成字节流 -// Bytes2ServerOutputStream out = new Bytes2ServerOutputStream(para); -// OutputStreamWriter outWriter = new OutputStreamWriter(out, "UTF-8"); -// StreamResult result = new StreamResult(outWriter); -// -// Source source = new DOMSource(svgFile.getSvgDocument()); -// try { -// Transformer xformer = TransformerFactory.newInstance().newTransformer(); -// try { -// xformer.transform(source, result); -// } catch (TransformerException ex) { -// FineLoggerFactory.getLogger().error(ex.getMessage()); -// } -// -// } catch (TransformerConfigurationException ex) { -// FineLoggerFactory.getLogger().error(ex.getMessage()); -// return false; -// } -// -// try { -// String res = stream2String(filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpPost(out.getOut().toByteArray(), out.nameValuePairs, false, this) -// )); -// if (StringUtils.isNotEmpty(res)) { -// JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Already_exist") + res); -// return false; -// } -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// return false; -// } -// -// return true; -// } -// -// /** -// * 写文件 -// * -// * @param beanPath 文件名 -// * @param prefix 当前Env下得工程分类,如reportlets,lib等 -// * @return OutputStream 输出流 -// */ -// @Override -// public OutputStream writeBean(String beanPath, String prefix) { -// HashMap para = new HashMap<>(); -// para.put("op", "fs_remote_design"); -// para.put("cmd", "design_save_report"); -// para.put(RemoteDeziConstants.PREFXI, prefix); -// para.put(RemoteDeziConstants.TEMPLATE_PATH, beanPath); -// -// return new Bytes2ServerOutputStream(para); -// } -// -// /** -// * 返回模板文件路径 -// */ -// @Override -// public String getWebReportPath() { -// -// return StableUtils.pathJoin(getPath(), getAppName()); -// } -// -// public String[] getProcedureColumns(StoreProcedure storeProcedure, Map parameterMap) throws Exception { -// refreshHttpSProperty(); -// String[] columns; -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "list_sp"); -// try { -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// -// if (input == null) { -// return ArrayUtils.EMPTY_STRING_ARRAY; -// } -// -// columns = DavXMLUtils.readXMLSPColumns(input); -// return columns; -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } -// -// return new String[0]; -// } -// -// public String[] getProcedureColumns(String name) throws Exception { -// refreshHttpSProperty(); -// String[] columns; -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "list_sp_columns_name"); -// para.put("name", name); -// try { -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// if (input == null) { -// return ArrayUtils.EMPTY_STRING_ARRAY; -// } -// columns = DavXMLUtils.readXMLSPColumns(input); -// return columns; -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } -// return new String[0]; -// -// } -// -// @Override -// public String[] getSupportedTypes() { -// return FILE_TYPE; -// } -// -// /** -// * 获取当前env的build文件路径 -// */ -// @Override -// public String getBuildFilePath() { -// return StringUtils.isEmpty(buildFilePath) ? ResourceConstants.BUILD_PATH : buildFilePath; -// } -// -// /** -// * 设置当前env的build文件路径 -// */ -// @Override -// public void setBuildFilePath(String buildFilePath) { -// this.buildFilePath = buildFilePath; -// } -// -// @Override -// public String[] loadREUFile() { -// refreshHttpSProperty(); -// ResourceIOUtils.delete(StableUtils.pathJoin( -// CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath(), -// ShareConstants.DIR_SHARE_CACHE)); -// -// String zipFilePath = null; -// try { -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "design_read_reufile"); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// -// //拿到服务端传过来的整个共享文件夹的压缩文件的文件流 -// InputStream input = RemoteEnvUtils.simulateRPCByHttpGet(para, false, this); -// -// zipFilePath = StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath(), "share.zip"); -// String cacheDir = StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath(), ShareConstants.DIR_SHARE_CACHE); -// -// ResourceIOUtils.write(zipFilePath, input); -// ResourceIOUtils.unzip(zipFilePath, cacheDir, EncodeConstants.ENCODING_GBK); -// -// -// return ResourceIOUtils.listWithFullPath(cacheDir, new Filter() { -// @Override -// public boolean accept(String s) { -// return s.endsWith(ProjectConstants.REU); -// } -// }); -// -// } catch (Exception e) { -// FineLoggerFactory.getLogger().error(e.getMessage()); -// } finally { -// -// if (zipFilePath != null) { -// ResourceIOUtils.delete(zipFilePath); -// } -// } -// -// return new String[0]; -// } -// -// @Override -// public boolean installREUFile(File reuFile) { -// refreshHttpSProperty(); -// if (reuFile == null) { -// return false; -// } -// File tempFile = new File(CacheManager.getProviderInstance().getCacheDirectory(), "temp_remote"); -// IOUtils.unzip(reuFile, tempFile.getAbsolutePath()); -// String shareXMLName = StableUtils.pathJoin(tempFile.getAbsolutePath(), ShareConstants.NAME_XML_MODULE); -// String helpXMLName = StableUtils.pathJoin(tempFile.getAbsolutePath(), ShareConstants.NAME_XML_HELP); -// try { -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "design_install_reufile"); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// para.put("reuFileName", reuFile.getName()); -// -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpPost( -// IOUtils.inputStream2Bytes( -// new FileInputStream(new File(shareXMLName)) -// ) -// , para, -// false, -// this) -// ); -// para.put("isComplete", "true"); -// InputStream input1 = filterInputStream(RemoteEnvUtils.simulateRPCByHttpPost( -// IOUtils.inputStream2Bytes( -// new FileInputStream(new File(helpXMLName)) -// ) -// , para, -// false, -// this)); -// return ComparatorUtils.equals(stream2String(input), "true") && ComparatorUtils.equals(stream2String(input1), "true"); -// } catch (Exception e) { -// return false; -// } -// } -// -// @Override -// public boolean removeREUFilesByName(String fileName) { -// refreshHttpSProperty(); -// if (StringUtils.isEmpty(fileName)) { -// return true; -// } -// try { -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "design_remove_reufile"); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// para.put("reuFileName", fileName); -// -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// return ComparatorUtils.equals(stream2String(input), "true"); -// } catch (Exception e) { -// return false; -// } -// } -// -// @Override -// public String getSharePath() { -// refreshHttpSProperty(); -// try { -// HashMap para = new HashMap<>(); -// para.put("op", "fr_remote_design"); -// para.put("cmd", "design_get_share_path"); -// para.put("current_uid", this.getUserID()); -// para.put("currentUsername", this.getUser()); -// -// InputStream input = filterInputStream( -// RemoteEnvUtils.simulateRPCByHttpGet(para, false, this) -// ); -// return stream2String(input); -// } catch (Exception e) { -// return StringUtils.EMPTY; -// } -// } -// -// -// @Override -// public boolean hasPluginServiceStarted(String key) { -// -// return true; -// } -// -//} From c17fa49111b192f9c9d60134ae9ea5ec2afbaf86 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Jun 2018 14:36:27 +0800 Subject: [PATCH 12/16] =?UTF-8?q?REPORT-9277=20=E3=80=9010.0=E4=B8=80?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webattr/EditReportServerParameterPane.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java index 457e60098..b0e99025a 100644 --- a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java +++ b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java @@ -74,13 +74,17 @@ public class EditReportServerParameterPane extends LoadingBasicPane { // File.separator + reportServerPreferenceConfig.fileName()); webAttr = ((ReportWebAttr) ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); - if (webAttr != null) { - pagePane.populateBean(webAttr.getWebPage()); - viewPane.populateBean(webAttr.getWebView()); - writePane.populateBean(webAttr.getWebWrite()); - cssPane.populate(webAttr); - jsPane.populate(webAttr); + if(webAttr.getWebPage() != null){ + pagePane.populateBean(webAttr.getWebPage()); } + if(webAttr.getWebView() != null){ + viewPane.populateBean(webAttr.getWebView()); + } + if(webAttr.getWebWrite() != null){ + writePane.populateBean(webAttr.getWebWrite()); + } + cssPane.populate(webAttr); + jsPane.populate(webAttr); printSettings = ReportUtils.getPrintSettingsFromServerConfig(); printSettingPane.populate(printSettings); From 70e3022e160d2f2039205185f8ef56d69b8ad1bd Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Jun 2018 14:39:47 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E4=BB=A3=E7=A2=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webattr/EditReportServerParameterPane.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java index b0e99025a..d8c777655 100644 --- a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java +++ b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java @@ -15,6 +15,9 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.webattr.printsettings.PrintSettingPane; import com.fr.general.Inter; import com.fr.report.core.ReportUtils; +import com.fr.report.web.WebPage; +import com.fr.report.web.WebView; +import com.fr.report.web.WebWrite; import com.fr.web.attr.ReportWebAttr; import javax.swing.*; @@ -74,14 +77,17 @@ public class EditReportServerParameterPane extends LoadingBasicPane { // File.separator + reportServerPreferenceConfig.fileName()); webAttr = ((ReportWebAttr) ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); - if(webAttr.getWebPage() != null){ - pagePane.populateBean(webAttr.getWebPage()); + WebPage webPage = webAttr.getWebPage(); + WebView webView = webAttr.getWebView(); + WebWrite webWrite = webAttr.getWebWrite(); + if(webPage != null){ + pagePane.populateBean(webPage); } - if(webAttr.getWebView() != null){ - viewPane.populateBean(webAttr.getWebView()); + if(webView != null){ + viewPane.populateBean(webView); } - if(webAttr.getWebWrite() != null){ - writePane.populateBean(webAttr.getWebWrite()); + if(webWrite != null){ + writePane.populateBean(webWrite); } cssPane.populate(webAttr); jsPane.populate(webAttr); From 8cca2382f1076b82bdfe661a7b96da0b2ed8c070 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 29 Jun 2018 14:48:14 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=20=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/loghandler/DesignerLogHandler.java | 15 --------------- .../com/fr/start/module/DesignerActivator.java | 12 ++++++++++++ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java b/designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java index ef5325215..fb7ed6f96 100644 --- a/designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java +++ b/designer-base/src/com/fr/design/mainframe/loghandler/DesignerLogHandler.java @@ -45,21 +45,6 @@ public class DesignerLogHandler { private static final int ERRO_GAP_Y = -40; private static final int SERVER_GAP_Y = -20; - static { - GeneralContext.addEnvChangedListener(new EnvChangedListener() { - @Override - public void envChanged() { - // envchange后需要重新读取webinf里的log4j配置, 重新添加appender - FineLoggerFactory.getLogger().addLogAppender(new LogHandler() { - @Override - public DesignerLogAppender getHandler() { - return new DesignerLogAppender(); - } - }); - } - }); - } - public static DesignerLogHandler getInstance() { return HOLDER.singleton; } diff --git a/designer-realize/src/com/fr/start/module/DesignerActivator.java b/designer-realize/src/com/fr/start/module/DesignerActivator.java index 079dd1500..53838ce3d 100644 --- a/designer-realize/src/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/com/fr/start/module/DesignerActivator.java @@ -51,6 +51,7 @@ import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; import com.fr.design.mainframe.form.FormElementCaseDesigner; import com.fr.design.mainframe.form.FormReportComponentComposite; +import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.DesignerLogImpl; import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.module.ChartHyperlinkGroup; @@ -73,6 +74,7 @@ import com.fr.js.ReportletHyperlink; import com.fr.js.WebHyperlink; import com.fr.locale.InterMutableKey; import com.fr.log.FineLoggerFactory; +import com.fr.log.LogHandler; import com.fr.module.Activator; import com.fr.module.extension.Prepare; import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent; @@ -129,6 +131,16 @@ public class DesignerActivator extends Activator implements Prepare { public void start() { designerModuleStart(); preLoadPane(); + loadLogAppender(); + } + + private static void loadLogAppender() { + FineLoggerFactory.getLogger().addLogAppender(new LogHandler() { + @Override + public DesignerLogAppender getHandler() { + return new DesignerLogAppender(); + } + }); } private static void designerModuleStart() { From 390531852937cdf80da0ae9dfb84b920f5268e34 Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 29 Jun 2018 15:06:48 +0800 Subject: [PATCH 15/16] . --- .../errorinfo/ErrorInfoUploader.java | 4 +- .../fr/start/module/DesignerActivator.java | 38 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 4228f121e..4d5964426 100644 --- a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -39,9 +39,11 @@ public class ErrorInfoUploader { @Override public void envChanged() { FineLoggerFactory.getLogger().addLogAppender(new LogHandler() { + private ErrorInfoLogAppender errorInfoLogAppender = new ErrorInfoLogAppender(); + @Override public ErrorInfoLogAppender getHandler() { - return new ErrorInfoLogAppender(); + return errorInfoLogAppender; } }); } diff --git a/designer-realize/src/com/fr/start/module/DesignerActivator.java b/designer-realize/src/com/fr/start/module/DesignerActivator.java index 53838ce3d..9983b9f9a 100644 --- a/designer-realize/src/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/com/fr/start/module/DesignerActivator.java @@ -5,7 +5,6 @@ import com.fr.base.Formula; import com.fr.base.MultiFieldParameter; import com.fr.base.process.ProcessOperator; import com.fr.chart.chartattr.ChartCollection; -import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.insert.cell.BiasCellAction; @@ -21,8 +20,6 @@ import com.fr.design.actions.insert.flot.FormulaFloatAction; import com.fr.design.actions.insert.flot.ImageFloatAction; import com.fr.design.actions.insert.flot.TextBoxFloatAction; import com.fr.design.bridge.DesignToolbarProvider; -import com.fr.design.chart.ChartDialog; -import com.fr.design.chart.gui.ChartComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.form.parameter.FormParaDesigner; import com.fr.design.fun.ElementUIProvider; @@ -36,7 +33,6 @@ import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.javascript.ProcessTransitionAdapter; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.CellElementPropertyPane; -import com.fr.design.mainframe.ChartPropertyPane; import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.ElementCaseThumbnail; @@ -54,15 +50,12 @@ import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.DesignerLogImpl; import com.fr.design.mainframe.loghandler.LogMessageBar; -import com.fr.design.module.ChartHyperlinkGroup; -import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.WorkBookParameterReader; import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane; import com.fr.form.stable.ElementCaseThumbnailProcessor; -import com.fr.form.ui.ChartEditor; import com.fr.form.ui.WidgetInfoConfig; import com.fr.general.Inter; import com.fr.general.ModuleContext; @@ -77,7 +70,6 @@ import com.fr.log.FineLoggerFactory; import com.fr.log.LogHandler; import com.fr.module.Activator; import com.fr.module.extension.Prepare; -import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent; import com.fr.quickeditor.cellquick.CellBiasTextPainterEditor; import com.fr.quickeditor.cellquick.CellDSColumnEditor; import com.fr.quickeditor.cellquick.CellFormulaQuickEditor; @@ -99,18 +91,15 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.bridge.StableFactory; import com.fr.stable.fun.LogProvider; -import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.script.ValueConverter; import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.start.BBSGuestPaneProvider; -import com.fr.van.chart.DownloadOnlineSourcesHelper; -import com.fr.van.chart.map.server.ChartMapEditorAction; import com.fr.xml.ReportXMLUtils; -import java.awt.*; +import java.awt.Image; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; @@ -126,7 +115,9 @@ import static com.fr.stable.module.Module.ENGINE_MODULE; * 之后慢慢将DesignerModule拆成Activator */ public class DesignerActivator extends Activator implements Prepare { - + + private LogHandler logHandler = null; + @Override public void start() { designerModuleStart(); @@ -134,17 +125,26 @@ public class DesignerActivator extends Activator implements Prepare { loadLogAppender(); } - private static void loadLogAppender() { - FineLoggerFactory.getLogger().addLogAppender(new LogHandler() { + private void loadLogAppender() { + logHandler = new LogHandler() { + final DesignerLogAppender logAppender = new DesignerLogAppender(); + @Override public DesignerLogAppender getHandler() { - return new DesignerLogAppender(); + return logAppender; } - }); + }; + FineLoggerFactory.getLogger().addLogAppender(logHandler); + } + + private void unloadLogAppender() { + if (logHandler != null) { + FineLoggerFactory.getLogger().removeLogAppender(logHandler); + } } private static void designerModuleStart() { - + StableFactory.registerMarkedClass(ExtraDesignClassManagerProvider.XML_TAG, ExtraDesignClassManager.class); ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); @@ -165,6 +165,7 @@ public class DesignerActivator extends Activator implements Prepare { ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); } + private static void preLoadPane() { ExecutorService service = Executors.newCachedThreadPool(); service.submit(new Runnable() { @@ -398,6 +399,7 @@ public class DesignerActivator extends Activator implements Prepare { @Override public void stop() { + unloadLogAppender(); } @Override From 37af1c934b53e72a30f26a9b44a2469e23219999 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Jun 2018 16:25:50 +0800 Subject: [PATCH 16/16] =?UTF-8?q?REPORT-9232=20=E3=80=9010.0=E4=B8=80?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E6=8C=89=E9=92=AE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=87=AA=E5=AE=9A=E4=B9=89=E8=83=8C=E6=99=AF=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/background/BackgroundCardSwitchButtonPane.java | 4 ++-- .../com/fr/design/style/background/BackgroundFactory.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java b/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java index b5a2aeffa..21128fa77 100644 --- a/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java +++ b/designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java @@ -2,7 +2,7 @@ package com.fr.design.style.background; import com.fr.base.background.ColorBackground; import com.fr.base.background.GradientBackground; -import com.fr.base.background.ImageBackground; +import com.fr.base.background.ImageFileBackground; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.style.background.gradient.GradientBackgroundPane; import com.fr.design.style.background.impl.ColorBackgroundPane; @@ -30,7 +30,7 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane { private static void registerCardSwitchBtnBackground(Map, BackgroundUIWrapper> map) { map.put(ColorBackground.class, BackgroundUIWrapper.create() .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); map.put(GradientBackground.class, BackgroundUIWrapper.create() .setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color"))); diff --git a/designer-base/src/com/fr/design/style/background/BackgroundFactory.java b/designer-base/src/com/fr/design/style/background/BackgroundFactory.java index 8489f7d88..2348f99ac 100644 --- a/designer-base/src/com/fr/design/style/background/BackgroundFactory.java +++ b/designer-base/src/com/fr/design/style/background/BackgroundFactory.java @@ -3,7 +3,7 @@ package com.fr.design.style.background; import com.fr.base.background.ColorBackground; import com.fr.base.background.GradientBackground; -import com.fr.base.background.ImageBackground; +import com.fr.base.background.ImageFileBackground; import com.fr.base.background.PatternBackground; import com.fr.base.background.TextureBackground; import com.fr.design.ExtraDesignClassManager; @@ -104,19 +104,19 @@ public class BackgroundFactory { } private static void registerImageBackground(Map, BackgroundUIWrapper> map) { - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerBrowserImageBackground(Map, BackgroundUIWrapper> map) { - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerButtonBackground(Map, BackgroundUIWrapper> map){ map.put(ColorBackground.class, BackgroundUIWrapper.create() .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); - map.put(ImageBackground.class, BackgroundUIWrapper.create() + map.put(ImageFileBackground.class, BackgroundUIWrapper.create() .setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); }