1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

Bug 511808 - Expand namespaces by default regardless of depth level in

Outline view

Change-Id: I9061ad64e442e8859fd79dbb4bf437443ef545a7
This commit is contained in:
Sergey Prigogin 2017-02-06 19:30:01 -08:00
parent 0be1934cec
commit d6ab03abb9

View file

@ -170,15 +170,14 @@ public abstract class AbstractCModelOutlinePage extends Page
if (parent == null) { if (parent == null) {
return false; return false;
} }
// expand classes and namespaces // Expand classes and namespaces.
final int elementType= cElement.getElementType(); final int elementType= cElement.getElementType();
final int parentType= parent.getElementType(); final int parentType= parent.getElementType();
switch (elementType) { switch (elementType) {
case ICElement.C_CLASS: case ICElement.C_CLASS:
case ICElement.C_TEMPLATE_CLASS: case ICElement.C_TEMPLATE_CLASS:
return parentType == ICElement.C_UNIT || parentType == ICElement.C_NAMESPACE;
case ICElement.C_NAMESPACE: case ICElement.C_NAMESPACE:
return parentType == ICElement.C_UNIT; return parentType == ICElement.C_UNIT || parentType == ICElement.C_NAMESPACE;
default: default:
return false; return false;
} }