Skip to content

Commit

Permalink
Make property name more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Herrera committed Oct 19, 2017
1 parent 8b36245 commit 4d327fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Expand Up @@ -306,7 +306,7 @@ public void visit(final ClassOrInterfaceDeclaration n, final Void arg) {
public void visit(final JavadocComment n, final Void arg) { public void visit(final JavadocComment n, final Void arg) {
printer.print("/**"); printer.print("/**");
String commentContent = n.getContent(); String commentContent = n.getContent();
if (configuration.isNormalizeEolInComments()) { if (configuration.isNormalizeEolInComment()) {
commentContent = Utils.normalizeEolInTextBlock(commentContent, configuration.getEndOfLineCharacter()); commentContent = Utils.normalizeEolInTextBlock(commentContent, configuration.getEndOfLineCharacter());
} }
printer.print(commentContent); printer.print(commentContent);
Expand Down
Expand Up @@ -27,7 +27,7 @@
import static com.github.javaparser.utils.Utils.assertNotNull; import static com.github.javaparser.utils.Utils.assertNotNull;


public class PrettyPrinterConfiguration { public class PrettyPrinterConfiguration {
private boolean normalizeEolInComments = false; private boolean normalizeEolInComment = false;
private boolean printComments = true; private boolean printComments = true;
private boolean printJavaDoc = true; private boolean printJavaDoc = true;
private boolean columnAlignParameters = false; private boolean columnAlignParameters = false;
Expand All @@ -45,12 +45,12 @@ public PrettyPrinterConfiguration setIndent(String indent) {
return this; return this;
} }


public boolean isNormalizeEolInComments() { public boolean isNormalizeEolInComment() {
return normalizeEolInComments; return normalizeEolInComment;
} }


public PrettyPrinterConfiguration setNormalizeEolInComments(boolean normalizeEolInComments) { public PrettyPrinterConfiguration setNormalizeEolInComment(boolean normalizeEolInComment) {
this.normalizeEolInComments = normalizeEolInComments; this.normalizeEolInComment = normalizeEolInComment;
return this; return this;
} }


Expand Down
Expand Up @@ -21,7 +21,6 @@


package com.github.javaparser.bdd.steps; package com.github.javaparser.bdd.steps;


import com.github.javaparser.JavaParser;
import com.github.javaparser.ParseException; import com.github.javaparser.ParseException;
import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Node; import com.github.javaparser.ast.Node;
Expand All @@ -38,7 +37,6 @@
import java.net.URL; import java.net.URL;


import static com.github.javaparser.JavaParser.*; import static com.github.javaparser.JavaParser.*;
import static com.github.javaparser.utils.Utils.EOL;
import static com.github.javaparser.utils.Utils.readerToString; import static com.github.javaparser.utils.Utils.readerToString;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;


Expand Down Expand Up @@ -116,7 +114,7 @@ public void isPrintedAs(String src) {


@Then("it is printed with normalized EOL in comments as:$src") @Then("it is printed with normalized EOL in comments as:$src")
public void isPrintedWithEolAs(String src) { public void isPrintedWithEolAs(String src) {
PrettyPrinterConfiguration conf = new PrettyPrinterConfiguration().setNormalizeEolInComments(true); PrettyPrinterConfiguration conf = new PrettyPrinterConfiguration().setNormalizeEolInComment(true);
assertEquals(src.trim(), resultNode.toString(conf).trim()); assertEquals(src.trim(), resultNode.toString(conf).trim());
} }
} }

0 comments on commit 4d327fb

Please sign in to comment.