mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixes file resolution in ref-by query.
This commit is contained in:
parent
19737500de
commit
838fd14a80
2 changed files with 7 additions and 5 deletions
|
@ -101,12 +101,14 @@ public class CHContentProvider extends AsyncTreeContentProvider {
|
|||
ICElement[] elements= calledBy.getElements();
|
||||
for (int i = 0; i < elements.length; i++) {
|
||||
ICElement element = elements[i];
|
||||
if (element != null) {
|
||||
CIndexReference[] refs= calledBy.getReferences(element);
|
||||
if (refs != null && refs.length > 0) {
|
||||
CHNode node = createRefbyNode(parent, element, refs);
|
||||
result.add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toArray();
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.getDefault().log(e);
|
||||
|
|
|
@ -223,7 +223,7 @@ public class CIndexQueries {
|
|||
IASTName[] names= pdom.getReferences(binding);
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
IASTName rname = names[i];
|
||||
ITranslationUnit tu= toTranslationUnit(project, name);
|
||||
ITranslationUnit tu= toTranslationUnit(project, rname);
|
||||
CIndexReference ref= new CIndexReference(tu, rname);
|
||||
ICElement elem= findCaller(ref);
|
||||
result.add(elem, ref);
|
||||
|
|
Loading…
Add table
Reference in a new issue