Lines 85-91
Link Here
|
85 |
private Project project2; |
85 |
private Project project2; |
86 |
private SourcesHelper sh2; |
86 |
private SourcesHelper sh2; |
87 |
|
87 |
|
88 |
protected void setUp() throws Exception { |
88 |
protected @Override void setUp() throws Exception { |
89 |
super.setUp(); |
89 |
super.setUp(); |
90 |
MockLookup.setInstances(AntBasedTestUtil.testAntBasedProjectType()); |
90 |
MockLookup.setInstances(AntBasedTestUtil.testAntBasedProjectType()); |
91 |
scratch = TestUtil.makeScratchDir(this); |
91 |
scratch = TestUtil.makeScratchDir(this); |
Lines 120-126
Link Here
|
120 |
p.setProperty("ext.file", "../../external/extFile"); |
120 |
p.setProperty("ext.file", "../../external/extFile"); |
121 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
121 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
122 |
ProjectManager.getDefault().saveProject(project); |
122 |
ProjectManager.getDefault().saveProject(project); |
123 |
sh = new SourcesHelper(h, h.getStandardPropertyEvaluator()); |
123 |
sh = new SourcesHelper(project, h, h.getStandardPropertyEvaluator()); |
124 |
sh.addPrincipalSourceRoot("${src1.dir}", "Sources #1", null, null); // inside proj dir |
124 |
sh.addPrincipalSourceRoot("${src1.dir}", "Sources #1", null, null); // inside proj dir |
125 |
sh.addPrincipalSourceRoot("${src2.dir}", "Sources #2", null, null); // outside (rel path) |
125 |
sh.addPrincipalSourceRoot("${src2.dir}", "Sources #2", null, null); // outside (rel path) |
126 |
sh.addPrincipalSourceRoot("${src2a.dir}", "Sources #2a", null, null); // redundant |
126 |
sh.addPrincipalSourceRoot("${src2a.dir}", "Sources #2a", null, null); // redundant |
Lines 147-153
Link Here
|
147 |
h2 = ProjectGenerator.createProject(proj2dir, "test"); |
147 |
h2 = ProjectGenerator.createProject(proj2dir, "test"); |
148 |
project2 = ProjectManager.getDefault().findProject(proj2dir); |
148 |
project2 = ProjectManager.getDefault().findProject(proj2dir); |
149 |
assertNotNull("have a project2", project2); |
149 |
assertNotNull("have a project2", project2); |
150 |
sh2 = new SourcesHelper(h2, h2.getStandardPropertyEvaluator()); |
150 |
sh2 = new SourcesHelper(project2, h2, h2.getStandardPropertyEvaluator()); |
151 |
sh2.addPrincipalSourceRoot("src1", "Sources #1", null, null); |
151 |
sh2.addPrincipalSourceRoot("src1", "Sources #1", null, null); |
152 |
sh2.addPrincipalSourceRoot("src2", "Sources #2", null, null); |
152 |
sh2.addPrincipalSourceRoot("src2", "Sources #2", null, null); |
153 |
sh2.addNonSourceRoot("build"); |
153 |
sh2.addNonSourceRoot("build"); |
Lines 420-426
Link Here
|
420 |
// <editor-fold desc="other setup #2"> |
420 |
// <editor-fold desc="other setup #2"> |
421 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
421 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
422 |
ProjectManager.getDefault().saveProject(project); |
422 |
ProjectManager.getDefault().saveProject(project); |
423 |
sh = new SourcesHelper(h, h.getStandardPropertyEvaluator()); |
423 |
sh = new SourcesHelper(project, h, h.getStandardPropertyEvaluator()); |
424 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
424 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
425 |
sh.addPrincipalSourceRoot("${src2.dir}", "${src2.includes}", "${src2.excludes}", "Sources #2", null, null); |
425 |
sh.addPrincipalSourceRoot("${src2.dir}", "${src2.includes}", "${src2.excludes}", "Sources #2", null, null); |
426 |
sh.addPrincipalSourceRoot("${src3.dir}", "${src3.includes}", null, "Sources #3", null, null); |
426 |
sh.addPrincipalSourceRoot("${src3.dir}", "${src3.includes}", null, "Sources #3", null, null); |
Lines 594-600
Link Here
|
594 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
594 |
h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, p); |
595 |
ProjectManager.getDefault().saveProject(project); |
595 |
ProjectManager.getDefault().saveProject(project); |
596 |
//minimalSubfolders = true |
596 |
//minimalSubfolders = true |
597 |
sh = new SourcesHelper(h, h.getStandardPropertyEvaluator()); |
597 |
sh = new SourcesHelper(project, h, h.getStandardPropertyEvaluator()); |
598 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
598 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
599 |
sh.addTypedSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "java", "Packages #1", null, null); |
599 |
sh.addTypedSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "java", "Packages #1", null, null); |
600 |
sh.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT, true); |
600 |
sh.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT, true); |
Lines 604-610
Link Here
|
604 |
assertEquals("Packages #1", g1.getDisplayName()); |
604 |
assertEquals("Packages #1", g1.getDisplayName()); |
605 |
assertNull(FileOwnerQuery.getOwner(src1dir)); |
605 |
assertNull(FileOwnerQuery.getOwner(src1dir)); |
606 |
//minimalSubfolders = false |
606 |
//minimalSubfolders = false |
607 |
sh = new SourcesHelper(h, h.getStandardPropertyEvaluator()); |
607 |
sh = new SourcesHelper(project, h, h.getStandardPropertyEvaluator()); |
608 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
608 |
sh.addPrincipalSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "Sources #1", null, null); |
609 |
sh.addTypedSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "java", "Packages #1", null, null); |
609 |
sh.addTypedSourceRoot("${src1.dir}", "${src1.includes}", "${src1.excludes}", "java", "Packages #1", null, null); |
610 |
sh.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT, false); |
610 |
sh.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT, false); |