From 80acf12674b07b8b54d530225a93610dc3f13fe1 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Tue, 17 Jul 2018 10:42:40 +0800 Subject: [PATCH 1/8] REPORT-97399 --- .../design/dscolumn/SelectedDataColumnPane.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java index aec849e419..76ea00a029 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -88,6 +88,10 @@ public class SelectedDataColumnPane extends BasicPane { private static final Pattern COLUMN_NAME_PATTERN = Pattern.compile("[^\\d]"); + //数据集和数据列上次的名称 + private String oldDsName; + private String oldColumnName; + /** * 数据集下拉框变动后修改数据列下拉框加载状态的监听器 */ @@ -232,10 +236,19 @@ public class SelectedDataColumnPane extends BasicPane { DSColumn dsColumn = (DSColumn) value; String dsName = dsColumn.getDSName(); tableNameComboBox.setSelectedTableDataByName(dsName); - columnNameComboBox.setSelectedItem(TableDataColumn.getColumnName(dsColumn.getColumn())); + //数据列名称 + String dsColumnName = TableDataColumn.getColumnName(dsColumn.getColumn()); + columnNameComboBox.setSelectedItem(dsColumnName); ps = dsColumn.getParameters(); addListener(); + //比较上一次的数据集名称和数据列,不一样的话需要加载 + if(!StringUtils.equals(dsName,oldDsName) || !StringUtils.equals(dsColumnName,oldColumnName)){ + columnNameComboBox.setLoaded(false); + + oldDsName = dsName; + oldColumnName = dsColumnName; + } } /** From e508415a4cfebd0eedb2910168315d78c83b3ec1 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Tue, 17 Jul 2018 11:45:48 +0800 Subject: [PATCH 2/8] REPORT-97399 --- .../com/fr/design/gui/icombobox/LazyComboBox.java | 14 ++++++++++++++ .../design/dscolumn/SelectedDataColumnPane.java | 15 +++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index 575ab630ba..9ac46a4291 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -5,6 +5,7 @@ package com.fr.design.gui.icombobox; import com.fr.log.FineLoggerFactory; import com.fr.general.Inter; +import com.fr.stable.StringUtils; import javax.swing.DefaultComboBoxModel; import javax.swing.SwingWorker; @@ -35,6 +36,10 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen */ private Object initialSelected = null; + //数据集和模板的名称 + private String oldDsName; + private String oldTemplateName; + protected LazyComboBox() { super(); @@ -53,6 +58,15 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen */ public abstract Object[] load(); + public void changeLoaded(String dsName, String templateName){ + if (!StringUtils.equals(dsName, oldDsName) || !StringUtils.equals(templateName, oldTemplateName)){ + this.setLoaded(false); + + oldDsName = dsName; + oldTemplateName = templateName; + } + } + @Override public void setSelectedItem(Object anObject) { initialSelected = anObject; diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java index 76ea00a029..181c5fb7ff 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -9,6 +9,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.LazyComboBox; import com.fr.design.gui.ilable.UILabel; @@ -88,9 +89,6 @@ public class SelectedDataColumnPane extends BasicPane { private static final Pattern COLUMN_NAME_PATTERN = Pattern.compile("[^\\d]"); - //数据集和数据列上次的名称 - private String oldDsName; - private String oldColumnName; /** * 数据集下拉框变动后修改数据列下拉框加载状态的监听器 @@ -240,15 +238,12 @@ public class SelectedDataColumnPane extends BasicPane { String dsColumnName = TableDataColumn.getColumnName(dsColumn.getColumn()); columnNameComboBox.setSelectedItem(dsColumnName); ps = dsColumn.getParameters(); + //模板名称 + String templateName = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getName(); addListener(); - //比较上一次的数据集名称和数据列,不一样的话需要加载 - if(!StringUtils.equals(dsName,oldDsName) || !StringUtils.equals(dsColumnName,oldColumnName)){ - columnNameComboBox.setLoaded(false); - - oldDsName = dsName; - oldColumnName = dsColumnName; - } + //比较上一次的数据集名称和模板名称,不一样的话需要加载 + columnNameComboBox.changeLoaded(dsName, templateName); } /** From 37f3c96c58d9c34d58b805e50ee2358fde75fb72 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Tue, 17 Jul 2018 12:43:40 +0800 Subject: [PATCH 3/8] REPORT-97399 --- .../com/fr/design/gui/icombobox/LazyComboBox.java | 13 ------------- .../fr/design/dscolumn/SelectedDataColumnPane.java | 6 ++---- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index 9ac46a4291..095d3f302b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -36,10 +36,6 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen */ private Object initialSelected = null; - //数据集和模板的名称 - private String oldDsName; - private String oldTemplateName; - protected LazyComboBox() { super(); @@ -58,15 +54,6 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen */ public abstract Object[] load(); - public void changeLoaded(String dsName, String templateName){ - if (!StringUtils.equals(dsName, oldDsName) || !StringUtils.equals(templateName, oldTemplateName)){ - this.setLoaded(false); - - oldDsName = dsName; - oldTemplateName = templateName; - } - } - @Override public void setSelectedItem(Object anObject) { initialSelected = anObject; diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java index 181c5fb7ff..54aa686b04 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -238,12 +238,10 @@ public class SelectedDataColumnPane extends BasicPane { String dsColumnName = TableDataColumn.getColumnName(dsColumn.getColumn()); columnNameComboBox.setSelectedItem(dsColumnName); ps = dsColumn.getParameters(); - //模板名称 - String templateName = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getName(); addListener(); - //比较上一次的数据集名称和模板名称,不一样的话需要加载 - columnNameComboBox.changeLoaded(dsName, templateName); + //重新设置需要加载 + columnNameComboBox.setLoaded(false); } /** From c252a560ad3e406c3fe2502bb439363cc21e21f4 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Tue, 17 Jul 2018 12:45:13 +0800 Subject: [PATCH 4/8] REPORT-97399 --- .../main/java/com/fr/design/gui/icombobox/LazyComboBox.java | 1 - .../java/com/fr/design/dscolumn/SelectedDataColumnPane.java | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index 095d3f302b..575ab630ba 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -5,7 +5,6 @@ package com.fr.design.gui.icombobox; import com.fr.log.FineLoggerFactory; import com.fr.general.Inter; -import com.fr.stable.StringUtils; import javax.swing.DefaultComboBoxModel; import javax.swing.SwingWorker; diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java index 54aa686b04..fbe7d228a6 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -9,7 +9,6 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.LazyComboBox; import com.fr.design.gui.ilable.UILabel; @@ -234,9 +233,7 @@ public class SelectedDataColumnPane extends BasicPane { DSColumn dsColumn = (DSColumn) value; String dsName = dsColumn.getDSName(); tableNameComboBox.setSelectedTableDataByName(dsName); - //数据列名称 - String dsColumnName = TableDataColumn.getColumnName(dsColumn.getColumn()); - columnNameComboBox.setSelectedItem(dsColumnName); + columnNameComboBox.setSelectedItem(TableDataColumn.getColumnName(dsColumn.getColumn())); ps = dsColumn.getParameters(); addListener(); From cc5a71a31a3b3bcd71c8734d56f61a2266ee5d2b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 17 Jul 2018 14:55:31 +0800 Subject: [PATCH 5/8] =?UTF-8?q?REPORT-9757=20=E3=80=90=E9=98=BB=E5=A1=9E?= =?UTF-8?q?=E3=80=91=E7=A3=81=E7=9B=98=E6=96=87=E4=BB=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E8=B7=AF=E5=BE=84=E5=B0=91=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/webattr/WebCssPane.java | 2 +- .../src/main/java/com/fr/design/webattr/WebJsPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java index cb9909e2ed..b4600b753f 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java @@ -85,7 +85,7 @@ public class WebCssPane extends BasicPane { if (!"css".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().substring(1)); + localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉开头的"/"(如果有的话) centerPane.setAddEnabled(true); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java index ac2217c02f..0c92927f62 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java @@ -173,7 +173,7 @@ public class WebJsPane extends BasicPane { if (!"js".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().substring(1)); + localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉相对路径开头的"/"(如果有的话) editingPane.setAddEnabled(true); } From dcbd491207618e230123adb6f58c2b946327a69b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 17 Jul 2018 15:15:31 +0800 Subject: [PATCH 6/8] =?UTF-8?q?REPORT-9757=20=E3=80=90=E9=98=BB=E5=A1=9E?= =?UTF-8?q?=E3=80=91=E7=A3=81=E7=9B=98=E6=96=87=E4=BB=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E8=B7=AF=E5=BE=84=E5=B0=91=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AF=8D=3D>=E8=B0=83=E6=95=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/webattr/WebCssPane.java | 2 +- .../src/main/java/com/fr/design/webattr/WebJsPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java index b4600b753f..ff90867cb6 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java @@ -85,7 +85,7 @@ public class WebCssPane extends BasicPane { if (!"css".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉开头的"/"(如果有的话) + localText.setText(file.getPath()); centerPane.setAddEnabled(true); } diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java index 0c92927f62..7b7d00667c 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java @@ -173,7 +173,7 @@ public class WebJsPane extends BasicPane { if (!"js".equalsIgnoreCase(fileType)) { return; } - localText.setText(file.getPath().replaceFirst("^/*", "")); // 去掉相对路径开头的"/"(如果有的话) + localText.setText(file.getPath()); editingPane.setAddEnabled(true); } From e15f0e1bd0f01101e10aa18befafcd75518d40e7 Mon Sep 17 00:00:00 2001 From: ju Date: Tue, 17 Jul 2018 19:28:42 +0800 Subject: [PATCH 7/8] =?UTF-8?q?DEC-3146=20=E6=96=B0=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E8=AE=BE=E7=BD=AE=E6=88=90=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E7=9A=84=E5=90=8E=E5=8F=B0=E4=BC=9A=E6=8A=A5NPE=201?= =?UTF-8?q?=E3=80=81=E6=95=B4=E7=90=86=E6=89=80=E6=9C=89=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=8A=A0=E8=BD=BD=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E7=BB=9F=E4=B8=80=E5=88=B0core=E4=B8=AD?= =?UTF-8?q?=E5=8E=BB=E5=8A=A0=E8=BD=BD=202=E3=80=81=E6=87=92=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=EF=BC=9ALocale=E6=87=92=E5=8A=A0=E8=BD=BD=EF=BC=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=87=92=E5=8A=A0=E8=BD=BD=203=E3=80=81?= =?UTF-8?q?=E5=90=8E=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=96=87=E4=BB=B6=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E5=85=88=E5=8A=A0=E8=BD=BD=E7=9A=84=EF=BC=88=E5=8D=B3?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8F=92=E4=BB=B6=E7=9A=84=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=8F=AF=E4=BB=A5=E8=A6=86=E7=9B=96=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=89=204=E3=80=81?= =?UTF-8?q?=E6=94=AF=E6=8C=81remove=E6=93=8D=E4=BD=9C=EF=BC=8C=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E6=8E=89=E6=8F=92=E4=BB=B6=E5=90=8E=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E8=87=AA=E5=8A=A8=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/LocalePane.java | 61 +++++-------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java index 8d97152228..76258d8f19 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java @@ -12,10 +12,10 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.file.filetree.FileNode; import com.fr.general.GeneralUtils; import com.fr.general.Inter; +import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StableUtils; -import com.fr.stable.bridge.StableFactory; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; import com.fr.workspace.resource.WorkResourceOutputStream; @@ -37,7 +37,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; -import java.util.ResourceBundle; import java.util.Set; import java.util.Vector; @@ -121,43 +120,26 @@ public class LocalePane extends BasicPane { } private void initPredefinedProperties() { - - Map supportLocaleMap = Inter.getSupportLocaleMap(); - - String[] localeFiles = StableFactory.getLocaleFiles(); - - - + + Map supportLocaleMap = InterProviderFactory.getProvider().getSupportLocaleMap(); + + Map map; List sortKeys = new ArrayList(); - - - for (String path : localeFiles) { - ResourceBundle chineseBundle = loadResourceBundle(path, Locale.SIMPLIFIED_CHINESE); - sortKeys.addAll(chineseBundle.keySet()); - } + + + map = InterProviderFactory.getProvider().getLocalBundle(Locale.SIMPLIFIED_CHINESE).getMap(); + sortKeys.addAll(map.keySet()); Collections.sort(sortKeys); - - Map> localeResourceBundleMap = new HashMap>(); - for (Map.Entry entry : supportLocaleMap.entrySet()) { - Locale locale = entry.getKey(); - List list = new ArrayList<>(); - for (String path : localeFiles) { - ResourceBundle chineseBundle = loadResourceBundle(path, locale); - list.add(chineseBundle); - } - localeResourceBundleMap.put(locale, list); - } - + Map> data = new HashMap>(); - for (Map.Entry> entry : localeResourceBundleMap.entrySet()) { + for (Locale locale : supportLocaleMap.keySet()) { Vector column = new Vector(); - List rbs = entry.getValue(); for (String key : sortKeys) { - column.add(readText(rbs, key)); + column.add(InterProviderFactory.getProvider().getLocText(key)); } - data.put(entry.getKey(), column); + data.put(locale, column); + } - Vector keyVector = new Vector(); keyVector.addAll(sortKeys); @@ -167,20 +149,7 @@ public class LocalePane extends BasicPane { predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue()); } } - - private String readText(List rbs, String key) { - for (ResourceBundle rb : rbs) { - if (rb.containsKey(key)) { - return rb.getString(key); - } - } - return null; - } - - private ResourceBundle loadResourceBundle(String dir, Locale locale) { - return ResourceBundle.getBundle(dir, locale, Inter.class.getClassLoader()); - } - + private void initCustomProperties() throws Exception { FileNode[] fileNodes = FRContext.getFileNodes().list(ProjectConstants.LOCALE_NAME); From 3724be47b6be2d64062c1257db0607fbd371d917 Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 17 Jul 2018 21:56:48 +0800 Subject: [PATCH 8/8] =?UTF-8?q?CORE-113=20Session=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E6=94=B9=E8=BF=9B+=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BE=B5=E5=85=A5=E6=80=A7=E5=BC=BA=E7=9A=84=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=BE=85=E9=87=8D=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=BD=B1=E5=93=8D=E5=9F=BA=E6=9C=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/file/FileFILE.java | 24 +++++++++---------- .../errorinfo/ErrorInfoLogAppender.java | 12 +++++----- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FileFILE.java b/designer-base/src/main/java/com/fr/file/FileFILE.java index 4655ae1f30..decf027f09 100644 --- a/designer-base/src/main/java/com/fr/file/FileFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileFILE.java @@ -1,23 +1,22 @@ package com.fr.file; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; - -import javax.swing.Icon; -import javax.swing.filechooser.FileSystemView; - import com.fr.base.io.XMLEncryptUtils; import com.fr.design.gui.itree.filetree.FileComparator; import com.fr.design.gui.itree.filetree.FileTreeIcon; import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogManager; +import com.fr.general.SessionLocalManager; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; +import javax.swing.*; +import javax.swing.filechooser.FileSystemView; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; + public class FileFILE implements FILE { private File file; @@ -199,12 +198,11 @@ public class FileFILE implements FILE { if (file == null || !file.exists()) { return null; } - FRLogManager.declareResourceWriteStart(file.getAbsolutePath()); java.io.OutputStream out = null; try { out = new FileOutputStream(file); } catch (Exception e) { - throw FRLogManager.createLogPackedException(e); + throw SessionLocalManager.createLogPackedException(e); } return out; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index 74b36372b5..46efc15814 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -4,19 +4,19 @@ import com.fr.base.io.IOFile; import com.fr.base.io.XMLReadHelper; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; -import com.fr.general.FRLogManager; +import com.fr.general.SessionLocalManager; import com.fr.general.Inter; -import com.fr.general.LogDuration; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; +import com.fr.stable.web.SessionProvider; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; import com.fr.third.apache.log4j.AppenderSkeleton; import com.fr.third.apache.log4j.Level; import com.fr.third.apache.log4j.spi.LoggingEvent; -import com.fr.web.core.SessionDealWith; -import com.fr.web.core.SessionIDInfor; +import com.fr.web.core.SessionPoolManager; +import com.fr.web.core.TemplateSessionIDInfo; import com.fr.workspace.WorkContext; import java.io.ByteArrayInputStream; @@ -96,13 +96,13 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { } private String readTemplateID() { - LogDuration logDuration = FRLogManager.getSession(); + SessionProvider logDuration = SessionLocalManager.getSession(); if (logDuration == null) { return StringUtils.EMPTY; } String sessionID = logDuration.getSessionID(); - SessionIDInfor infor = SessionDealWith.getSessionIDInfor(sessionID); + TemplateSessionIDInfo infor = SessionPoolManager.getSessionIDInfor(sessionID, TemplateSessionIDInfo.class); if (infor == null) { return StringUtils.EMPTY; }