View | Details | Raw Unified | Return to bug 269985 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java (-1 / +1 lines)
Lines 33-39 Link Here
33
33
34
ClasspathDirectory(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
34
ClasspathDirectory(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
35
	this.binaryFolder = binaryFolder;
35
	this.binaryFolder = binaryFolder;
36
	this.isOutputFolder = isOutputFolder;
36
	this.isOutputFolder = isOutputFolder || binaryFolder.getProjectRelativePath().isEmpty(); // if binaryFolder == project, then treat it as an outputFolder
37
	this.directoryCache = new SimpleLookupTable(5);
37
	this.directoryCache = new SimpleLookupTable(5);
38
	this.accessRuleSet = accessRuleSet;
38
	this.accessRuleSet = accessRuleSet;
39
}
39
}
(-)src/org/eclipse/jdt/core/tests/builder/EfficiencyTests.java (+31 lines)
Lines 27-32 Link Here
27
		return buildTestSuite(EfficiencyTests.class);
27
		return buildTestSuite(EfficiencyTests.class);
28
	}
28
	}
29
29
30
	public void testProjectAsClassFolder() throws JavaModelException {
31
		IPath projectPath1 = env.addProject("Project1"); //$NON-NLS-1$
32
		env.addExternalJars(projectPath1, Util.getJavaClassLibs());
33
34
		IPath projectPath2 = env.addProject("Project2"); //$NON-NLS-1$
35
		env.addExternalJars(projectPath2, Util.getJavaClassLibs());
36
		env.addClassFolder(projectPath2, projectPath1, false);
37
38
		env.addClass(projectPath2, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
39
			"package p1;\n"+ //$NON-NLS-1$
40
			"public abstract class X {}\n" //$NON-NLS-1$
41
		);
42
43
		env.addClass(projectPath2, "p2", "Y", //$NON-NLS-1$ //$NON-NLS-2$
44
			"package p2;\n"+ //$NON-NLS-1$
45
			"public class Y {}\n" //$NON-NLS-1$
46
		);
47
48
		fullBuild();
49
50
		env.addClass(projectPath2, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
51
			"package p1;\n"+ //$NON-NLS-1$
52
			"public class X {}\n" //$NON-NLS-1$
53
		);
54
55
		incrementalBuild(projectPath2);
56
57
		// if a full build happens instead of an incremental, then both types will be recompiled
58
		expectingCompiledClasses(new String[]{"p1.X"}); //$NON-NLS-1$
59
	}
60
30
	public void testEfficiency() throws JavaModelException {
61
	public void testEfficiency() throws JavaModelException {
31
		IPath projectPath = env.addProject("Project"); //$NON-NLS-1$
62
		IPath projectPath = env.addProject("Project"); //$NON-NLS-1$
32
		env.addExternalJars(projectPath, Util.getJavaClassLibs());
63
		env.addExternalJars(projectPath, Util.getJavaClassLibs());

Return to bug 269985