1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-11 02:55:23 +02:00

Changes to namespace-aliases as local bindings, bug 215783.

This commit is contained in:
Markus Schorn 2008-01-28 15:17:35 +00:00
parent d09429e1d5
commit eaea3167f8

View file

@ -787,15 +787,19 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
if (binding instanceof ICPPMethod) {
return null;
}
if (binding instanceof ICPPUsingDeclaration || binding instanceof ICPPNamespaceAlias) {
if (pdom instanceof WritablePDOM) {
final WritablePDOM wpdom= (WritablePDOM) pdom;
if (binding instanceof ICPPUsingDeclaration) {
String path= ASTInternal.getDeclaredInOneFileOnly(binding);
if (path != null) {
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);
}