|
|
|
@ -811,8 +811,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort())); |
|
|
|
|
|
|
|
|
|
if (useOptimizedUPMCheckbox != null) { |
|
|
|
|
useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM() |
|
|
|
|
|| DesignerEnvManager.getEnvManager().isUseOptimizedUPM4Adapter()); |
|
|
|
|
useOptimizedUPMCheckbox.setSelected(checkOptimizedUPMUse()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (useNewVersionLoginCheckbox != null) { |
|
|
|
@ -856,6 +855,15 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
this.startupPageEnabledCheckBox.setSelected(designerEnvManager.isStartupPageEnabled()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean checkOptimizedUPMUse() { |
|
|
|
|
//如果是没手动配置过则默认开启
|
|
|
|
|
//isUseNewPluginFirst如果为true说明没手动配置过,直接开启
|
|
|
|
|
//走到这里说明checkBox不为空,机型肯定符合
|
|
|
|
|
return DesignerEnvManager.getEnvManager().isUseNewPluginFirst() |
|
|
|
|
|| ServerPreferenceConfig.getInstance().isUseOptimizedUPM() |
|
|
|
|
|| DesignerEnvManager.getEnvManager().isUseOptimizedUPM4Adapter(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int chooseCase(int sign) { |
|
|
|
|
switch (sign) { |
|
|
|
|
case 0: |
|
|
|
@ -913,7 +921,10 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
designerEnvManager.setJoinProductImprove(this.joinProductImproveCheckBox.isSelected()); |
|
|
|
|
designerEnvManager.setEmbedServerLazyStartup(this.embedServerLazyStartupCheckBox.isSelected()); |
|
|
|
|
designerEnvManager.setImageCompress(this.imageCompressPanelCheckBox.isSelected()); |
|
|
|
|
designerEnvManager.setUseOptimizedUPM4Adapter(this.useOptimizedUPMCheckbox != null && this.useOptimizedUPMCheckbox.isSelected()); |
|
|
|
|
boolean optimizedUPMFlag = this.useOptimizedUPMCheckbox != null && this.useOptimizedUPMCheckbox.isSelected(); |
|
|
|
|
designerEnvManager.setUseOptimizedUPM4Adapter(optimizedUPMFlag); |
|
|
|
|
//只有取消掉使用新插件管理器这个选项才需要把useNewPluginFirst置false(意味着用户手动配置了,如果勾选着的话,这个useNewPluginFirst为true就行了)
|
|
|
|
|
designerEnvManager.setUseNewPluginFirst(optimizedUPMFlag); |
|
|
|
|
designerEnvManager.setCloudAnalyticsDelay(this.cloudAnalyticsDelayCheckBox.isSelected()); |
|
|
|
|
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); |
|
|
|
|
vcsConfigManager.setSaveInterval(this.saveIntervalEditor.getValue()); |
|
|
|
|