Browse Source

Merge pull request #1712 in BA/design from ~JU/design:feature/10.0 to feature/10.0

* commit 'fc45e3d1de8245db5b358f12da808fbfeb9e22db':
  无JIRA任务 ServerConfig进一步拆分
  无JIRA任务 ServerConfig进一步拆分
master
superman 7 years ago
parent
commit
2c35e33f7b
  1. 4
      designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java
  2. 3
      designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java
  3. 5
      designer_base/src/com/fr/design/formula/VariableResolverAdapter.java
  4. 3
      designer_base/src/com/fr/design/parameter/ParameterArrayPane.java
  5. 12
      designer_base/src/com/fr/design/parameter/ParameterManagerPane.java
  6. 4
      designer_form/src/com/fr/design/widget/ui/designer/ParameterTreeComboBox.java

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

@ -2,8 +2,8 @@ package com.fr.design.widget.ui;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.TableData;
import com.fr.config.ServerConfig;
import com.fr.design.DesignModelAdapter;
import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
@ -154,7 +154,7 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
}
// 全局参数
parameters = ServerConfig.getInstance().getGlobal_Parameters();
parameters = ParameterConfig.getInstance().getGlobalParameters();
if (!ArrayUtils.isEmpty(parameters)) {
groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters));
}

3
designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.server;
import com.fr.base.BaseUtils;
import com.fr.base.ParameterConfig;
import com.fr.config.Configuration;
import com.fr.config.ServerConfig;
import com.fr.design.DesignModelAdapter;
@ -47,7 +48,7 @@ public class GlobalParameterAction extends UpdateAction {
//marks:读取服务器配置信息
final ServerConfig configManager = ServerConfig.getInstance();
parameterManagerPane.populate(configManager.mirror());
parameterManagerPane.populate(ParameterConfig.getInstance().getGlobalParameters());
parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() {
public void doOk() {
Configurations.update(new Worker() {

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

@ -1,7 +1,7 @@
package com.fr.design.formula;
import com.fr.base.Parameter;
import com.fr.config.ServerConfig;
import com.fr.base.ParameterConfig;
import com.fr.design.DesignModelAdapter;
import com.fr.plugin.ExtraClassManager;
import com.fr.script.ScriptConstants;
@ -93,8 +93,7 @@ public abstract class VariableResolverAdapter implements VariableResolver {
*/
public String[] resolveGlobalParameterVariables() {
// 加上全局的参数
ServerConfig reportServerManager = ServerConfig.getInstance();
Parameter[] globalParameters = reportServerManager.getGlobal_Parameters();
Parameter[] globalParameters = ParameterConfig.getInstance().getGlobalParameters();
List<String> variablesList = new ArrayList<String>();
for (int i = 0; i < (globalParameters == null ? 0 : globalParameters.length); i++) {

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

@ -1,6 +1,7 @@
package com.fr.design.parameter;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.config.ServerConfig;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
@ -31,7 +32,7 @@ public class ParameterArrayPane extends JListControlPane {
});
this.addEditingListner( new PropertyChangeAdapter() {
public void propertyChange() {
Parameter[] parameters = ServerConfig.getInstance().getGlobal_Parameters();
Parameter[] parameters = ParameterConfig.getInstance().getGlobalParameters();
String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
String tempName = getEditingName();

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

@ -1,6 +1,7 @@
package com.fr.design.parameter;
import com.fr.config.ServerConfig;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
@ -36,16 +37,17 @@ public class ParameterManagerPane extends BasicPane {
return Inter.getLocText("M_Server-Global_Parameters");
}
public void populate(ServerConfig configManager) {
public void populate(Parameter[] parameters) {
//todo 原来界面上显示的xml路径
// this.parameterTextField.setText(FRContext.getCurrentEnv().getPath() + File.separator +
// ProjectConstants.RESOURCES_NAME +
// File.separator + configManager.fileName());
this.parameterArrayPane.populate(configManager.getGlobal_Parameters());
this.parameterArrayPane.populate(parameters);
}
public void update(ServerConfig configManager) {
configManager.setGlobeParameters(parameterArrayPane.updateParameters());
public void update() {
ParameterConfig.getInstance().setGlobeParameters(parameterArrayPane.updateParameters());
}
/**

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

@ -2,8 +2,8 @@ package com.fr.design.widget.ui.designer;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.TableData;
import com.fr.config.ServerConfig;
import com.fr.design.DesignModelAdapter;
import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
@ -152,7 +152,7 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
}
// 全局参数
parameters = ServerConfig.getInstance().getGlobal_Parameters();
parameters = ParameterConfig.getInstance().getGlobalParameters();
if (!ArrayUtils.isEmpty(parameters)) {
groupList.add(new ParameterGroup(Inter.getLocText("M_Server-Global_Parameters"), parameters));
}

Loading…
Cancel
Save