|
|
@ -104,12 +104,12 @@ import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
* The manager of Designer GUI. |
|
|
|
* The manager of Designer GUI. |
|
|
|
* 下面的作者日期都是随手写的,具体作者已经无法考究。 |
|
|
|
* 下面的作者日期都是随手写的,具体作者已经无法考究。 |
|
|
|
* |
|
|
|
* |
|
|
|
* @author anonymous |
|
|
|
* @author anonymous |
|
|
|
* @version 11.0 |
|
|
|
* @version 11.0 |
|
|
|
* created by anonymous on 2002/11/08 |
|
|
|
* created by anonymous on 2002/11/08 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReadable { |
|
|
|
public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReadable { |
|
|
|
|
|
|
|
|
|
|
|
private static final int MAX_SHOW_NUM = 10; |
|
|
|
private static final int MAX_SHOW_NUM = 10; |
|
|
|
private static final String VERSION_80 = "80"; |
|
|
|
private static final String VERSION_80 = "80"; |
|
|
|
private static final String VERSION_90 = "90"; |
|
|
|
private static final String VERSION_90 = "90"; |
|
|
@ -122,26 +122,26 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
* 指定默认工作空间 |
|
|
|
* 指定默认工作空间 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static final String DEFAULT_WORKSPACE_PATH = "fr.designer.workspace.default"; |
|
|
|
public static final String DEFAULT_WORKSPACE_PATH = "fr.designer.workspace.default"; |
|
|
|
|
|
|
|
|
|
|
|
public static final String LAST_EAST_REGION_LAYOUT = "LastEastRegionLayout"; |
|
|
|
public static final String LAST_EAST_REGION_LAYOUT = "LastEastRegionLayout"; |
|
|
|
public static final String LAST_WEST_REGION_LAYOUT = "LastWestRegionLayout"; |
|
|
|
public static final String LAST_WEST_REGION_LAYOUT = "LastWestRegionLayout"; |
|
|
|
|
|
|
|
|
|
|
|
private static DesignerEnvManager designerEnvManager; // gui.
|
|
|
|
private static DesignerEnvManager designerEnvManager; // gui.
|
|
|
|
private String activationKey = null; |
|
|
|
private String activationKey = null; |
|
|
|
private String logLocation = null; |
|
|
|
private String logLocation = null; |
|
|
|
private Rectangle windowBounds = null; // window bounds.
|
|
|
|
private Rectangle windowBounds = null; // window bounds.
|
|
|
|
private String DialogCurrentDirectory = null; |
|
|
|
private String DialogCurrentDirectory = null; |
|
|
|
private String CurrentDirectoryPrefix = null; |
|
|
|
private String CurrentDirectoryPrefix = null; |
|
|
|
|
|
|
|
|
|
|
|
private Map<String, List<String>> recentOpenedFileListMap = new HashMap<>(); |
|
|
|
private Map<String, List<String>> recentOpenedFileListMap = new HashMap<>(); |
|
|
|
private List<String> tempRecentOpenedFilePathList = new ArrayList<String>(); |
|
|
|
private List<String> tempRecentOpenedFilePathList = new ArrayList<String>(); |
|
|
|
private XmlElement<Map<String, List<String>>> recentOpenedMapping = SimpleXmlElement.of(recentOpenedFileListMap); |
|
|
|
private XmlElement<Map<String, List<String>>> recentOpenedMapping = SimpleXmlElement.of(recentOpenedFileListMap); |
|
|
|
|
|
|
|
|
|
|
|
private boolean showPaintToolBar = true; |
|
|
|
private boolean showPaintToolBar = true; |
|
|
|
private int maxNumberOrPreviewRow = 200; |
|
|
|
private int maxNumberOrPreviewRow = 200; |
|
|
|
|
|
|
|
|
|
|
|
private XmlElement<EnvConfiguration> envConfig = SimpleXmlElement.of(new EnvConfiguration()); |
|
|
|
private XmlElement<EnvConfiguration> envConfig = SimpleXmlElement.of(new EnvConfiguration()); |
|
|
|
|
|
|
|
|
|
|
|
private boolean showProjectPane = true; |
|
|
|
private boolean showProjectPane = true; |
|
|
|
private boolean showDataPane = true; |
|
|
|
private boolean showDataPane = true; |
|
|
|
//p:这是当前选择的数据库连接的名字,这个在新建数据源的时候用到.
|
|
|
|
//p:这是当前选择的数据库连接的名字,这个在新建数据源的时候用到.
|
|
|
@ -195,12 +195,12 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
private boolean embedServerLazyStartup = false; |
|
|
|
private boolean embedServerLazyStartup = false; |
|
|
|
//最近使用的颜色
|
|
|
|
//最近使用的颜色
|
|
|
|
private ColorSelectConfigManager configManager = new ColorSelectConfigManager(); |
|
|
|
private ColorSelectConfigManager configManager = new ColorSelectConfigManager(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 环境检测配置 |
|
|
|
* 环境检测配置 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private EnvDetectorConfig envDetectorConfig = EnvDetectorConfig.getInstance(); |
|
|
|
private EnvDetectorConfig envDetectorConfig = EnvDetectorConfig.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* alphafine |
|
|
|
* alphafine |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -214,11 +214,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
private DesignerPushUpdateConfigManager designerPushUpdateConfigManager = DesignerPushUpdateConfigManager.getInstance(); |
|
|
|
private DesignerPushUpdateConfigManager designerPushUpdateConfigManager = DesignerPushUpdateConfigManager.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
private VcsConfigManager vcsConfigManager = VcsConfigManager.getInstance(); |
|
|
|
private VcsConfigManager vcsConfigManager = VcsConfigManager.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
private DesignerStartupConfig designerStartupConfig = DesignerStartupConfig.getInstance(); |
|
|
|
private DesignerStartupConfig designerStartupConfig = DesignerStartupConfig.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
private SwitchForSwingChecker switchForSwingChecker = SwitchForSwingChecker.getInstance(); |
|
|
|
private SwitchForSwingChecker switchForSwingChecker = SwitchForSwingChecker.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
public static final String CAS_CERTIFICATE_PATH = "certificatePath"; |
|
|
|
public static final String CAS_CERTIFICATE_PATH = "certificatePath"; |
|
|
|
|
|
|
|
|
|
|
|
public static final String CAS_CERTIFICATE_PASSWORD = "certificatePass"; |
|
|
|
public static final String CAS_CERTIFICATE_PASSWORD = "certificatePass"; |
|
|
@ -267,7 +267,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
designerEnvManager = new DesignerEnvManager(); |
|
|
|
designerEnvManager = new DesignerEnvManager(); |
|
|
|
//REPORT-15332有一个国际化调用比较早,需要在这边就设置好locale,由于后台GeneralContext默认是China
|
|
|
|
//REPORT-15332有一个国际化调用比较早,需要在这边就设置好locale,由于后台GeneralContext默认是China
|
|
|
|
GeneralContext.setLocale(designerEnvManager.getLanguage()); |
|
|
|
GeneralContext.setLocale(designerEnvManager.getLanguage()); |
|
|
|
|
|
|
|
|
|
|
|
if (!asyncInitEnvManager()) { |
|
|
|
if (!asyncInitEnvManager()) { |
|
|
|
// 如果异步读取失败, 则恢复原来的逻辑
|
|
|
|
// 如果异步读取失败, 则恢复原来的逻辑
|
|
|
|
compatibleInitEnvManager(); |
|
|
|
compatibleInitEnvManager(); |
|
|
@ -287,9 +287,9 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
|
|
|
|
|
|
|
|
return designerEnvManager; |
|
|
|
return designerEnvManager; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void compatibleInitEnvManager() { |
|
|
|
private static void compatibleInitEnvManager() { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile()); |
|
|
|
XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile()); |
|
|
|
} catch (FileNotFoundException e) { |
|
|
|
} catch (FileNotFoundException e) { |
|
|
@ -299,7 +299,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 异步初始化环境管理, 提供配置, 帮助处理预期外的问题 |
|
|
|
* 异步初始化环境管理, 提供配置, 帮助处理预期外的问题 |
|
|
|
* 1-当优化开启时,才走异步逻辑 |
|
|
|
* 1-当优化开启时,才走异步逻辑 |
|
|
@ -308,7 +308,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
* @return 是/否 |
|
|
|
* @return 是/否 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private static boolean asyncInitEnvManager() { |
|
|
|
private static boolean asyncInitEnvManager() { |
|
|
|
|
|
|
|
|
|
|
|
AtomicBoolean noEx = new AtomicBoolean(false); |
|
|
|
AtomicBoolean noEx = new AtomicBoolean(false); |
|
|
|
OptimizeUtil.initiateOpen(DesignerEnvManager.class.getSimpleName().toLowerCase(), () -> { |
|
|
|
OptimizeUtil.initiateOpen(DesignerEnvManager.class.getSimpleName().toLowerCase(), () -> { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -326,7 +326,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void checkNameEnvMap() { |
|
|
|
public static void checkNameEnvMap() { |
|
|
|
|
|
|
|
|
|
|
|
if (designerEnvManager == null || designerEnvManager.getNameEnvMap().size() > 0) { |
|
|
|
if (designerEnvManager == null || designerEnvManager.getNameEnvMap().size() > 0) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -1060,11 +1060,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
public void setLanguage(Locale locale) { |
|
|
|
public void setLanguage(Locale locale) { |
|
|
|
this.language = locale; |
|
|
|
this.language = locale; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isStartupPageEnabled() { |
|
|
|
public boolean isStartupPageEnabled() { |
|
|
|
return this.designerStartupConfig.isEnabled(); |
|
|
|
return this.designerStartupConfig.isEnabled(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setStartupPageEnabled(boolean enabled) { |
|
|
|
public void setStartupPageEnabled(boolean enabled) { |
|
|
|
this.designerStartupConfig.setEnabled(enabled); |
|
|
|
this.designerStartupConfig.setEnabled(enabled); |
|
|
|
} |
|
|
|
} |
|
|
@ -1191,9 +1191,9 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
public void setCurrentDirectoryPrefix(String prefix) { |
|
|
|
public void setCurrentDirectoryPrefix(String prefix) { |
|
|
|
this.CurrentDirectoryPrefix = prefix; |
|
|
|
this.CurrentDirectoryPrefix = prefix; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<String> getRecentOpenedFilePathList4Env(String envName) { |
|
|
|
public List<String> getRecentOpenedFilePathList4Env(String envName) { |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(envName)) { |
|
|
|
if (StringUtils.isEmpty(envName)) { |
|
|
|
return tempRecentOpenedFilePathList; |
|
|
|
return tempRecentOpenedFilePathList; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -1201,7 +1201,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
recentOpenedMapping.getValue().put(envName, tempRecentOpenedFilePathList); |
|
|
|
recentOpenedMapping.getValue().put(envName, tempRecentOpenedFilePathList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return recentOpenedMapping.getValue().get(envName); |
|
|
|
return recentOpenedMapping.getValue().get(envName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1209,7 +1209,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
* 返回最近打开的文件路径列表 |
|
|
|
* 返回最近打开的文件路径列表 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<String> getRecentOpenedFilePathList() { |
|
|
|
public List<String> getRecentOpenedFilePathList() { |
|
|
|
|
|
|
|
|
|
|
|
return this.getRecentOpenedFilePathList4Env(getCurEnvName()); |
|
|
|
return this.getRecentOpenedFilePathList4Env(getCurEnvName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1713,7 +1713,16 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Carina.config(LanguageConfigProvider.class).setLocale(CommonUtils.localeToString(designerEnvManager.getLanguage())); |
|
|
|
setLocale(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void setLocale() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Carina.config(LanguageConfigProvider.class) |
|
|
|
|
|
|
|
.setLocale(CommonUtils.localeToString(designerEnvManager.getLanguage())); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1853,10 +1862,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
public void setLayoutTemplateStyle(int layoutTemplateStyle) { |
|
|
|
public void setLayoutTemplateStyle(int layoutTemplateStyle) { |
|
|
|
this.layoutTemplateStyle = layoutTemplateStyle; |
|
|
|
this.layoutTemplateStyle = layoutTemplateStyle; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void initElements(File xmlFile) throws XmlException { |
|
|
|
public void initElements(File xmlFile) throws XmlException { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
backupOldXmlFile(); |
|
|
|
backupOldXmlFile(); |
|
|
|
XmlInitialFactory xmlInitialFactory = XmlInitialFactory.create(xmlFile); |
|
|
|
XmlInitialFactory xmlInitialFactory = XmlInitialFactory.create(xmlFile); |
|
|
@ -1876,7 +1885,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.init("EnvConfigMap", (e) -> { |
|
|
|
.init("EnvConfigMap", (e) -> { |
|
|
|
|
|
|
|
|
|
|
|
final EnvConfiguration previousConfig = this.envConfig.getValue(); |
|
|
|
final EnvConfiguration previousConfig = this.envConfig.getValue(); |
|
|
|
this.envConfig = AsyncXmlElement.of(DesignerStartupPool.common(), () -> { |
|
|
|
this.envConfig = AsyncXmlElement.of(DesignerStartupPool.common(), () -> { |
|
|
|
DesignerEnvManager.this.readEnvConfigMap(e, previousConfig); |
|
|
|
DesignerEnvManager.this.readEnvConfigMap(e, previousConfig); |
|
|
@ -1928,13 +1937,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
throw new XmlException(e); |
|
|
|
throw new XmlException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 备份老的 xml 文件, 防止第一次修改存在问题 |
|
|
|
* 备份老的 xml 文件, 防止第一次修改存在问题 |
|
|
|
* 但是,只备份一次。其他都走老逻辑 |
|
|
|
* 但是,只备份一次。其他都走老逻辑 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void backupOldXmlFile() { |
|
|
|
private void backupOldXmlFile() { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
File oldFile = getEnvFile(); |
|
|
|
File oldFile = getEnvFile(); |
|
|
|
String newFilePath = ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env_backup.xml"; |
|
|
|
String newFilePath = ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env_backup.xml"; |
|
|
@ -1948,7 +1957,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} catch (Exception ignored) { |
|
|
|
} catch (Exception ignored) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Read XML.<br> |
|
|
|
* Read XML.<br> |
|
|
|
* The method will be invoked when read data from XML file.<br> |
|
|
|
* The method will be invoked when read data from XML file.<br> |
|
|
@ -2040,16 +2049,16 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readAlphaFineAttr(XMLableReader reader) { |
|
|
|
private void readAlphaFineAttr(XMLableReader reader) { |
|
|
|
|
|
|
|
|
|
|
|
AlphaFineConfigManager config = AlphaFineConfigManager.getInstance(); |
|
|
|
AlphaFineConfigManager config = AlphaFineConfigManager.getInstance(); |
|
|
|
reader.readXMLObject(config); |
|
|
|
reader.readXMLObject(config); |
|
|
|
this.alphaFineConfigManager = SimpleXmlElement.of(config); |
|
|
|
this.alphaFineConfigManager = SimpleXmlElement.of(config); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readEnvDetectorConfig(XMLableReader reader) { |
|
|
|
private void readEnvDetectorConfig(XMLableReader reader) { |
|
|
|
reader.readXMLObject(this.envDetectorConfig); |
|
|
|
reader.readXMLObject(this.envDetectorConfig); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readStartupConfig(XMLableReader reader) { |
|
|
|
private void readStartupConfig(XMLableReader reader) { |
|
|
|
reader.readXMLObject(this.designerStartupConfig); |
|
|
|
reader.readXMLObject(this.designerStartupConfig); |
|
|
|
} |
|
|
|
} |
|
|
@ -2165,9 +2174,9 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
this.setPaginationLineColor(new Color(Integer.parseInt(tmpVal))); |
|
|
|
this.setPaginationLineColor(new Color(Integer.parseInt(tmpVal))); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readEnvConfigMap(XMLableReader reader, EnvConfiguration envConfigs) { |
|
|
|
private void readEnvConfigMap(XMLableReader reader, EnvConfiguration envConfigs) { |
|
|
|
|
|
|
|
|
|
|
|
String currentEnv = reader.getAttrAsString("currentEnv", StringUtils.EMPTY); |
|
|
|
String currentEnv = reader.getAttrAsString("currentEnv", StringUtils.EMPTY); |
|
|
|
envConfigs.setCurEnvName(currentEnv); |
|
|
|
envConfigs.setCurEnvName(currentEnv); |
|
|
|
reader.readXMLObject(new XMLReadable() { |
|
|
|
reader.readXMLObject(new XMLReadable() { |
|
|
@ -2232,15 +2241,15 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readRecentOpenFileList(XMLableReader reader) { |
|
|
|
private void readRecentOpenFileList(XMLableReader reader) { |
|
|
|
|
|
|
|
|
|
|
|
readRecentOpenFileList0(reader); |
|
|
|
readRecentOpenFileList0(reader); |
|
|
|
checkRecentOpenedFileNum(); |
|
|
|
checkRecentOpenedFileNum(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readRecentOpenFileList0(XMLableReader reader) { |
|
|
|
private void readRecentOpenFileList0(XMLableReader reader) { |
|
|
|
|
|
|
|
|
|
|
|
reader.readXMLObject(new XMLReadable() { |
|
|
|
reader.readXMLObject(new XMLReadable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
@ -2358,13 +2367,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
writer.end(); |
|
|
|
writer.end(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void writeEnvDetectorConfig(XMLPrintWriter writer) { |
|
|
|
private void writeEnvDetectorConfig(XMLPrintWriter writer) { |
|
|
|
if (this.envDetectorConfig != null) { |
|
|
|
if (this.envDetectorConfig != null) { |
|
|
|
this.envDetectorConfig.writeXML(writer); |
|
|
|
this.envDetectorConfig.writeXML(writer); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void writeStartupConfig(XMLPrintWriter writer) { |
|
|
|
private void writeStartupConfig(XMLPrintWriter writer) { |
|
|
|
if (this.designerStartupConfig != null) { |
|
|
|
if (this.designerStartupConfig != null) { |
|
|
|
this.designerStartupConfig.writeXML(writer); |
|
|
|
this.designerStartupConfig.writeXML(writer); |
|
|
@ -2630,7 +2639,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void readFvsDesignerConfig(XMLableReader reader) { |
|
|
|
private void readFvsDesignerConfig(XMLableReader reader) { |
|
|
|
|
|
|
|
|
|
|
|
SimpleDesignerConfig config = fvsDesignerConfig.getValue(); |
|
|
|
SimpleDesignerConfig config = fvsDesignerConfig.getValue(); |
|
|
|
reader.readXMLObject(config); |
|
|
|
reader.readXMLObject(config); |
|
|
|
fvsDesignerConfig = SimpleXmlElement.of(config); |
|
|
|
fvsDesignerConfig = SimpleXmlElement.of(config); |
|
|
@ -2672,39 +2681,39 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada |
|
|
|
public SnapChatConfig getSnapChatConfig() { |
|
|
|
public SnapChatConfig getSnapChatConfig() { |
|
|
|
return snapChatConfig; |
|
|
|
return snapChatConfig; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private EnvConfiguration getEnvConfig() { |
|
|
|
private EnvConfiguration getEnvConfig() { |
|
|
|
|
|
|
|
|
|
|
|
return envConfig.getValue(); |
|
|
|
return envConfig.getValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Map<String, DesignerWorkspaceInfo> getNameEnvMap() { |
|
|
|
private Map<String, DesignerWorkspaceInfo> getNameEnvMap() { |
|
|
|
|
|
|
|
|
|
|
|
return getEnvConfig().getNameEnvMap(); |
|
|
|
return getEnvConfig().getNameEnvMap(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static class EnvConfiguration { |
|
|
|
private static class EnvConfiguration { |
|
|
|
|
|
|
|
|
|
|
|
// name和Env的键值对
|
|
|
|
// name和Env的键值对
|
|
|
|
private Map<String, DesignerWorkspaceInfo> nameEnvMap = new ListMap<>(); |
|
|
|
private Map<String, DesignerWorkspaceInfo> nameEnvMap = new ListMap<>(); |
|
|
|
// marks: 当前报表服务器名字
|
|
|
|
// marks: 当前报表服务器名字
|
|
|
|
private String curEnvName = null; |
|
|
|
private String curEnvName = null; |
|
|
|
|
|
|
|
|
|
|
|
public Map<String, DesignerWorkspaceInfo> getNameEnvMap() { |
|
|
|
public Map<String, DesignerWorkspaceInfo> getNameEnvMap() { |
|
|
|
return nameEnvMap; |
|
|
|
return nameEnvMap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setNameEnvMap(Map<String, DesignerWorkspaceInfo> nameEnvMap) { |
|
|
|
public void setNameEnvMap(Map<String, DesignerWorkspaceInfo> nameEnvMap) { |
|
|
|
this.nameEnvMap = nameEnvMap; |
|
|
|
this.nameEnvMap = nameEnvMap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getCurEnvName() { |
|
|
|
public String getCurEnvName() { |
|
|
|
return curEnvName; |
|
|
|
return curEnvName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setCurEnvName(String curEnvName) { |
|
|
|
public void setCurEnvName(String curEnvName) { |
|
|
|
this.curEnvName = curEnvName; |
|
|
|
this.curEnvName = curEnvName; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|