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
/* used when for example both sum and Sum methods are present. Then
		 * sum -> testSum
		 * Sum -> testSum1
		 */
		List newMethodsNames= new ArrayList();				
			for (int i = 0; i < methods.length; i++) {
			IMethod testedMethod= methods[i];
			String elementName= testedMethod.getElementName();
			StringBuffer methodName= new StringBuffer(NewTestCaseCreationWizardPage2.PREFIX+Character.toUpperCase(elementName.charAt(0))+elementName.substring(1));
			StringBuffer newMethod= new StringBuffer();
	
			if (overloadedMethods.contains(testedMethod)) {
				appendMethodComment(newMethod, testedMethod);
				String[] params= testedMethod.getParameterTypes();
				appendParameterNamesToMethodName(methodName, params);
			}
			/* Should I for examples have methods
			 * 	void foo(java.lang.StringBuffer sb) {}
			 *  void foo(mypackage1.StringBuffer sb) {}
			 *  void foo(mypackage2.StringBuffer sb) {}
			 * I will get in the test class:
			 *  testFooStringBuffer()
			 *  testFooStringBuffer1()
			 *  testFooStringBuffer2()
			 */
			if (newMethodsNames.contains(methodName.toString())) {
				int suffix= 1;
				while (newMethodsNames.contains(methodName.toString() + Integer.toString(suffix)))
					suffix++;
				methodName.append(Integer.toString(suffix));