Browse Source

代码质量

master
XiaXiang 8 years ago
parent
commit
ab008a130a
  1. 26
      designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java

26
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() { reader.readXMLObject(new XMLReadable() {
@Override @Override
public void readXML(XMLableReader reader) { public void readXML(XMLableReader reader) {
if (reader.isChildNode()) { readCellModel(reader, list);
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());
// }
}
}
} }
} }
); );
@ -94,6 +84,20 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear
} }
private void readCellModel(XMLableReader reader, List<AlphaCellModel> 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 @Override
public void writeXML(XMLPrintWriter writer) { public void writeXML(XMLPrintWriter writer) {
writer.startTAG(XML_TAG); writer.startTAG(XML_TAG);

Loading…
Cancel
Save