From 2484d6b39f2534171863ecbf731ce99e4b1dde4a Mon Sep 17 00:00:00 2001 From: mkersten Date: Fri, 28 Feb 2003 02:55:14 +0000 Subject: Fixed setting runnable bit on structure nodes. Fixed failing incremental test. --- .../src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java | 3 ++- .../testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'org.aspectj.ajdt.core') 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 { -- cgit v1.2.3