public void addFormattedJavadoc(StringBuilder sb, int indentLevel) { for (String javaDocLine : javaDocLines) { OutputUtilities.javaIndent(sb, indentLevel); sb.append(javaDocLine); OutputUtilities.newLine(sb); } }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb);
@Override public String getFormattedContent(int indentLevel) { StringBuilder sb = new StringBuilder(); OutputUtilities.xmlIndent(sb, indentLevel); sb.append(content); return sb.toString(); }
@Override public String getFormattedContent(int indentLevel) { StringBuilder sb = new StringBuilder(); OutputUtilities.xmlIndent(sb, indentLevel); sb.append('<'); sb.append(name); Collections.sort(attributes); for (Attribute att : attributes) { sb.append(' '); sb.append(att.getFormattedContent()); } if (elements.size() > 0) { sb.append(">"); //$NON-NLS-1$ for (Element element : elements) { OutputUtilities.newLine(sb); sb.append(element.getFormattedContent(indentLevel + 1)); } OutputUtilities.newLine(sb); OutputUtilities.xmlIndent(sb, indentLevel); sb.append("</"); //$NON-NLS-1$ sb.append(name); sb.append('>'); } else { sb.append(" />"); //$NON-NLS-1$ } return sb.toString(); }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb); newLine(sb); Method method = mtdIter.next(); sb.append(method.getFormattedContent(indentLevel, true)); if (mtdIter.hasNext()) { newLine(sb); newLine(sb); javaIndent(sb, indentLevel); sb.append('}');
addFormattedAnnotations(sb, indentLevel); OutputUtilities.javaIndent(sb, indentLevel); sb.append(getVisibility().getValue());
protected String getContentWithoutOuterTags(XmlElement xe){ int indentLevel = 0; StringBuilder sb = new StringBuilder(); Iterator<Element> iter = xe.getElements().iterator(); while(iter.hasNext()){ sb.append(iter.next().getFormattedContent(indentLevel)); if(iter.hasNext()){ OutputUtilities.newLine(sb); } } return sb.toString(); }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb); OutputUtilities.newLine(sb); Field field = fldIter.next(); sb.append(field.getFormattedContent(indentLevel)); OutputUtilities.newLine(sb); newLine(sb); Method method = mtdIter.next(); sb.append(method.getFormattedContent(indentLevel, true)); if (mtdIter.hasNext()) {
javaIndent(sb, 1); sb.append("\"delete from "); //$NON-NLS-1$ sb.append(escapeStringForJava( while (iter.hasNext()) { sb.setLength(0); javaIndent(sb, 1); if (and) { sb.append(" \"and "); //$NON-NLS-1$
@Override public String getFormattedContent(int indentLevel) { StringBuilder sb = new StringBuilder(); OutputUtilities.xmlIndent(sb, indentLevel); sb.append('<'); sb.append(name); for (Attribute att : attributes) { sb.append(' '); sb.append(att.getFormattedContent()); } if (elements.size() > 0) { sb.append(" >"); //$NON-NLS-1$ for (Element element : elements) { OutputUtilities.newLine(sb); sb.append(element.getFormattedContent(indentLevel + 1)); } OutputUtilities.newLine(sb); OutputUtilities.xmlIndent(sb, indentLevel); sb.append("</"); //$NON-NLS-1$ sb.append(name); sb.append('>'); } else { sb.append(" />"); //$NON-NLS-1$ } return sb.toString(); }
public String getFormattedContent() { StringBuilder sb = new StringBuilder(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); //$NON-NLS-1$ if (publicId != null && systemId != null) { OutputUtilities.newLine(sb); sb.append("<!DOCTYPE "); //$NON-NLS-1$ sb.append(rootElement.getName()); sb.append(" PUBLIC \""); //$NON-NLS-1$ sb.append(publicId); sb.append("\" \""); //$NON-NLS-1$ sb.append(systemId); sb.append("\" >"); //$NON-NLS-1$ } OutputUtilities.newLine(sb); sb.append(rootElement.getFormattedContent(0)); return sb.toString(); } }
public void addFormattedAnnotations(StringBuilder sb, int indentLevel) { for (String annotation : annotations) { OutputUtilities.javaIndent(sb, indentLevel); sb.append(annotation); OutputUtilities.newLine(sb); } }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb);
@Override public String getFormattedContent(int indentLevel) { StringBuilder sb = new StringBuilder(); OutputUtilities.xmlIndent(sb, indentLevel); sb.append(content); return sb.toString(); }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb); newLine(sb); Method method = mtdIter.next(); sb.append(method.getFormattedContent(indentLevel, true)); if (mtdIter.hasNext()) { newLine(sb); newLine(sb); javaIndent(sb, indentLevel); sb.append('}');
public String getFormattedContent(int indentLevel, CompilationUnit compilationUnit) { StringBuilder sb = new StringBuilder(); addFormattedJavadoc(sb, indentLevel); addFormattedAnnotations(sb, indentLevel); OutputUtilities.javaIndent(sb, indentLevel); sb.append(getVisibility().getValue()); if (isStatic()) { sb.append("static "); //$NON-NLS-1$ } if (isFinal()) { sb.append("final "); //$NON-NLS-1$ } if (isTransient()) { sb.append("transient "); //$NON-NLS-1$ } if (isVolatile()) { sb.append("volatile "); //$NON-NLS-1$ } sb.append(JavaDomUtils.calculateTypeName(compilationUnit, type)); sb.append(' '); sb.append(name); if (initializationString != null && initializationString.length() > 0) { sb.append(" = "); //$NON-NLS-1$ sb.append(initializationString); } sb.append(';'); return sb.toString(); }
@Override public String getFormattedContent(int indentLevel) { StringBuilder sb = new StringBuilder(); OutputUtilities.xmlIndent(sb, indentLevel); sb.append('<'); sb.append(name); for (Attribute att : attributes) { sb.append(' '); sb.append(att.getFormattedContent()); } if (elements.size() > 0) { sb.append(" >"); //$NON-NLS-1$ for (Element element : elements) { OutputUtilities.newLine(sb); sb.append(element.getFormattedContent(indentLevel + 1)); } OutputUtilities.newLine(sb); OutputUtilities.xmlIndent(sb, indentLevel); sb.append("</"); //$NON-NLS-1$ sb.append(name); sb.append('>'); } else { sb.append(" />"); //$NON-NLS-1$ } return sb.toString(); }
public String getFormattedContent() { StringBuilder sb = new StringBuilder(); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); //$NON-NLS-1$ if (publicId != null && systemId != null) { OutputUtilities.newLine(sb); sb.append("<!DOCTYPE "); //$NON-NLS-1$ sb.append(rootElement.getName()); sb.append(" PUBLIC \""); //$NON-NLS-1$ sb.append(publicId); sb.append("\" \""); //$NON-NLS-1$ sb.append(systemId); sb.append("\" >"); //$NON-NLS-1$ } OutputUtilities.newLine(sb); sb.append(rootElement.getFormattedContent(0)); return sb.toString(); } }
public void addFormattedJavadoc(StringBuilder sb, int indentLevel) { for (String javaDocLine : javaDocLines) { OutputUtilities.javaIndent(sb, indentLevel); sb.append(javaDocLine); OutputUtilities.newLine(sb); } }
newLine(sb); sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); sb.append(staticImport); sb.append(';'); newLine(sb); newLine(sb); Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); newLine(sb);