Browse Source

DEC-472 新模块划分与启动、关闭框架

解除新平台与Report启动的依赖,把服务器启动放到core中
master
ju 7 years ago
parent
commit
e820e0adc8
  1. 6
      designer/src/com/fr/design/mainframe/InformationCollector.java
  2. 4
      designer/src/com/fr/design/webattr/EditReportServerParameterPane.java
  3. 4
      designer/src/com/fr/design/webattr/PageToolBarPane.java
  4. 4
      designer/src/com/fr/design/webattr/ViewToolBarPane.java
  5. 4
      designer/src/com/fr/design/webattr/WriteToolBarPane.java
  6. 2
      designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java
  7. 6
      designer/src/com/fr/start/module/PreStartActivator.java
  8. 2
      designer_base/src/com/fr/design/formula/VariableResolverAdapter.java
  9. 2
      designer_base/src/com/fr/design/parameter/ParameterArrayPane.java
  10. 5
      designer_base/src/com/fr/design/parameter/ParameterManagerPane.java
  11. 2
      designer_form/src/com/fr/design/widget/ui/designer/ParameterTreeComboBox.java

6
designer/src/com/fr/design/mainframe/InformationCollector.java

@ -3,8 +3,8 @@
*/ */
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.ConfigManagerFactory;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.config.MarketConfig;
import com.fr.data.core.db.DBUtils; import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.dialect.DialectFactory; import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.core.db.dml.Delete; import com.fr.data.core.db.dml.Delete;
@ -163,7 +163,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
content.put(XML_UUID, envManager.getUUID()); content.put(XML_UUID, envManager.getUUID());
content.put(XML_JAR, GeneralUtils.readBuildNO()); content.put(XML_JAR, GeneralUtils.readBuildNO());
content.put(XML_VERSION, ProductConstants.RELEASE_VERSION); content.put(XML_VERSION, ProductConstants.RELEASE_VERSION);
content.put(XML_USERNAME, ConfigManagerFactory.getProviderInstance().getBbsUsername()); content.put(XML_USERNAME, MarketConfig.getInstance().getBbsUsername());
content.put(XML_KEY, envManager.getActivationKey()); content.put(XML_KEY, envManager.getActivationKey());
content.put(XML_OS, System.getProperty("os.name")); content.put(XML_OS, System.getProperty("os.name"));
} catch (JSONException e) { } catch (JSONException e) {
@ -297,7 +297,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
} }
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
content.put("username", ConfigManagerFactory.getProviderInstance().getBbsUsername()); content.put("username", MarketConfig.getInstance().getBbsUsername());
content.put("uuid", envManager.getUUID()); content.put("uuid", envManager.getUUID());
content.put("functions", functionArray); content.put("functions", functionArray);

4
designer/src/com/fr/design/webattr/EditReportServerParameterPane.java

@ -97,10 +97,6 @@ public class EditReportServerParameterPane extends LoadingBasicPane {
*/ */
public void update(ServerConfig reportServerConfig) { public void update(ServerConfig reportServerConfig) {
ReportWebAttr webAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); ReportWebAttr webAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
if (webAttr == null) {
webAttr = new ReportWebAttr();
ConfigManager.getProviderInstance().putGlobalAttribute(ReportWebAttr.class, webAttr);
}
webAttr.setWebPage(pagePane.updateBean()); webAttr.setWebPage(pagePane.updateBean());
webAttr.setWebView(viewPane.updateBean()); webAttr.setWebView(viewPane.updateBean());
webAttr.setWebWrite(writePane.updateBean()); webAttr.setWebWrite(writePane.updateBean());

4
designer/src/com/fr/design/webattr/PageToolBarPane.java

@ -180,10 +180,6 @@ public class PageToolBarPane extends AbstractEditToolBarPane {
@Override @Override
public void run() { public void run() {
ReportWebAttr reportWebAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); ReportWebAttr reportWebAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
if (reportWebAttr == null) {
reportWebAttr = new ReportWebAttr();
ConfigManager.getProviderInstance().putGlobalAttribute(ReportWebAttr.class, reportWebAttr);
}
reportWebAttr.setWebPage(serverPageToolBarPane.updateBean()); reportWebAttr.setWebPage(serverPageToolBarPane.updateBean());
} }

4
designer/src/com/fr/design/webattr/ViewToolBarPane.java

@ -150,10 +150,6 @@ public class ViewToolBarPane extends AbstractEditToolBarPane {
@Override @Override
public void run() { public void run() {
ReportWebAttr reportWebAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); ReportWebAttr reportWebAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
if (reportWebAttr == null) {
reportWebAttr = new ReportWebAttr();
ConfigManager.getProviderInstance().putGlobalAttribute(ReportWebAttr.class, reportWebAttr);
}
reportWebAttr.setWebView(serverPageToolBarPane.updateBean()); reportWebAttr.setWebView(serverPageToolBarPane.updateBean());
} }

4
designer/src/com/fr/design/webattr/WriteToolBarPane.java

@ -267,10 +267,6 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
@Override @Override
public void run() { public void run() {
ReportWebAttr reportWebAttr = ((ReportWebAttr) ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class)); ReportWebAttr reportWebAttr = ((ReportWebAttr) ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
if (reportWebAttr == null) {
reportWebAttr = new ReportWebAttr();
ConfigManager.getProviderInstance().putGlobalAttribute(ReportWebAttr.class, reportWebAttr);
}
reportWebAttr.setWebWrite(serverPageToolBarPane.updateBean()); reportWebAttr.setWebWrite(serverPageToolBarPane.updateBean());
} }

2
designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java

@ -154,7 +154,7 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
} }
// 全局参数 // 全局参数
parameters = ServerConfig.getInstance().getGlobeParameters(); parameters = ServerConfig.getInstance().getGlobal_Parameters();
if (!ArrayUtils.isEmpty(parameters)) { if (!ArrayUtils.isEmpty(parameters)) {
groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters)); groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters));
} }

