]> source.dussan.org Git - aspectj.git/commitdiff
Minor non-disruptive ASM API cleanup.
authormkersten <mkersten>
Mon, 29 Mar 2004 22:33:49 +0000 (22:33 +0000)
committermkersten <mkersten>
Mon, 29 Mar 2004 22:33:49 +0000 (22:33 +0000)
ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
ajde/src/org/aspectj/ajde/ui/swing/BrowserStructureViewToolPanel.java
asm/src/org/aspectj/asm/IProgramElement.java
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
asm/src/org/aspectj/asm/internal/ProgramElement.java

index 99ca19f08f978f72df43e99fe8c3a9ba1427d277..31ea09c68c9dba6ef43c935523f962bcd5da6ca4 100644 (file)
@@ -145,13 +145,13 @@ public class TreeStructureViewBuilder {
                } else if (granularity == StructureViewProperties.Granularity.TYPE
                        && (kind == IProgramElement.Kind.PROJECT
                                || kind == IProgramElement.Kind.PACKAGE
-                               || kind.isSourceFileKind()
-                               || kind.isTypeKind())) {
+                               || kind.isSourceFile()
+                               || kind.isType())) {
                        return true;                    
                } else if (granularity == StructureViewProperties.Granularity.FILE
                        && (kind == IProgramElement.Kind.PROJECT
                                || kind == IProgramElement.Kind.PACKAGE
-                               || kind.isSourceFileKind())) {
+                               || kind.isSourceFile())) {
                        return true;                    
                } else if (granularity == StructureViewProperties.Granularity.PACKAGE
                        && (kind == IProgramElement.Kind.PROJECT
@@ -167,7 +167,7 @@ public class TreeStructureViewBuilder {
                        IProgramElement pNode = (IProgramElement)node;
                        if (!acceptGranularity(pNode.getKind(), properties.getGranularity())) {
                                return false;
-                       } else if (pNode.getKind().isMemberKind()) {
+                       } else if (pNode.getKind().isMember()) {
                                if (properties.getFilteredMemberAccessibility().contains(pNode.getAccessibility())) {
                                        return false;   
                                }
index e28438b0270b3dfdb2d284a4048025602109b701..a2e0fb492e3f054ba85c469ad94ca847d8e7eaf6 100644 (file)
@@ -109,7 +109,7 @@ public class BrowserStructureViewToolPanel extends JPanel {
 
                IProgramElement.Kind[] kinds = IProgramElement.Kind.ALL;
                for (int i = 0; i < kinds.length; i++) {
-                       if (kinds[i].isMemberKind()) {
+                       if (kinds[i].isMember()) {
                                CheckBoxSelectionMenuButton menuItem = new CheckBoxSelectionMenuButton(kinds[i]);
                                menuItem.setIcon((Icon)AjdeUIManager.getDefault().getIconRegistry().getIcon(kinds[i]).getIconResource());
                                filterMenu.add(menuItem);
index ca6dac5bb175c3ac6e2e3ca276fce280db0a282e..825db4cd300747fcea4c55c2cc3820582754e846 100644 (file)
@@ -278,7 +278,7 @@ public interface IProgramElement extends Serializable {
                        return list;
                }
                
-               public boolean isMemberKind() {
+               public boolean isMember() {
                        return this == FIELD
                                || this == METHOD
                                || this == CONSTRUCTOR
@@ -286,24 +286,24 @@ public interface IProgramElement extends Serializable {
                                || this == ADVICE;
                }
 
-               public boolean isInterTypeMemberKind() {
+               public boolean isInterTypeMember() {
                        return this == INTER_TYPE_CONSTRUCTOR
                                || this == INTER_TYPE_FIELD
                                || this == INTER_TYPE_METHOD;
                }
                
-               public boolean isTypeKind() {
+               public boolean isType() {
                        return this == CLASS
                                || this == INTERFACE
                                || this == ASPECT;      
                }
 
-               public boolean isSourceFileKind() {
+               public boolean isSourceFile() {
                        return this == FILE_ASPECTJ
                                || this == FILE_JAVA;
                }
                
-               public boolean isDeclareKind() {
+               public boolean isDeclare() {
                        return name.startsWith("declare");      
                } 
 
index 13712361c0a395f2a4c27e6f2d7e150f62537d9b..0a36642ab96b7b7792495323ac925fecc3a99f63 100644 (file)
@@ -264,7 +264,7 @@ public class AspectJElementHierarchy implements IHierarchy {
                                        && node.getSourceLocation().getEndLine() >= lineNumber)
                                        ||
                                        (lineNumber <= 1
-                                        && node.getKind().isSourceFileKind())
+                                        && node.getKind().isSourceFile())
                                );
 //             } catch (IOException ioe) { 
 //                     return false;
index 6141f600ec5166b9a8ae1795fc472e70a3bb1185..1beec6173a4cb4c4995f46b5de2a7305411e87f9 100644 (file)
@@ -172,7 +172,7 @@ public class ProgramElement implements IProgramElement {
        }
 
        public boolean isMemberKind() {
-               return kind.isMemberKind();
+               return kind.isMember();
        }
 
        public void setRunnable(boolean value) {
@@ -395,7 +395,7 @@ public class ProgramElement implements IProgramElement {
                String label;
                if (kind == Kind.CODE || kind == Kind.INITIALIZER) {
                        label = parent.getParent().getName() + ": ";
-               } else if (kind.isInterTypeMemberKind()) {
+               } else if (kind.isInterTypeMember()) {
                        int dotIndex = name.indexOf('.');  
                        if (dotIndex != -1) {
                                return parent.getName() + ": " + toLabelString().substring(dotIndex+1);