OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:TokenTextElement
(Results
1 - 6
of
6
) sorted by null
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
TokenTextElement.java
28
class
TokenTextElement
extends TextElement {
31
TokenTextElement
(JavaToken token) {
35
TokenTextElement
(int tokenKind, String text) {
39
TokenTextElement
(int tokenKind) {
66
TokenTextElement
that = (
TokenTextElement
) o;
TextElementIteratorsFactory.java
159
private static Iterator<
TokenTextElement
> reverseIterator(NodeText nodeText, int index) {
161
if (textElement instanceof
TokenTextElement
) {
162
return new SingleElementIterator<
TokenTextElement
>((
TokenTextElement
)textElement) {
177
public static Iterator<
TokenTextElement
> reverseIterator(NodeText nodeText) {
181
public static Iterator<
TokenTextElement
> partialReverseIterator(NodeText nodeText, int fromIndex) {
182
List<Iterator<
TokenTextElement
>> elements = new LinkedList<>();
Difference.java
402
return new
TokenTextElement
(((CsmToken) csmElement).getTokenType(), ((CsmToken) csmElement).getContent(null));
408
private List<TextElement> processIndentation(List<
TokenTextElement
> indentation, List<TextElement> prevElements) {
417
if (afterNl && e instanceof
TokenTextElement
&& TokenTypes.isWhitespace(((
TokenTextElement
)e).getTokenKind())) {
429
res.add(new
TokenTextElement
(SPACE));
430
res.add(new
TokenTextElement
(SPACE));
431
res.add(new
TokenTextElement
(SPACE));
432
res.add(new
TokenTextElement
(SPACE));
488
List<
TokenTextElement
> indentation = LexicalPreservingPrinter.findIndentation(node);
530
indentation.add(new
TokenTextElement
(GeneratedJavaParserConstants.SPACE))
[
all
...]
LexicalPreservingPrinter.java
155
List<
TokenTextElement
> matchingTokens = nodeText.getElements().stream().filter(e -> e.isToken(JAVADOC_COMMENT)
156
&& ((
TokenTextElement
) e).getText().equals("/**" + javadocComment.getContent() + "*/")).map(e -> (
TokenTextElement
) e).collect(Collectors.toList());
171
List<
TokenTextElement
> matchingTokens = nodeText.getElements().stream().filter(e -> e.isToken(JAVADOC_COMMENT)
172
&& ((
TokenTextElement
) e).getText().equals("/**" + oldJavadocComment.getContent() + "*/")).map(e -> (
TokenTextElement
) e).collect(Collectors.toList());
177
nodeText.replace(matchingTokens.get(0), new
TokenTextElement
(JAVADOC_COMMENT, "/**" + newJavadocComment.getContent() + "*/"));
272
elements.add(new Pair<>(token.getRange().get(), new
TokenTextElement
(token)));
282
private static Iterator<
TokenTextElement
> tokensPreceeding(final Node node) {
382
List<
TokenTextElement
> indentation = findIndentation(node)
[
all
...]
NodeText.java
86
elements.add(new
TokenTextElement
(tokenKind, text));
90
elements.add(index, new
TokenTextElement
(tokenKind, text));
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
LexicalPreservingPrinterTest.java
55
assertEquals(true, getTextForNode(classA).getTextElement(6) instanceof
TokenTextElement
);
56
assertEquals(GeneratedJavaParserConstants.EOF, ((
TokenTextElement
)getTextForNode(classA).getTextElement(6)).getTokenKind());
235
List<
TokenTextElement
> indentation = LexicalPreservingPrinter.findIndentation(node);
236
assertEquals(Arrays.asList(" ", " ", " "), indentation.stream().map(
TokenTextElement
::expand).collect(Collectors.toList()));
243
List<
TokenTextElement
> indentation = LexicalPreservingPrinter.findIndentation(node);
244
assertEquals(Arrays.asList(" ", " ", " "), indentation.stream().map(
TokenTextElement
::expand).collect(Collectors.toList()));
[
all
...]
Completed in 126 milliseconds