Home
last modified time | relevance | path

Searched refs:javaInput (Results 1 – 7 of 7) sorted by relevance

/external/google-java-format/core/src/main/java/com/google/googlejavaformat/java/
DJavaOutput.java50 private final Input javaInput; // Used to follow along while emitting the output. field in JavaOutput
69 public JavaOutput(String lineSeparator, Input javaInput, CommentsHelper commentsHelper) { in JavaOutput() argument
71 this.javaInput = javaInput; in JavaOutput()
73 kN = javaInput.getkN(); in JavaOutput()
98 int iN = javaInput.getLineCount(); in append()
100 && (javaInput.getRanges(iLine).isEmpty() in append()
101 || javaInput.getRanges(iLine).upperEndpoint() <= range.lowerEndpoint())) { in append()
102 if (javaInput.getRanges(iLine).isEmpty()) { in append()
217 RangeSet<Integer> iRangeSet = iRangeSet0.subRangeSet(Range.closed(0, javaInput.getkN())); in getFormatReplacements()
230 Input.Tok startTok = startTok(javaInput.getToken(range.lowerEndpoint())); in getFormatReplacements()
[all …]
DModifierOrderer.java87 static JavaInput reorderModifiers(JavaInput javaInput, Collection<Range<Integer>> characterRanges) in reorderModifiers() argument
89 if (javaInput.getTokens().isEmpty()) { in reorderModifiers()
92 return javaInput; in reorderModifiers()
94 RangeSet<Integer> tokenRanges = javaInput.characterRangesToTokenRanges(characterRanges); in reorderModifiers()
95 Iterator<? extends Token> it = javaInput.getTokens().iterator(); in reorderModifiers()
141 return applyReplacements(javaInput, replacements); in reorderModifiers()
160 JavaInput javaInput, TreeRangeMap<Integer, String> replacementMap) throws FormatterException { in applyReplacements() argument
165 return javaInput; in applyReplacements()
167 StringBuilder sb = new StringBuilder(javaInput.getText()); in applyReplacements()
DFormatter.java115 static void format(final JavaInput javaInput, JavaOutput javaOutput, JavaFormatterOptions options) in format() argument
134 return javaInput.getText(); in format()
141 javaInput.getText(), in format()
148 javaInput.setCompilationUnit(unit); in format()
154 OpsBuilder builder = new OpsBuilder(javaInput, javaOutput); in format()
171 builder.sync(javaInput.getText().length()); in format()
280 JavaInput javaInput = new JavaInput(input); in getFormatReplacements() local
285 javaInput = ModifierOrderer.reorderModifiers(javaInput, characterRanges); in getFormatReplacements()
289 new JavaOutput(lineSeparator, javaInput, new JavaCommentsHelper(lineSeparator, options)); in getFormatReplacements()
291 format(javaInput, javaOutput, options); in getFormatReplacements()
[all …]
DRemoveUnusedImports.java199 private static JCCompilationUnit parse(Context context, String javaInput) in parse() argument
217 return javaInput; in parse()
224 javaInput, /*keepDocComments=*/ true, /*keepEndPos=*/ true, /*keepLineMap=*/ true); in parse()
DStringWrapper.java409 String javaInput, TreeRangeMap<Integer, String> replacementMap) throws FormatterException { in applyReplacements() argument
414 return javaInput; in applyReplacements()
416 StringBuilder sb = new StringBuilder(javaInput); in applyReplacements()
/external/google-java-format/core/src/test/resources/com/google/googlejavaformat/java/testdata/
DUnformatted.output45 JavaInput javaInput = new JavaInput(inputString);
46 JavaOutput javaOutput = new JavaOutput(javaInput, new JavaCommentsHelper(), false);
48 Formatter.format(javaInput, javaOutput, MAX_WIDTH, errors, 1);
DUnformatted.input35 , Charsets . UTF_8 ) ; JavaInput javaInput = new JavaInput ( inputString ) ;
36 JavaOutput javaOutput = new JavaOutput ( javaInput , new JavaCommentsHelper (
38 format ( javaInput , javaOutput , MAX_WIDTH , errors , 1 ) ; assertTrue (