]> source.dussan.org Git - aspectj.git/commitdiff
271201: inpath handle: can determine if class is from inpath in add method now
authoraclement <aclement>
Mon, 6 Apr 2009 15:38:27 +0000 (15:38 +0000)
committeraclement <aclement>
Mon, 6 Apr 2009 15:38:27 +0000 (15:38 +0000)
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

index 31225aa3b2e5cf9b8135eb0e3d5215c23c87e3a1..9bca0f0dbd08f017721ac6ad8be6c98462a5e82d 100644 (file)
@@ -2791,6 +2791,41 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                warnings = getWarningMessages("inpathTesting");
                assertTrue("Expected there to be two warning message but found " + warnings.size() + ": " + warnings, warnings.size() == 2);
        }
+       
+
+       // warning about cant change parents of Object is fine
+       public void testInpathHandles_271201() throws Exception {
+               AjdeInteractionTestbed.VERBOSE=true;
+               String p = "inpathHandles";
+               initialiseProject(p);
+
+               String inpathTestingDir = getWorkingDir() + File.separator + "inpathHandles";
+               String inpathDir = inpathTestingDir + File.separator + "binpath";// + File.separator+ "codep";
+               // String expectedOutputDir = inpathTestingDir + File.separator + "bin";
+
+               // set up the inpath to have the directory on it's path
+               System.out.println(inpathDir);
+               File f = new File(inpathDir);
+               Set s = new HashSet();
+               s.add(f);
+               configureInPath(p, s);
+               build(p);
+
+               IProgramElement root = getModelFor(p).getHierarchy().getRoot();
+               
+//             alter(p,"inc1");
+//             build(p);
+//             dumptree(root, 0);
+//             PrintWriter pw = new PrintWriter(System.out);
+//             try {
+//               getModelFor(p).dumprels(pw);
+//               pw.flush();
+//             } catch (Exception e) {
+//             }
+               List l = getModelFor(p).getRelationshipMap().get("=inpathHandles/;<codep(Code.class[Code");
+               assertNotNull(l);
+               System.out.println(l.get(0));
+       }
 
        // --- helper code ---