Files
Sourcetrail/java_indexer/src/main/java/com/sourcetrail/VerboseContextAwareAstVisitor.java
T
mlangkabel 5c614c77e2 src: moved Java indexer from JavaSymbolSolver to Eclipse JDT
* added some more tests
* changed 3rd party licenses respectively

fortune cookie message = Your present plans are going to succeed.
2017-09-07 12:40:34 +02:00

29 lines
828 B
Java

package com.sourcetrail;
import java.io.File;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
public class VerboseContextAwareAstVisitor extends ContextAwareAstVisitor
{
private String indentation = "";
public VerboseContextAwareAstVisitor(AstVisitorClient client, File filePath, String fileContent, CompilationUnit compilationUnit)
{
super(client, filePath, fileContent, compilationUnit);
}
public void preVisit(ASTNode node)
{
Range range = getRange(node);
m_client.logInfo(indentation + node.getClass().toString() + "[" + range.begin.line + ":" + range.begin.column + "|" + range.end.line + ":" + range.end.column + "]");
indentation += "| ";
}
public void postVisit(ASTNode node)
{
indentation = indentation.substring(0, indentation.length() - 2);
}
}