} updateStatus(fTreeStatus);
} updateStatus(findMostSevereStatus());
	private void doValidation(int validate) {				switch(validate) {			case PREFERENCESTATUS:				fPreferenceStatus= new StatusInfo();				if (JavadocPreferencePage.getJavaDocCommand().length() == 0) {					fPreferenceStatus.setError("Javadoc command location not specified on the Javadoc preference page.");					}				updateStatus(fPreferenceStatus);				break;			case CUSTOMSTATUS :										if (fCustomButton.getSelection()) {						fDocletStatus= new StatusInfo();						String doclet= fDocletTypeText.getText();						String docletPath= fDocletText.getText();						if (doclet.length() == 0) {							fDocletStatus.setError("Enter a doclet name.");										} else if (JavaConventions.validateJavaTypeName(doclet).matches(IStatus.ERROR)) {							fDocletStatus.setError("Invalid doclet name.");						} else if ((docletPath.length() == 0) || !validDocletPath(docletPath)) {							fDocletStatus.setError("Not a valid doclet class path.");						} 						updateStatus(fDocletStatus);					}					break;								case STANDARDSTATUS :				if (fStandardButton.getSelection()) {					fDestinationStatus= new StatusInfo();					IPath path= new Path(fDestinationText.getText());					if (Path.ROOT.equals(path) || Path.EMPTY.equals(path)) {						fDestinationStatus= new StatusInfo();						fDestinationStatus.setError("Enter the destination folder.");					}					File file= new File(path.toOSString());					if (!path.isValidPath(path.toOSString()) || file.isFile()) {						fDestinationStatus.setError("Not a valid folder.");						updateStatus(fDestinationStatus);					}					updateStatus(fDestinationStatus);				}				break;						case TREESTATUS :						fTreeStatus= new StatusInfo();				boolean empty= fInputGroup.getAllCheckedTreeItems().isEmpty();				if (empty)					fTreeStatus.setError("Select elements from tree.");				else {					int projCount= 0;					Object[] items= fInputGroup.getAllCheckedTreeItems().toArray();					for (int i = 0; i < items.length; i++) {						IJavaElement element = (IJavaElement)items[i];						if(element instanceof IJavaProject) {							projCount++;							if(projCount > 1)								fTreeStatus.setError("Cannot generate Javadoc for elements in multiple projects.");						}					}				}										updateStatus(fTreeStatus);				break;			}//end switch	}