Skip to content

Commit ed9302d

Browse files
cleanup
1 parent 28984b1 commit ed9302d

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbTrees.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ public Semanticdb.AnnotationTree annotationBuilder(AnnotationTree annotation) {
9696

9797
private TypeMirror getTreeType(Tree tree) {
9898
TreePath path = nodes.get(tree);
99-
System.out.println("Path: " + path.getLeaf());
100-
// System.out.println("TM:" + trees.getTypeMirror(path));
101-
// Element sym = trees.getElement(path);
102-
// System.out.println("SYM: " + sym);
10399
return trees.getTypeMirror(path);
104100
}
105101

@@ -164,9 +160,7 @@ private Semanticdb.Tree annotationParameter(ExpressionTree expr) {
164160
return annotationParameter(parenExpr.getExpression());
165161
} else if (expr instanceof TypeCastTree) {
166162
TypeCastTree tree = (TypeCastTree) expr;
167-
System.out.println(typeVisitor.semanticdbType(getTreeType(tree.getType())));
168163
return tree(castTree(typeVisitor.semanticdbType(getTreeType(tree.getType())), annotationParameter(tree.getExpression())));
169-
// tree.getType()
170164
} else {
171165
throw new IllegalArgumentException(
172166
semanticdbUri

semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbVisitor.java

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ void resolveNodes() {
224224
resolveMemberSelectTree((MemberSelectTree) node, entry.getValue());
225225
} else if (node instanceof NewClassTree) {
226226
resolveNewClassTree((NewClassTree) node, entry.getValue());
227-
} else if (node instanceof TypeCastTree) {
228-
resolveCastTree((TypeCastTree) node, entry.getValue());
229-
System.out.println("Skipping resolution of [[\n" + node.getClass() + node.toString() + "\n]]");
230-
}
227+
}
231228
}
232229
}
233230
}
@@ -342,30 +339,6 @@ private void resolveMemberSelectTree(MemberSelectTree node, TreePath treePath) {
342339
}
343340

344341

345-
private void resolveCastTree(TypeCastTree node, TreePath treePath) {
346-
// ignore anonymous classes - otherwise there will be a local reference to itself
347-
System.out.println("helo");
348-
// if (node.getIdentifier() != null && node.getClassBody() == null) {
349-
// Element sym = trees.getElement(treePath);
350-
// if (sym != null) {
351-
// TreePath parentPath = treePath.getParentPath();
352-
// Element parentSym = trees.getElement(parentPath);
353-
354-
// if (parentSym == null || parentSym.getKind() != ElementKind.ENUM_CONSTANT) {
355-
// TreePath identifierTreePath = nodes.get(node.getIdentifier());
356-
// Element identifierSym = trees.getElement(identifierTreePath);
357-
// emitSymbolOccurrence(
358-
// sym,
359-
// node,
360-
// identifierSym.getSimpleName(),
361-
// Role.REFERENCE,
362-
// CompilerRange.FROM_TEXT_SEARCH);
363-
// }
364-
// }
365-
// }
366-
}
367-
368-
369342
private void resolveNewClassTree(NewClassTree node, TreePath treePath) {
370343
// ignore anonymous classes - otherwise there will be a local reference to itself
371344
if (node.getIdentifier() != null && node.getClassBody() == null) {

0 commit comments

Comments
 (0)