feat: Improve Java extraction, multi-symbol aggregation, and impact traversal
Java extraction: - Handle Java method_invocation AST (receiver.method pattern) - Support Java extends_interfaces and super_interfaces with type_list - Create unresolved references for Java imports for cross-file resolution - Extract interface inheritance via extractInheritance MCP tools: - Aggregate callers/callees/impact across ALL matching symbols (e.g. multiple overloads or same-named methods in different classes) - New findAllSymbols() helper for multi-symbol lookup Graph traversal: - Impact analysis now traverses into container children (class → methods) so that callers of methods appear in the impact radius of their class Other: - Add deleteSpecificResolvedReferences() for precise cleanup after resolution - Add 'instance-method' to resolvedBy union type - Version bump to 0.6.8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8b541be894
commit
d04a911309
@@ -483,6 +483,25 @@ export class GraphTraverser {
|
||||
}
|
||||
visited.add(nodeId);
|
||||
|
||||
// For container nodes (classes, interfaces, structs, etc.), also traverse
|
||||
// into their children so that callers of contained methods appear in impact
|
||||
const focalNode = this.queries.getNodeById(nodeId);
|
||||
if (focalNode) {
|
||||
const containerKinds = new Set(['class', 'interface', 'struct', 'trait', 'protocol', 'module', 'enum']);
|
||||
if (containerKinds.has(focalNode.kind)) {
|
||||
const containsEdges = this.queries.getOutgoingEdges(nodeId, ['contains']);
|
||||
for (const edge of containsEdges) {
|
||||
const childNode = this.queries.getNodeById(edge.target);
|
||||
if (childNode && !visited.has(childNode.id)) {
|
||||
nodes.set(childNode.id, childNode);
|
||||
edges.push(edge);
|
||||
// Recurse into children at the same depth (they're part of the same symbol)
|
||||
this.getImpactRecursive(childNode.id, maxDepth, currentDepth, nodes, edges, visited);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get all incoming edges (things that depend on this node)
|
||||
const incomingEdges = this.queries.getIncomingEdges(nodeId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user