|
|
@ -1,7 +1,5 @@ |
|
|
|
package com.fr.design.actions.file; |
|
|
|
package com.fr.design.actions.file; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.cluster.ClusterBridge; |
|
|
|
|
|
|
|
import com.fr.cluster.engine.base.FineClusterConfig; |
|
|
|
|
|
|
|
import com.fr.config.Configuration; |
|
|
|
import com.fr.config.Configuration; |
|
|
|
import com.fr.config.ServerPreferenceConfig; |
|
|
|
import com.fr.config.ServerPreferenceConfig; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
@ -225,16 +223,17 @@ public class PreferencePane extends BasicPane { |
|
|
|
upmSelectorPane.add(useOptimizedUPMCheckbox); |
|
|
|
upmSelectorPane.add(useOptimizedUPMCheckbox); |
|
|
|
advancePane.add(upmSelectorPane); |
|
|
|
advancePane.add(upmSelectorPane); |
|
|
|
|
|
|
|
|
|
|
|
JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager")); |
|
|
|
//REPORT-23578 先屏蔽掉
|
|
|
|
useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager")); |
|
|
|
//JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager"));
|
|
|
|
dbmSelectorPane.add(useUniverseDBMCheckbox); |
|
|
|
//useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager"));
|
|
|
|
advancePane.add(dbmSelectorPane); |
|
|
|
//dbmSelectorPane.add(useUniverseDBMCheckbox);
|
|
|
|
|
|
|
|
//advancePane.add(dbmSelectorPane);
|
|
|
|
|
|
|
|
|
|
|
|
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Product_Improve")); |
|
|
|
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Product_Improve")); |
|
|
|
joinProductImproveCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Join_Product_Improve")); |
|
|
|
joinProductImproveCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Join_Product_Improve")); |
|
|
|
improvePane.add(joinProductImproveCheckBox); |
|
|
|
improvePane.add(joinProductImproveCheckBox); |
|
|
|
|
|
|
|
|
|
|
|
if (SupportOSImpl.AUTOPUSHUPDATE.support()) { |
|
|
|
if(SupportOSImpl.AUTOPUSHUPDATE.support()){ |
|
|
|
autoPushUpdateCheckBox = new UICheckBox(i18nText("Fine-Design_Automatic_Push_Update")); |
|
|
|
autoPushUpdateCheckBox = new UICheckBox(i18nText("Fine-Design_Automatic_Push_Update")); |
|
|
|
improvePane.add(autoPushUpdateCheckBox); |
|
|
|
improvePane.add(autoPushUpdateCheckBox); |
|
|
|
} |
|
|
|
} |
|
|
@ -512,8 +511,23 @@ public class PreferencePane extends BasicPane { |
|
|
|
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + i18nText("Fine-Design_Basic_Level_Setting")); |
|
|
|
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + i18nText("Fine-Design_Basic_Level_Setting")); |
|
|
|
logPane.add(logLevelPane); |
|
|
|
logPane.add(logLevelPane); |
|
|
|
logLevelComboBox = new UIComboBox(LOG); |
|
|
|
logLevelComboBox = new UIComboBox(LOG); |
|
|
|
logLevelComboBox.setEnabled(WorkContext.getCurrent().isLocal()); |
|
|
|
|
|
|
|
logLevelPane.add(logLevelComboBox); |
|
|
|
logLevelPane.add(logLevelComboBox); |
|
|
|
|
|
|
|
logLevelComboBox.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
Configurations.update(new Worker() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void run() { |
|
|
|
|
|
|
|
Log4jConfig.getInstance().setRootLevel((Level) logLevelComboBox.getSelectedItem()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Class<? extends Configuration>[] targets() { |
|
|
|
|
|
|
|
return new Class[]{Log4jConfig.class}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void createLanPane(JPanel generalPane) { |
|
|
|
private void createLanPane(JPanel generalPane) { |
|
|
@ -541,8 +555,8 @@ public class PreferencePane extends BasicPane { |
|
|
|
}); |
|
|
|
}); |
|
|
|
UILabel noticeLabel = new UILabel(i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));//sail:提示重启后生效
|
|
|
|
UILabel noticeLabel = new UILabel(i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));//sail:提示重启后生效
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize = {p}; |
|
|
|
double rowSize[] = {p}; |
|
|
|
double[] columnSize = {p, p, p}; |
|
|
|
double columnSize[] = {p, p, p}; |
|
|
|
Component[][] components = { |
|
|
|
Component[][] components = { |
|
|
|
{languageLabel, languageComboBox, noticeLabel}, |
|
|
|
{languageLabel, languageComboBox, noticeLabel}, |
|
|
|
}; |
|
|
|
}; |
|
|
@ -582,7 +596,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private void createLengthPane(JPanel advancePane) { |
|
|
|
private void createLengthPane(JPanel advancePane) { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize = {p}; |
|
|
|
double rowSize[] = {p}; |
|
|
|
|
|
|
|
|
|
|
|
// 长度单位选择
|
|
|
|
// 长度单位选择
|
|
|
|
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Setting_Ruler_Units")); |
|
|
|
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Setting_Ruler_Units")); |
|
|
@ -604,8 +618,8 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private void createServerPane(JPanel advancePane) { |
|
|
|
private void createServerPane(JPanel advancePane) { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize = {p}; |
|
|
|
double rowSize[] = {p}; |
|
|
|
double[] columnSize = {p, p, p}; |
|
|
|
double columnSize[] = {p, p, p}; |
|
|
|
|
|
|
|
|
|
|
|
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Web_Preview_Port_Setting")); |
|
|
|
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Web_Preview_Port_Setting")); |
|
|
|
advancePane.add(serverPortPane); |
|
|
|
advancePane.add(serverPortPane); |
|
|
@ -644,7 +658,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* The method of populate. |
|
|
|
* The method of populate. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param designerEnvManager 设计器环境管理器 |
|
|
|
* @param designerEnvManager |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void populate(DesignerEnvManager designerEnvManager) { |
|
|
|
public void populate(DesignerEnvManager designerEnvManager) { |
|
|
|
if (designerEnvManager == null) { |
|
|
|
if (designerEnvManager == null) { |
|
|
@ -673,7 +687,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
defaultStringToFormulaBox.setSelected(false); |
|
|
|
defaultStringToFormulaBox.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); |
|
|
|
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); |
|
|
|
if (ClusterBridge.isClusterMode()) { |
|
|
|
if (WorkContext.getCurrent().isCluster()) { |
|
|
|
vcsEnableCheckBox.setEnabled(false); |
|
|
|
vcsEnableCheckBox.setEnabled(false); |
|
|
|
gcEnableCheckBox.setEnabled(false); |
|
|
|
gcEnableCheckBox.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
@ -715,7 +729,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM()); |
|
|
|
useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM()); |
|
|
|
|
|
|
|
|
|
|
|
useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM()); |
|
|
|
//useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM());
|
|
|
|
|
|
|
|
|
|
|
|
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace()); |
|
|
|
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace()); |
|
|
|
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit()); |
|
|
|
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit()); |
|
|
@ -812,30 +826,23 @@ public class PreferencePane extends BasicPane { |
|
|
|
designerEnvManager.setUndoLimit(MAX_UNDO_LIMIT_50); |
|
|
|
designerEnvManager.setUndoLimit(MAX_UNDO_LIMIT_50); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (WorkContext.getCurrent().isLocal()) { |
|
|
|
Configurations.update(new Worker() { |
|
|
|
Configurations.update(new Worker() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
Log4jConfig.getInstance().setRootLevel(((Level) logLevelComboBox.getSelectedItem())); |
|
|
|
Level level = (Level) logLevelComboBox.getSelectedItem(); |
|
|
|
} |
|
|
|
if (level != null) { |
|
|
|
|
|
|
|
Log4jConfig.getInstance().setRootLevel(level); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Class<? extends Configuration>[] targets() { |
|
|
|
public Class<? extends Configuration>[] targets() { |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
return new Class[]{Log4jConfig.class}; |
|
|
|
Class<? extends Configuration>[] classes = new Class[]{Log4jConfig.class}; |
|
|
|
} |
|
|
|
return classes; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configurations.update(new Worker() { |
|
|
|
Configurations.update(new Worker() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); |
|
|
|
ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); |
|
|
|
ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected()); |
|
|
|
//ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected());
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|