From ab008a130a2fb1cd9cfc72d960bb204ba28536dd Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 23 May 2017 11:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchManager/RecentSearchManager.java | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java index 1a2aa9f79b..408ee2c84b 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java @@ -71,17 +71,7 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear reader.readXMLObject(new XMLReadable() { @Override public void readXML(XMLableReader reader) { - if (reader.isChildNode()) { - String nodeName = reader.getTagName(); - if (nodeName.equals("model")) { - String name = reader.getAttrAsString("cellModel", StringUtils.EMPTY); -// try { -// list.add(CellModelHelper.jsonToModel(new JSONObject(name))); -// } catch (JSONException e) { -// FRLogger.getLogger().error(e.getMessage()); -// } - } - } + readCellModel(reader, list); } } ); @@ -94,6 +84,20 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear } + private void readCellModel(XMLableReader reader, List list) { + if (reader.isChildNode()) { + String nodeName = reader.getTagName(); + if (nodeName.equals("model")) { + String name = reader.getAttrAsString("cellModel", StringUtils.EMPTY); + try { + list.add(CellModelHelper.jsonToModel(new JSONObject(name))); + } catch (JSONException e) { + FRLogger.getLogger().error(e.getMessage()); + } + } + } + } + @Override public void writeXML(XMLPrintWriter writer) { writer.startTAG(XML_TAG);