final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr) ((ModifiedAttribute) obj).getValue()).getValue(); if (distinguishObject(modifObj) != Attr.isValid("SERIALVALUE")) { //NOI18N return; } } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString() : obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
/**Method for back compatibility; called in write*/ private void transformMe() { int objType; if (obj == null) { return; } Object unObj = unMarshallObjectRecursively(obj); if (unObj != null) { if ((objType = XMLMapAttr.Attr.distinguishObject(unObj)) != XMLMapAttr.Attr.isValid("SERIALVALUE")) { // NOI18N obj = null; putEntry(ALLOWED_ATTR_KEYS[objType], unObj.toString()); } else { String newValue; try { newValue = encodeValue(unObj); } catch (IOException iox) { return; } obj = null; putEntry(ALLOWED_ATTR_KEYS[objType], newValue); } } }
} else { if ( (objType = XMLMapAttr.Attr.distinguishObject(value)) == XMLMapAttr.Attr.isValid( "SERIALVALUE"
t.setAttr (arr[1], attrName, null); // clear the attribute }else { if ((objType = XMLMapAttr.Attr.distinguishObject (value)) == XMLMapAttr.Attr.isValid("SERIALVALUE") ) { // NOI18N t.setAttr (arr[1], attrName, value);//change value instead of marshall
t.setAttr (arr[1], attrName, null); // clear the attribute }else { if ((objType = XMLMapAttr.Attr.distinguishObject (value)) == XMLMapAttr.Attr.isValid("SERIALVALUE") ) { // NOI18N t.setAttr (arr[1], attrName, value);//change value instead of marshall
final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr)((ModifiedAttribute)obj).getValue ()).getValue (); if (distinguishObject (modifObj) != Attr.isValid("SERIALVALUE")) //NOI18N return; } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString():obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
final void maybeAddSerValueComment(PrintWriter pw, String indent) { if (obj != null) { Object modifObj = null; if (obj instanceof ModifiedAttribute) { modifObj = ((Attr)((ModifiedAttribute)obj).getValue ()).getValue (); if (distinguishObject (modifObj) != Attr.isValid("SERIALVALUE")) //NOI18N return; } // Important for debugging to know what this stuff really is. // Note this comment is only written to disk when the attr is // first saved; after that successive saves will just know the // ser value and will not print the comment. So look at .nbattrs // immediately after setting something serialized. --jglick pw.print(indent); pw.print("<!-- "); // NOI18N String s = (modifObj != null) ? modifObj.toString():obj.toString(); if (s.indexOf("--") != -1) { // NOI18N // XML comment no-no. s = s.replace('-', '_'); // NOI18N } pw.print(s); pw.println(" -->"); // NOI18N } }
/**Method for back compatibility; called in write*/ private void transformMe () { int objType; if (obj == null) return; Object unObj = unMarshallObjectRecursively (obj); if (unObj != null) { if ((objType = XMLMapAttr.Attr.distinguishObject (unObj)) != XMLMapAttr.Attr.isValid("SERIALVALUE")) { // NOI18N obj = null; putEntry (ALLOWED_ATTR_KEYS[objType],unObj.toString()); } else { String newValue; try { newValue = encodeValue(unObj); } catch (IOException iox) { return; } obj = null; putEntry(ALLOWED_ATTR_KEYS[objType],newValue); } } }
/**Method for back compatibility; called in write*/ private void transformMe () { int objType; if (obj == null) return; Object unObj = unMarshallObjectRecursively (obj); if (unObj != null) { if ((objType = XMLMapAttr.Attr.distinguishObject (unObj)) != XMLMapAttr.Attr.isValid("SERIALVALUE")) { // NOI18N obj = null; putEntry (ALLOWED_ATTR_KEYS[objType],unObj.toString()); } else { String newValue; try { newValue = encodeValue(unObj); } catch (IOException iox) { return; } obj = null; putEntry(ALLOWED_ATTR_KEYS[objType],newValue); } } }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
final String getKeyForPrint() { if ((obj != null) && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr) ((ModifiedAttribute) obj).getValue(); int keyIdx = Attr.isValid("SERIALVALUE"); //NOI18N if (modifAttr != null) { keyIdx = distinguishObject(modifAttr.getValue()); } String[] keyArray = getAttrTypes(); return keyArray[keyIdx]; } return getKey(); }