From 3b6a9d338f07bac03b12d81d118f23d40c2a8e7c Mon Sep 17 00:00:00 2001 From: mkersten Date: Mon, 29 Mar 2004 22:33:49 +0000 Subject: [PATCH] Minor non-disruptive ASM API cleanup. --- .../ajde/ui/internal/TreeStructureViewBuilder.java | 8 ++++---- .../ajde/ui/swing/BrowserStructureViewToolPanel.java | 2 +- asm/src/org/aspectj/asm/IProgramElement.java | 10 +++++----- .../aspectj/asm/internal/AspectJElementHierarchy.java | 2 +- asm/src/org/aspectj/asm/internal/ProgramElement.java | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java index 99ca19f08..31ea09c68 100644 --- a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java +++ b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java @@ -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; } diff --git a/ajde/src/org/aspectj/ajde/ui/swing/BrowserStructureViewToolPanel.java b/ajde/src/org/aspectj/ajde/ui/swing/BrowserStructureViewToolPanel.java index e28438b02..a2e0fb492 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/BrowserStructureViewToolPanel.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/BrowserStructureViewToolPanel.java @@ -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); diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java index ca6dac5bb..825db4cd3 100644 --- a/asm/src/org/aspectj/asm/IProgramElement.java +++ b/asm/src/org/aspectj/asm/IProgramElement.java @@ -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"); } diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index 13712361c..0a36642ab 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -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; diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java index 6141f600e..1beec6173 100644 --- a/asm/src/org/aspectj/asm/internal/ProgramElement.java +++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java @@ -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); -- 2.39.5