Bug 83498 [JUnit] Recreate Test Suite should be more lenient [JUnit]
The code formatter will format //$JUnit-BEGIN$ to // $JUnit-BEGIN$ @@@@ Afterwards "Recreate Test Suite" issues a warning. It should not matter whether there are spaces between // and $JUnit-BEGIN$.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java
public static String getUpdatableString(Object[] selectedClasses) {
		StringBuffer suite= new StringBuffer();
		suite.append(NewTestSuiteWizardPage.START_MARKER+"\n"); 
		for (int i= 0; i < selectedClasses.length; i++) {
			if (selectedClasses[i] instanceof IType) {
				IType testType= (IType) selectedClasses[i];
				IMethod suiteMethod= testType.getMethod("suite", new String[] {}); 
				if (!suiteMethod.exists()) {
					suite.append("suite.addTestSuite("+testType.getElementName()+".class);"); 
				} else {
					suite.append("suite.addTest("+testType.getElementName()+".suite());"); 
				}
			}
		}
		suite.append("\n"+NewTestSuiteWizardPage.END_MARKER); 
		return suite.toString();
	}
	
	
	public static boolean checkValidateEditStatus(ICompilationUnit testSuiteCu, Shell shell){
		IStatus status= validateModifiesFiles(getTestSuiteFile(testSuiteCu));
		if (status.isOK())	
			return true;
		ErrorDialog.openError(shell, WizardMessages.UpdateTestSuite_update, WizardMessages.UpdateTestSuite_could_not_update, status); 
		return false;
	}
	
	private static IFile getTestSuiteFile(ICompilationUnit testSuiteCu) {
		return (IFile) testSuiteCu.getResource();
	}