try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(getPackageFragmentRoot().getJavaProject(), getPackageFragment(), superClassName); JUnitStatus status = new JUnitStatus(); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.not_exist")); fSuperClassStatus= status; } else { if (type.isInterface()) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.is_interface")); fSuperClassStatus= status; } if (!TestSearchEngine.isTestImplementor(type)) { status.setError(Messages.getFormattedString("NewTestClassWizPage.error.superclass.not_implementing_test_interface", JUnitPlugin.TEST_INTERFACE_NAME));
try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(getPackageFragmentRoot().getJavaProject(), getPackageFragment(), superClassName); JUnitStatus status = new JUnitStatus(); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.not_exist"));
	private void validateSuperClass() {		fMethodStubsButtons.setEnabled(2, true);//enable setUp() checkbox		fMethodStubsButtons.setEnabled(3, true);//enable tearDown() checkbox		String superClassName= getSuperClass();		if (superClassName != null && !superClassName.equals("") && getPackageFragmentRoot() != null) { //$NON-NLS-1$		try {			IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(getPackageFragmentRoot().getJavaProject(), getPackageFragment(), superClassName);			JUnitStatus status = new JUnitStatus();							if (type == null) {				status.setError(Messages.getString("NewTestClassWizPage.error.superclass.not_exist")); //$NON-NLS-1$				fSuperClassStatus= status;			} else {				if (type.isInterface()) {					status.setError(Messages.getString("NewTestClassWizPage.error.superclass.is_interface")); //$NON-NLS-1$					fSuperClassStatus= status;				}				if (!TestSearchEngine.isTestImplementor(type)) {					status.setError(Messages.getFormattedString("NewTestClassWizPage.error.superclass.not_implementing_test_interface", JUnitPlugin.TEST_INTERFACE_NAME)); //$NON-NLS-1$					fSuperClassStatus= status;				} else {					IMethod setupMethod= type.getMethod(SETUP, new String[] {});					IMethod teardownMethod= type.getMethod(TEARDOWN, new String[] {});					if (setupMethod.exists())						fMethodStubsButtons.setEnabled(2, !Flags.isFinal(setupMethod.getFlags()));					if (teardownMethod.exists())						fMethodStubsButtons.setEnabled(3, !Flags.isFinal(teardownMethod.getFlags()));				}			}		} catch (JavaModelException e) {			System.err.println(this.getClass()+": checkSuperClass(): "+e); //$NON-NLS-1$		}		}	}