use of com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor in project intellij-community by JetBrains.
the class StubBasedPsiElementBase method dumpCreationTraces.
@NotNull
private String dumpCreationTraces(@NotNull FileElement fileElement) {
final StringBuilder traces = new StringBuilder("\nNow " + Thread.currentThread() + "\n");
traces.append("My creation trace:\n").append(getUserData(CREATION_TRACE));
traces.append("AST creation traces:\n");
fileElement.acceptTree(new RecursiveTreeElementWalkingVisitor(false) {
@Override
public void visitComposite(CompositeElement composite) {
PsiElement psi = composite.getPsi();
if (psi != null) {
traces.append(psi).append("@").append(System.identityHashCode(psi)).append("\n");
String trace = psi.getUserData(CREATION_TRACE);
if (trace != null) {
traces.append(trace).append("\n");
}
}
super.visitComposite(composite);
}
});
return traces.toString();
}
Aggregations