pub fn resolve_code_entity(
dir: &Arc<DirGraph>,
name: &str,
node_type: Option<&str>,
) -> (Option<NodeIndex>, Vec<(NodeIndex, NodeInfo)>)Expand description
Resolve a name (or qualified-name suffix) to a single code-entity
NodeIndex. Returns (Some(idx), Vec::new()) for an unambiguous
match, (None, matches) when 0 or >1 candidates matched.
Lookup order:
- Exact match on
node.id()(the qualified name, e.g.crate::graph::languages::cypher::executor::CypherExecutor::execute_single_clause) - Suffix match on
node.id()ifnamecontains::(e.g.CypherExecutor::execute_single_clausematches the above) - Exact match on
node.get_field_ref("name")ornode.get_field_ref("title")— bare-name fallback
When node_type is None, searches across every entry in
CODE_TYPES; otherwise restricted to the single type.