public void visitEmptyDeclaration(EmptyDeclaration e) { formatComments(e, true, true, false); }
public EmptyDeclaration skipDeclaration(Element e, String... preMessages) { if (result.config.limitComments) { return null; } List<String> mess = new ArrayList<String>(); if (preMessages != null) { mess.addAll(Arrays.asList(preMessages)); } mess.addAll(Arrays.asList("SKIPPED:", new Printer(null).formatComments(e, true, true, false).toString(), getFileCommentContent(e), e.toString().replace("*/", "* /"))); return new EmptyDeclaration(mess.toArray(new String[0])); }
public EmptyDeclaration skipDeclaration(Element e, String... preMessages) { if (result.config.limitComments) { return null; } List<String> mess = new ArrayList<String>(); if (preMessages != null) { mess.addAll(Arrays.asList(preMessages)); } mess.addAll(Arrays.asList("SKIPPED:", new Printer(null).formatComments(e, true, true, false).toString(), getFileCommentContent(e), e.toString().replace("*/", "* /"))); return new EmptyDeclaration(mess.toArray(new String[0])); }
public EmptyDeclaration skipDeclaration(Element e, String... preMessages) { if (result.config.limitComments) { return null; } List<String> mess = new ArrayList<String>(); if (preMessages != null) { mess.addAll(Arrays.asList(preMessages)); } mess.addAll(Arrays.asList("SKIPPED:", new Printer(null).formatComments(e, true, true, false).toString(), getFileCommentContent(e), e.toString().replace("*/", "* /"))); return new EmptyDeclaration(mess.toArray(new String[0])); }
public EmptyDeclaration skipDeclaration(Element e, String... preMessages) { if (result.config.limitComments) { return null; } List<String> mess = new ArrayList<String>(); if (preMessages != null) { mess.addAll(Arrays.asList(preMessages)); } mess.addAll(Arrays.asList("SKIPPED:", new Printer(null).formatComments(e, true, true, false).toString(), getFileCommentContent(e), e.toString().replace("*/", "* /"))); return new EmptyDeclaration(mess.toArray(new String[0])); }
public Printer formatComments(Element e, boolean mergeCommentsAfter, boolean allowLineComments, boolean skipLineAfter, String... otherComments) { String cb = e.getCommentBefore(), ca = e.getCommentAfter(); if (cb != null || ca != null || otherComments.length > 0) { append(formatComments(indent, cb, ca, mergeCommentsAfter, allowLineComments, skipLineAfter, otherComments)); } return this; }
public void visitSimpleTypeRef(SimpleTypeRef e) { formatComments(e, true, false, false).modifiersStringPrefix(e).append(e.getName()); }
public void visitTaggedTypeRefDeclaration(TaggedTypeRefDeclaration e) { if (e.getTaggedTypeRef() == null) { return; } TaggedTypeRef tr = e.getTaggedTypeRef(); formatComments(e, false, true, true); // formatComments(tr, false, true, true); //append(tr, tr.isForwardDeclaration() ? ";" : null, e.getCommentAfter()); append(tr, ";", e.getCommentAfter()); }
public void visitTypeDef(TypeDef e) { formatComments(e, false, true, true); modifiersStringPrefix(e); append("typedef "); valueTypeAndStorageSuffix(e); append(";"); if (e.getCommentAfter() != null) { append(" ", e.getCommentAfter().trim()); } }
public void visitVariablesDeclaration(VariablesDeclaration e) { formatComments(e, false, true, true); if (!e.getAnnotations().isEmpty()) { implode(e.getAnnotations(), "\n" + indent).append("\n", indent); } modifiersStringPrefix(e); valueTypeAndStorageSuffix(e); if (!(e.getParentElement() instanceof Catch)) { append(";"); } if (e.getCommentAfter() != null) { space().append(e.getCommentAfter()); } }
public void visitEnum(Enum e) { formatComments(e, false, true, true);
public void visitEnumItem(EnumItem e) { formatComments(e, false, true, true); append(e.getName()); if (!e.getArguments().isEmpty()) { if (e.getType() == Type.C) { append(" = ", e.getArguments().get(0)); } else { append("("); implode(e.getArguments(), ", "); append(")"); } } if (e.getBody() != null) { append(" {\n\t", indent); indent(); implode(e.getBody().getDeclarations(), "\n" + indent); deindent(); append("\n", indent, "}"); } space(e.getCommentAfter() != null).append(e.getCommentAfter()); }
public void visitStruct(Struct e) { formatComments(e, false, true, true); if (!e.getAnnotations().isEmpty()) { implode(e.getAnnotations(), "\n" + indent).append("\n", indent);
formatComments(e, false, true, true); if (!e.getAnnotations().isEmpty()) { implode(e.getAnnotations(), "\n" + indent).append("\n", indent);