mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-11 11:05:24 +02:00
Changes to namespace-aliases as local bindings, bug 215783.
This commit is contained in:
parent
d09429e1d5
commit
eaea3167f8
1 changed files with 9 additions and 5 deletions
|
@ -787,15 +787,19 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
||||||
if (binding instanceof ICPPMethod) {
|
if (binding instanceof ICPPMethod) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (binding instanceof ICPPUsingDeclaration || binding instanceof ICPPNamespaceAlias) {
|
if (pdom instanceof WritablePDOM) {
|
||||||
if (pdom instanceof WritablePDOM) {
|
final WritablePDOM wpdom= (WritablePDOM) pdom;
|
||||||
final WritablePDOM wpdom= (WritablePDOM) pdom;
|
if (binding instanceof ICPPUsingDeclaration) {
|
||||||
String path= ASTInternal.getDeclaredInOneFileOnly(binding);
|
String path= ASTInternal.getDeclaredInOneFileOnly(binding);
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
return wpdom.getFileForASTPath(getLinkageID(), path);
|
return wpdom.getFileForASTPath(getLinkageID(), path);
|
||||||
}
|
}
|
||||||
|
} else if (binding instanceof ICPPNamespaceAlias) {
|
||||||
|
String path= ASTInternal.getDeclaredInSourceFileOnly(binding);
|
||||||
|
if (path != null) {
|
||||||
|
return wpdom.getFileForASTPath(getLinkageID(), path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
return super.getLocalToFile(binding);
|
return super.getLocalToFile(binding);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue