diff options
author | mkersten <mkersten> | 2003-02-28 02:55:14 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-02-28 02:55:14 +0000 |
commit | 2484d6b39f2534171863ecbf731ce99e4b1dde4a (patch) | |
tree | 8a48c4826111ca3ccd608decc9a0b091b1962fbf /org.aspectj.ajdt.core | |
parent | 5e755852221db8be64222b23714ed6c959a11700 (diff) | |
download | aspectj-2484d6b39f2534171863ecbf731ce99e4b1dde4a.tar.gz aspectj-2484d6b39f2534171863ecbf731ce99e4b1dde4a.zip |
Fixed setting runnable bit on structure nodes.
Fixed failing incremental test.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java | 3 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java index 5824f2b2f..8709904ba 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java @@ -249,8 +249,9 @@ public class AsmBuilder extends AbstractSyntaxTreeVisitorAdapter { new ArrayList()); if (kind == ProgramElementNode.Kind.METHOD) { + // !! should probably discriminate more if (label.equals("main")) { - peNode.setRunnable(true); + ((ProgramElementNode)stack.peek()).setRunnable(true); } } diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java index e01d2c0e7..d5c0c7f6a 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java @@ -57,10 +57,10 @@ public class AjdtCommandTestCase extends TestCase { config = command.genBuildConfig( new String[] { "-incremental", "testdata/src1/Hello.java" }, messageWriter); - + assertTrue( "specified a file", - outputWriter.getContents().indexOf("can not directly specify files") != -1); ; + outputWriter.getContents().indexOf("incremental mode only handles source files using -sourceroots") != -1); ; } public void testBadOptionAndUsagePrinting() throws InvalidInputException { |