Bug 58537 Migration to new source lookup facilities [JUnit]
New source lookup facilities have been added to the debug platform. The Java debugger provides a corresponding new implementation for source lookup. The following patch will migrate the JUnit launch config to use the new source lookup support. The changes are: * specify the platform source lookup tab in the tab group * no longer initialize the source locator attribute in launch shortcuts * specify the source locator and source path computer for the JUnit launch config type in plug-in XML
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizardPage.java
status.setWarning(WizardMessages.getString("NewTestClassWizPage.error.junitNotOnbuildpath")); 		
		fContainerStatus= status;
	}
	
	public static void addJUnitToBuildPath(IJavaProject project) throws JavaModelException {
		IPath junitHome= new Path(JUnitPlugin.JUNIT_HOME);
		IPath sourceHome= new Path("ORG_ECLIPSE_JDT_SOURCE_SRC");
		IPath sourcePath= sourceHome.append("org.junit_3.8.1/junitsrc.zip");
		IClasspathEntry entry= JavaCore.newVariableEntry(
			junitHome.append("junit.jar"),  
			sourcePath,  
			null
		);
		addToClasspath(project, entry);
	}	
	
	private static void addToClasspath(IJavaProject project, IClasspathEntry entry) throws JavaModelException {
		IClasspathEntry[] oldEntries= project.getRawClasspath();
		for (int i= 0; i < oldEntries.length; i++) {
			if (oldEntries[i].equals(entry)) {
				return;
			}
		}
		int nEntries= oldEntries.length;
		IClasspathEntry[] newEntries= new IClasspathEntry[nEntries + 1];
		System.arraycopy(oldEntries, 0, newEntries, 0, nEntries);
		newEntries[nEntries]= entry;
		project.setRawClasspath(newEntries, null);
	}
	/**