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 | |
parent | 5e755852221db8be64222b23714ed6c959a11700 (diff) | |
download | aspectj-2484d6b39f2534171863ecbf731ce99e4b1dde4a.tar.gz aspectj-2484d6b39f2534171863ecbf731ce99e4b1dde4a.zip |
Fixed setting runnable bit on structure nodes.
Fixed failing incremental test.
4 files changed, 9 insertions, 7 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java index 44566ff32..fc840a8d1 100644 --- a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java +++ b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java @@ -23,16 +23,16 @@ import org.aspectj.bridge.*; public class NullIdeTaskListManager implements TaskListManager { public void addSourcelineTask(String message, ISourceLocation sourceLocation, IMessage.Kind kind) { - System.out.println("> added sourceline task: " + message + ", file: " + sourceLocation.getSourceFile().getAbsolutePath() - + ": " + sourceLocation.getLine()); +// System.out.println("> added sourceline task: " + message + ", file: " + sourceLocation.getSourceFile().getAbsolutePath() +// + ": " + sourceLocation.getLine()); } public void addProjectTask(String message, IMessage.Kind kind) { - System.out.println("> added project task: " + message + ", kind: " + kind); +// System.out.println("> added project task: " + message + ", kind: " + kind); } public void clearTasks() { - System.out.println("> cleared tasks"); +// System.out.println("> cleared tasks"); } } diff --git a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java index adf926665..5e7fc0596 100644 --- a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java +++ b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java @@ -43,6 +43,7 @@ public class StructureModelTest extends AjdeTestCase { return result; } +// XXX this should work // public void testFieldInitializerCorrespondence() throws IOException { // File testFile = createFile("testdata/examples/figures-coverage/figures/Figure.java"); // StructureNode node = Ajde.getDefault().getStructureModelManager().getStructureModel().findNodeForSourceLine( 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 { |