aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authoracolyer <acolyer>2003-02-26 16:18:01 +0000
committeracolyer <acolyer>2003-02-26 16:18:01 +0000
commit1da530069c8b755a7310e83dd05e5ba753d2085c (patch)
tree7a94a9dc40566f36344f7193c1a3c6c0a26c4e8b /ajde
parent2e89f544a7dacfea37cfb4b076f5fa33302ebc64 (diff)
downloadaspectj-1da530069c8b755a7310e83dd05e5ba753d2085c.tar.gz
aspectj-1da530069c8b755a7310e83dd05e5ba753d2085c.zip
Added new Granularity, DECLARED_ELEMENTS, and
new rule to acceptGranularity
Diffstat (limited to 'ajde')
-rw-r--r--ajde/src/org/aspectj/ajde/ui/StructureViewProperties.java3
-rw-r--r--ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java8
2 files changed, 7 insertions, 4 deletions
diff --git a/ajde/src/org/aspectj/ajde/ui/StructureViewProperties.java b/ajde/src/org/aspectj/ajde/ui/StructureViewProperties.java
index 1fa0c00b8..230108d62 100644
--- a/ajde/src/org/aspectj/ajde/ui/StructureViewProperties.java
+++ b/ajde/src/org/aspectj/ajde/ui/StructureViewProperties.java
@@ -236,7 +236,8 @@ public class StructureViewProperties {
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;
diff --git a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
index 41a9a0bdc..5d4308951 100644
--- a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
+++ b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
@@ -150,9 +150,11 @@ public class TreeStructureViewBuilder {
}
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