6
designer/src/com/fr/start/module/PreStartActivator.java

@ -1,7 +1,5 @@
package com.fr.start.module; package com.fr.start.module;
import com.fr.base.ConfigManagerCreatorProxy;
import com.fr.base.ConfigManagerFactory;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
@ -10,7 +8,6 @@ import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.module.Activator; import com.fr.module.Activator;
import com.fr.plugin.conversion.PluginConversionModule;
import com.fr.stable.BuildContext; import com.fr.stable.BuildContext;
/** /**
@ -22,11 +19,8 @@ public class PreStartActivator extends Activator {
public void start() { public void start() {
RestartHelper.deleteRecordFilesWhenStart(); RestartHelper.deleteRecordFilesWhenStart();
ConfigManagerFactory.registerConfigManagerProxy(new ConfigManagerCreatorProxy());
BuildContext.setBuildFilePath(buildPropertiesPath()); BuildContext.setBuildFilePath(buildPropertiesPath());
SiteCenter.getInstance(); SiteCenter.getInstance();
//标记一下是设计器启动
PluginConversionModule.getInstance().markDesignerStart();
initLanguage(); initLanguage();
// 在 initLanguage 之后加载设计器国际化文件,确保是正确的语言环境 // 在 initLanguage 之后加载设计器国际化文件,确保是正确的语言环境

2
designer_base/src/com/fr/design/formula/VariableResolverAdapter.java

@ -94,7 +94,7 @@ public abstract class VariableResolverAdapter implements VariableResolver {
public String[] resolveGlobalParameterVariables() { public String[] resolveGlobalParameterVariables() {
// 加上全局的参数 // 加上全局的参数
ServerConfig reportServerManager = ServerConfig.getInstance(); ServerConfig reportServerManager = ServerConfig.getInstance();
Parameter[] globalParameters = reportServerManager.getGlobeParameters(); Parameter[] globalParameters = reportServerManager.getGlobal_Parameters();
List<String> variablesList = new ArrayList<String>(); List<String> variablesList = new ArrayList<String>();
for (int i = 0; i < (globalParameters == null ? 0 : globalParameters.length); i++) { for (int i = 0; i < (globalParameters == null ? 0 : globalParameters.length); i++) {

2
designer_base/src/com/fr/design/parameter/ParameterArrayPane.java

@ -31,7 +31,7 @@ public class ParameterArrayPane extends JListControlPane {
}); });
this.addEditingListner( new PropertyChangeAdapter() { this.addEditingListner( new PropertyChangeAdapter() {
public void propertyChange() { public void propertyChange() {
Parameter[] parameters = ServerConfig.getInstance().getGlobeParameters(); Parameter[] parameters = ServerConfig.getInstance().getGlobal_Parameters();
String[] allListNames = nameableList.getAllNames(); String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
String tempName = getEditingName(); String tempName = getEditingName();

5
designer_base/src/com/fr/design/parameter/ParameterManagerPane.java

@ -1,17 +1,14 @@
package com.fr.design.parameter; package com.fr.design.parameter;
import com.fr.base.FRContext;
import com.fr.config.ServerConfig; import com.fr.config.ServerConfig;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.io.File;
public class ParameterManagerPane extends BasicPane { public class ParameterManagerPane extends BasicPane {
@ -44,7 +41,7 @@ public class ParameterManagerPane extends BasicPane {
// this.parameterTextField.setText(FRContext.getCurrentEnv().getPath() + File.separator + // this.parameterTextField.setText(FRContext.getCurrentEnv().getPath() + File.separator +
// ProjectConstants.RESOURCES_NAME + // ProjectConstants.RESOURCES_NAME +
// File.separator + configManager.fileName()); // File.separator + configManager.fileName());
this.parameterArrayPane.populate(configManager.getGlobeParameters()); this.parameterArrayPane.populate(configManager.getGlobal_Parameters());
} }
public void update(ServerConfig configManager) { public void update(ServerConfig configManager) {

2
designer_form/src/com/fr/design/widget/ui/designer/ParameterTreeComboBox.java

@ -152,7 +152,7 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
} }
// 全局参数 // 全局参数
parameters = ServerConfig.getInstance().getGlobeParameters(); parameters = ServerConfig.getInstance().getGlobal_Parameters();
if (!ArrayUtils.isEmpty(parameters)) { if (!ArrayUtils.isEmpty(parameters)) {
groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters)); groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters));
} }

Loading…
Cancel
Save