mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02:00
Bug 305975: Fix creation of ICElements for enumerators.
This commit is contained in:
parent
2361b4c075
commit
b07eedb957
1 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPEnumeration;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||
|
@ -132,6 +133,17 @@ public class CElementHandleFactory {
|
|||
}
|
||||
return tu;
|
||||
}
|
||||
|
||||
if (parentBinding instanceof IEnumeration) {
|
||||
ICElement grandParent= createParent(tu, parentBinding);
|
||||
if (parentBinding instanceof ICPPEnumeration && parentBinding.getNameCharArray().length > 0) {
|
||||
if (grandParent != null) {
|
||||
return new EnumerationHandle(grandParent, (ICPPEnumeration) parentBinding);
|
||||
}
|
||||
} else {
|
||||
return grandParent;
|
||||
}
|
||||
}
|
||||
|
||||
if (parentBinding instanceof ICPPNamespace) {
|
||||
char[] scopeName= parentBinding.getNameCharArray();
|
||||
|
|
Loading…
Add table
Reference in a new issue