public static final Granularity FILE = new Granularity("file");
public static final Granularity TYPE = new Granularity("type");
public static final Granularity MEMBER = new Granularity("member");
- public static final Granularity[] ALL = { PACKAGE, FILE, TYPE, MEMBER };
+ public static final Granularity DECLARED_ELEMENTS = new Granularity("declared body elements");
+ public static final Granularity[] ALL = { PACKAGE, FILE, TYPE, MEMBER, DECLARED_ELEMENTS };
private final String name;
}
private boolean acceptGranularity(ProgramElementNode.Kind kind, StructureViewProperties.Granularity granularity) {
- if (kind == ProgramElementNode.Kind.CODE) return false;
-
- if (granularity == StructureViewProperties.Granularity.MEMBER) {
+
+ if (granularity == StructureViewProperties.Granularity.DECLARED_ELEMENTS) {
+ return true;
+ } else if (granularity == StructureViewProperties.Granularity.MEMBER &&
+ (kind == ProgramElementNode.Kind.CODE)) {
return true;
} else if (granularity == StructureViewProperties.Granularity.TYPE
&& (kind == ProgramElementNode.Kind.PROJECT