NewClass [class] TEST_SANDBOX\NewClass.java:3:
=== END OF MODEL REPORT =========
=== RELATIONSHIPS REPORT ========= After a batch build
-(targets=1) <bar*MyBar.aj}MyBar`declare \@type!3 (annotates) {MyFoo.java
-(targets=1) <bar*MyBar.aj}MyBar`declare parents!2 (declared on) {MyFoo.java
(targets=1) {MyFoo.java (annotated by) <bar*MyBar.aj}MyBar`declare \@type!3
-(targets=1) {MyFoo.java (aspect declarations) <bar*MyBar.aj}MyBar`declare parents!2
+(targets=1) <bar*MyBar.aj}MyBar`declare parents!2 (declared on) /,<foo(MyFoo.class[MyFoo
+(targets=1) <bar*MyBar.aj}MyBar`declare \@type!3 (annotates) {MyFoo.java
+(targets=1) /,<foo(MyFoo.class[MyFoo (aspect declarations) <bar*MyBar.aj}MyBar`declare parents!2
=== END OF RELATIONSHIPS REPORT ==
=== Properties of the model and relationships map =====
import reference=4
advice=1
annotation=1
class=1
-RelationshipMapSize=3
+RelationshipMapSize=4
package declaration=3
FileMapSize=3
package=1
assertNotNull(l);
}
+ private void printModelAndRelationships(String p) {
+ IProgramElement root = getModelFor(p).getHierarchy().getRoot();
+
+ dumptree(root, 0);
+ PrintWriter pw = new PrintWriter(System.out);
+ try {
+ getModelFor(p).dumprels(pw);
+ pw.flush();
+ } catch (Exception e) {
+ }
+ }
+
+ public void testInpathHandles_IncrementalCompilation_RemovingInpathEntries_271201() throws Exception {
+ AjdeInteractionTestbed.VERBOSE=true;
+ String p = "inpathHandles2";
+ initialiseProject(p);
+
+ String inpathDir = getWorkingDir() + File.separator + "inpathHandles2" + File.separator + "binpath";
+
+ // set up the inpath to have the directory on it's path
+ File f = new File(inpathDir);
+ configureInPath(p, f);
+
+ // This build will weave a declare parents into the inpath class codep.A and codep.B
+ build(p);
+ assertNotNull(getModelFor(p).getRelationshipMap().get("=inpathHandles2/,<codep(A.class[A"));
+
+ // Not let us delete one of the inpath .class files
+ assertTrue(new File(inpathDir,"codep"+File.separator+"A.class").delete());
+ setNextChangeResponse(p, ICompilerConfiguration.EVERYTHING);
+ build(p);
+// printModelAndRelationships(p);
+ }
+
// warning about cant change parents of Object is fine
-// public void testInpathJars_271201() throws Exception {
-// AjdeInteractionTestbed.VERBOSE=true;
-// String p = "inpathJars";
-// initialiseProject(p);
-//
-// String inpathTestingDir = getWorkingDir() + File.separator + "inpathJars";
-// String inpathDir = inpathTestingDir + File.separator + "code.jar";
-// // 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);
-// Map m = new HashMap();
-// m.put(f,"Gibble");
-// configureOutputLocationManager(p,new TestOutputLocationManager(getProjectRelativePath(p, ".").toString(),m));
-// configureInPath(p, s);
+ public void testInpathJars_271201() throws Exception {
+ AjdeInteractionTestbed.VERBOSE=true;
+ String p = "inpathJars";
+ initialiseProject(p);
+
+ String inpathTestingDir = getWorkingDir() + File.separator + "inpathJars";
+ String inpathDir = inpathTestingDir + File.separator + "code.jar";
+ // 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);
+ Map m = new HashMap();
+ m.put(f,"Gibble");
+ configureOutputLocationManager(p,new TestOutputLocationManager(getProjectRelativePath(p, ".").toString(),m));
+ configureInPath(p, s);
+ build(p);
+
+ IProgramElement root = getModelFor(p).getHierarchy().getRoot();
+
+// alter(p,"inc1");
// 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("=inpathJars/;Gibble<codep(Code.class[Code");
-// assertNotNull(l);
-// System.out.println(l.get(0));
-// }
+ 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("=inpathJars/,Gibble<codep(Code.class[Code");
+ assertNotNull(l);
+ System.out.println(l.get(0));
+ }
// --- helper code ---