|
|
@ -12,6 +12,11 @@ public class DesignerStartupConfig implements XMLable { |
|
|
|
|
|
|
|
|
|
|
|
private static final DesignerStartupConfig INSTANCE = new DesignerStartupConfig(); |
|
|
|
private static final DesignerStartupConfig INSTANCE = new DesignerStartupConfig(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 加上版本,不然回滚到 1107 会有兼容问题 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static final String TAG_ENABLED = "isEnabled1108"; |
|
|
|
|
|
|
|
|
|
|
|
public static DesignerStartupConfig getInstance() { |
|
|
|
public static DesignerStartupConfig getInstance() { |
|
|
|
|
|
|
|
|
|
|
|
return INSTANCE; |
|
|
|
return INSTANCE; |
|
|
@ -40,14 +45,14 @@ public class DesignerStartupConfig implements XMLable { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
|
if (reader.isAttr()) { |
|
|
|
if (reader.isAttr()) { |
|
|
|
this.setEnabled(reader.getAttrAsBoolean("isEnabled", true)); |
|
|
|
this.setEnabled(reader.getAttrAsBoolean(TAG_ENABLED, true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void writeXML(XMLPrintWriter writer) { |
|
|
|
public void writeXML(XMLPrintWriter writer) { |
|
|
|
writer.startTAG(XML_TAG); |
|
|
|
writer.startTAG(XML_TAG); |
|
|
|
writer.attr("isEnabled", this.isEnabled()); |
|
|
|
writer.attr(TAG_ENABLED, this.isEnabled()); |
|
|
|
writer.end(); |
|
|
|
writer.end(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|