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