/** * @param text * @param substituteChars * @return */ public static String translateWriteText(String text, HashMap substituteChars) { return translateWriteText(text, null, substituteChars); }
public static String translateWriteText(String text, HashMap<?, ?> substituteChars) { return translateWriteText(text, null, substituteChars); }
protected void writeElements(String indent, PrintWriter writer) { String newIndent = indent + XMLPrintHandler.XML_INDENT; // Print contents if ((fFieldContent != null) && (fFieldContent.length() > 0)) { // Trim leading and trailing whitespace // Encode characters // Preserve tag exceptions writer.write(newIndent + PDETextHelper.translateWriteText(fFieldContent.trim(), DEFAULT_TAG_EXCEPTIONS, DEFAULT_SUBSTITUTE_CHARS) + "\n"); //$NON-NLS-1$ } }
@Override protected void writeElements(String indent, PrintWriter writer) { String newIndent = indent + XMLPrintHandler.XML_INDENT; // Print contents if ((fFieldContent != null) && (fFieldContent.length() > 0)) { // Trim leading and trailing whitespace // Encode characters // Preserve tag exceptions writer.write(newIndent + PDETextHelper.translateWriteText(fFieldContent.trim(), DEFAULT_TAG_EXCEPTIONS, DEFAULT_SUBSTITUTE_CHARS) + "\n"); //$NON-NLS-1$ } }
protected void writeElements(String indent, PrintWriter writer) { String newIndent = indent + XMLPrintHandler.XML_INDENT; // Print contents if ((fFieldContent != null) && (fFieldContent.length() > 0)) { // Trim leading and trailing whitespace // Encode characters // Preserve tag exceptions writer.write(newIndent + PDETextHelper.translateWriteText(fFieldContent.trim(), DEFAULT_TAG_EXCEPTIONS, DEFAULT_SUBSTITUTE_CHARS) + "\n"); //$NON-NLS-1$ } }
protected void writeAttributes(StringBuffer buffer) { // Print name attribute if ((fFieldName != null) && (fFieldName.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute( ATTRIBUTE_NAME, PDETextHelper.translateWriteText( fFieldName.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
@Override public String write() { String content = getText().trim(); return PDETextHelper.translateWriteText(content, TAG_EXCEPTIONS, SUBSTITUTE_CHARS); }
@Override public String write() { String content = getText().trim(); return PDETextHelper.translateWriteText(content, SUBSTITUTE_CHARS); }
protected void writeAttributes(StringBuffer buffer) { // Print task attribute if ((fFieldTask != null) && (fFieldTask.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_TASK, PDETextHelper.translateWriteText(fFieldTask.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
protected void writeAttributes(StringBuffer buffer) { // Print name attribute if ((fFieldName != null) && (fFieldName.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_NAME, PDETextHelper.translateWriteText(fFieldName.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
protected void writeAttributes(StringBuffer buffer) { // Print task attribute if ((fFieldTask != null) && (fFieldTask.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute( ATTRIBUTE_TASK, PDETextHelper.translateWriteText( fFieldTask.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
@Override public String write() { String content = getText().trim(); return PDETextHelper.translateWriteText(content, TAG_EXCEPTIONS, SUBSTITUTE_CHARS); }
public String write() { String content = getText().trim(); return PDETextHelper.translateWriteText(content, TAG_EXCEPTIONS, SUBSTITUTE_CHARS); }
public String write() { String content = getText().trim(); return PDETextHelper.translateWriteText(content, TAG_EXCEPTIONS, SUBSTITUTE_CHARS); }
@Override protected void writeAttributes(StringBuilder buffer) { // Print name attribute if ((fFieldName != null) && (fFieldName.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_NAME, PDETextHelper.translateWriteText(fFieldName.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
@Override protected void writeAttributes(StringBuilder buffer) { // Print task attribute if ((fFieldTask != null) && (fFieldTask.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_TASK, PDETextHelper.translateWriteText(fFieldTask.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
protected void writeAttributes(StringBuffer buffer) { // Print name attribute if ((fFieldName != null) && (fFieldName.length() > 0)) { // No trim required // No encode required buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_NAME, fFieldName)); } // Print value attribute if ((fFieldValue != null) && (fFieldValue.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_VALUE, PDETextHelper.translateWriteText(fFieldValue.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
@Override protected void writeAttributes(StringBuilder buffer) { // Print name attribute if ((fFieldName != null) && (fFieldName.length() > 0)) { // No trim required // No encode required buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_NAME, fFieldName)); } // Print value attribute if ((fFieldValue != null) && (fFieldValue.length() > 0)) { // Trim leading and trailing whitespace // Encode characters buffer.append(XMLPrintHandler.wrapAttribute(ATTRIBUTE_VALUE, PDETextHelper.translateWriteText(fFieldValue.trim(), DEFAULT_SUBSTITUTE_CHARS))); } }
public void write(String indent, PrintWriter writer) { String newIndent = indent + XMLPrintHandler.XML_INDENT; try { // Start element XMLPrintHandler.printBeginElement(writer, ELEMENT_DESCRIPTION, indent, false); // Print contents if ((fContent != null) && (fContent.length() > 0)) { writer.write(newIndent + PDETextHelper.translateWriteText(fContent.trim(), TAG_EXCEPTIONS, SUBSTITUTE_CHARS) + "\n"); //$NON-NLS-1$ } // End element XMLPrintHandler.printEndElement(writer, ELEMENT_DESCRIPTION, indent); } catch (IOException e) { // Suppress //e.printStackTrace(); } }
public void write(String indent, PrintWriter writer) { String newIndent = indent + XMLPrintHandler.XML_INDENT; try { // Start element XMLPrintHandler.printBeginElement(writer, ELEMENT_ONCOMPLETION, indent, false); // Print contents if ((fContent != null) && (fContent.length() > 0)) { writer.write(newIndent + PDETextHelper.translateWriteText(fContent.trim(), TAG_EXCEPTIONS, SUBSTITUTE_CHARS) + "\n"); //$NON-NLS-1$ } // End element XMLPrintHandler.printEndElement(writer, ELEMENT_ONCOMPLETION, indent); } catch (IOException e) { // Suppress //e.printStackTrace(); } }