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
ControlContentAssistHelper.createTextContentAssistant(fClassToTestText, fClassToTestCompletionProcessor);
	}
	private void classToTestButtonPressed() {
		IType type= chooseClassToTestType();
		if (type != null) {
			fClassToTestText.setText(JavaModelUtil.getFullyQualifiedName(type));
			handleFieldChanged(CLASS_TO_TEST);
		}
	}
	private IType chooseClassToTestType() {	
		IPackageFragmentRoot root= getPackageFragmentRoot();
		if (root == null) 
			return null;
		IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() };
		IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
		
		IType type= null;
		try {		
			SelectionDialog dialog= JavaUI.createTypeDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_CLASSES, false, getClassToTestText());
			dialog.setTitle(WizardMessages.getString("NewTestClassWizPage.class_to_test.dialog.title")); 
			dialog.setMessage(WizardMessages.getString("NewTestClassWizPage.class_to_test.dialog.message")); 
			dialog.open();
			if (dialog.getReturnCode() != Window.OK)
				return type;
			else {
				Object[] resultArray= dialog.getResult();
				if (resultArray != null && resultArray.length > 0)
					type= (IType) resultArray[0];
			}
		} catch (JavaModelException e) {