aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authormkersten <mkersten>2003-08-08 13:14:39 +0000
committermkersten <mkersten>2003-08-08 13:14:39 +0000
commit18f9c1e2dbd6533e1e939871a6129ed1a95800e8 (patch)
tree940d66aa2809f1fc8751de41a67fcb356102969a /org.aspectj.ajdt.core
parent2a3bba0a02528777cdc9bc1eab6f7e3256991894 (diff)
downloadaspectj-18f9c1e2dbd6533e1e939871a6129ed1a95800e8.tar.gz
aspectj-18f9c1e2dbd6533e1e939871a6129ed1a95800e8.zip
Fixed ProgramElement modifiers bug.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java
index 1cdc99870..b7fd8d1be 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java
@@ -272,18 +272,20 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter {
makeLocation(methodDeclaration),
methodDeclaration.modifiers,
"",
- new ArrayList());
+ new ArrayList());
formatter.genLabelAndKind(methodDeclaration, peNode);
genBytecodeInfo(methodDeclaration, peNode);
+ peNode.setModifiers(methodDeclaration.modifiers);
- // TODO: should improve determining what the main method is
+ // TODO: add return type test
if (peNode.getKind().equals(IProgramElement.Kind.METHOD)) {
- if (peNode.getName().equals("main")) {
+ if (peNode.getName().equals("main(String[])")
+ && peNode.getModifiers().contains(IProgramElement.Modifiers.STATIC)
+ && peNode.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) {
((IProgramElement)stack.peek()).setRunnable(true);
}
}
-
stack.push(peNode);
return true;
}