View | Details | Raw Unified | Return to bug 267789
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceBuildTests.java (+2 lines)
Lines 217-222 Link Here
217
			}
217
			}
218
			System.out.println(this.scenarioShortName+": Unexpected ERROR marker(s):\n" + debugBuffer.toString());
218
			System.out.println(this.scenarioShortName+": Unexpected ERROR marker(s):\n" + debugBuffer.toString());
219
			System.out.println("--------------------");
219
			System.out.println("--------------------");
220
			String target = javaProject == null ? "workspace" : javaProject.getElementName();
221
			assertEquals("Found "+size+" unexpected errors while building "+target, 0, size);
220
		}
222
		}
221
		if (DEBUG) System.out.println("done");
223
		if (DEBUG) System.out.println("done");
222
224
(-)src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java (-16 / +17 lines)
Lines 642-667 Link Here
642
		}
642
		}
643
		System.out.println("("+(System.currentTimeMillis()-start)+"ms)");
643
		System.out.println("("+(System.currentTimeMillis()-start)+"ms)");
644
644
645
		// Init JRE_LIB variable
645
		// Create lib entries for the JDKs
646
		String[] jdkLibs = Util.getJavaClassLibs();
646
		String[] jdkLibs = Util.getJavaClassLibs();
647
		int length = jdkLibs.length;
647
		int jdkLibsLength = jdkLibs.length;
648
		String jdkLib = null;
648
		IClasspathEntry[] jdkEntries = new IClasspathEntry[jdkLibsLength];
649
		for (int i=0; i<length; i++) {
649
		for (int i=0; i<jdkLibsLength; i++) {
650
			if (jdkLibs[i].endsWith("rt.jar")) {
650
			jdkEntries[i] = JavaCore.newLibraryEntry(new Path(jdkLibs[i]), null, null);
651
				jdkLib = jdkLibs[i];
652
				break;
653
			}
654
		}
655
		if (jdkLib == null) {
656
			throw new RuntimeException("Cannot set JRE_LIB classpath variable as the rt.jar lib was not found!!!");
657
		}
651
		}
658
		JavaCore.setClasspathVariable("JRE_LIB", new Path(jdkLib), null);
659
652
660
		// Set classpaths (workaround bug 73253 Project references not set on project open)
653
		// Set classpaths (workaround bug 73253 Project references not set on project open)
661
		System.out.print("Set projects classpaths...");
654
		System.out.print("Set projects classpaths...");
655
		start = System.currentTimeMillis();
662
		ALL_PROJECTS = JavaCore.create(workspaceRoot).getJavaProjects();
656
		ALL_PROJECTS = JavaCore.create(workspaceRoot).getJavaProjects();
663
		length = ALL_PROJECTS.length;
657
		int projectsLength = ALL_PROJECTS.length;
664
		for (int i = 0; i < length; i++) {
658
		for (int i = 0; i < projectsLength; i++) {
665
			String projectName = ALL_PROJECTS[i].getElementName();
659
			String projectName = ALL_PROJECTS[i].getElementName();
666
			if (BIG_PROJECT_NAME.equals(projectName)) continue; // will be set later
660
			if (BIG_PROJECT_NAME.equals(projectName)) continue; // will be set later
667
			if (JavaCore.PLUGIN_ID.equals(projectName)) {
661
			if (JavaCore.PLUGIN_ID.equals(projectName)) {
Lines 669-682 Link Here
669
//			} else if (JUNIT_PROJECT_NAME.equals(projectName)) {
663
//			} else if (JUNIT_PROJECT_NAME.equals(projectName)) {
670
//				JUNIT_PROJECT = ALL_PROJECTS[i];
664
//				JUNIT_PROJECT = ALL_PROJECTS[i];
671
			}
665
			}
672
			ALL_PROJECTS[i].setRawClasspath(ALL_PROJECTS[i].getRawClasspath(), null);
666
			
667
			// Set jdk jars onto the project classpath
668
			IClasspathEntry[] entries = ALL_PROJECTS[i].getRawClasspath();
669
			int entriesLength = entries.length;
670
			System.arraycopy(entries, 0, entries = new IClasspathEntry[jdkLibsLength+entriesLength], jdkLibsLength, entriesLength);
671
			System.arraycopy(jdkEntries, 0, entries, 0, jdkLibsLength);
672
			ALL_PROJECTS[i].setRawClasspath(entries, null);
673
673
			// Make Big project dependent from jdt.core one
674
			// Make Big project dependent from jdt.core one
674
//			IClasspathEntry[] bigProjectEntries = BIG_PROJECT.getRawClasspath();
675
//			IClasspathEntry[] bigProjectEntries = BIG_PROJECT.getRawClasspath();
675
//			int bpeLength = bigProjectEntries.length;
676
//			int bpeLength = bigProjectEntries.length;
676
//			System.arraycopy(bigProjectEntries, 0, bigProjectEntries = new IClasspathEntry[bpeLength+1], 0, bpeLength);
677
//			System.arraycopy(bigProjectEntries, 0, bigProjectEntries = new IClasspathEntry[bpeLength+1], 0, bpeLength);
677
//			bigProjectEntries[bpeLength] = JavaCore.newProjectEntry(JDT_CORE_PROJECT.getPath());
678
//			bigProjectEntries[bpeLength] = JavaCore.newProjectEntry(JDT_CORE_PROJECT.getPath());
678
		}
679
		}
679
		System.out.println("done");
680
		System.out.println("("+(System.currentTimeMillis()-start)+"ms)");
680
681
681
		// Initialize Parser wokring copy
682
		// Initialize Parser wokring copy
682
		IJavaElement element = JDT_CORE_PROJECT.findType("org.eclipse.jdt.internal.compiler.parser.Parser");
683
		IJavaElement element = JDT_CORE_PROJECT.findType("org.eclipse.jdt.internal.compiler.parser.Parser");

Return to bug 267789