]> source.dussan.org Git - aspectj.git/commitdiff
Fixed setting runnable bit on structure nodes.
authormkersten <mkersten>
Fri, 28 Feb 2003 02:55:14 +0000 (02:55 +0000)
committermkersten <mkersten>
Fri, 28 Feb 2003 02:55:14 +0000 (02:55 +0000)
Fixed failing incremental test.

ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java
ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java

index 44566ff321ea4b7af48d2a3ebbd0a53dec72a269..fc840a8d131bb15cd60de6433586ccabfa2c6223 100644 (file)
@@ -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");
     }
 }
   
index adf9266659180c475c22e29f1162dd2bf6b03573..5e7fc05963a2caff68a9ad699fe8e7a687c5cd52 100644 (file)
@@ -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(
index 5824f2b2ff254811ef96d8962e0940ea6d3e3bb0..8709904ba54420cc76f041c932c141005a4ed498 100644 (file)
@@ -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);
                        }       
                }
 
index e01d2c0e77d16101a42982e126cf72789ecc2c1e..d5c0c7f6a0a9819c5d6da190413d59ed64b3276b 100644 (file)
@@ -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 {