fRootStatus.setWarning(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.warning.ReplaceSFandOL", newOutputLocation.toString()));
fRootStatus.setWarning(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.warning.ReplaceSFandOL", fNewOutputLocation.makeRelative().toString()));
	private void updateRootStatus() {		fRootDialogField.enableButton(fCurrJProject != null);		fIsProjectAsSourceFolder= false;		if (fCurrJProject == null) {			return;		}		fRootStatus.setOK();				IPath projPath= fCurrJProject.getProject().getFullPath();		String str= fRootDialogField.getText();		if (str.length() == 0) {			fRootStatus.setError(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.error.EnterRootName", fCurrJProject.getProject().getFullPath().toString())); //$NON-NLS-1$		} else {			IPath path= projPath.append(str);			IStatus validate= fWorkspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER);			if (validate.matches(IStatus.ERROR)) {				fRootStatus.setError(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.error.InvalidRootName", validate.getMessage())); //$NON-NLS-1$			} else {				IResource res= fWorkspaceRoot.findMember(path);				if (res != null) {					if (res.getType() != IResource.FOLDER) {						fRootStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.NotAFolder")); //$NON-NLS-1$						return;					}				}				ArrayList newEntries= new ArrayList(fEntries.length + 1);				for (int i= 0; i < fEntries.length; i++) {					IClasspathEntry curr= fEntries[i];					if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {						if (path.equals(curr.getPath())) {							fRootStatus.setError(NewWizardMessages.getString("NewSourceFolderWizardPage.error.AlreadyExisting")); //$NON-NLS-1$							return;						}						if (projPath.equals(curr.getPath())) {							fIsProjectAsSourceFolder= true;							curr= JavaCore.newSourceEntry(path);						}						}					newEntries.add(curr);				}				if (!fIsProjectAsSourceFolder) {					newEntries.add(JavaCore.newSourceEntry(path));				}					IClasspathEntry[] newEntriesArray= (IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]);				IJavaModelStatus status= JavaConventions.validateClasspath(fCurrJProject, newEntriesArray, fOutputLocation);				if (!status.isOK()) {					if (fIsProjectAsSourceFolder && fOutputLocation.equals(projPath)) {						IPath newOutputLocation= projPath.append(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_BINNAME));						IStatus status2= JavaConventions.validateClasspath(fCurrJProject, newEntriesArray, newOutputLocation);						if (status2.isOK()) {							fRootStatus.setWarning(NewWizardMessages.getFormattedString("NewSourceFolderWizardPage.warning.ReplaceSFandOL", newOutputLocation.toString())); //$NON-NLS-1$							return;						}					}					fRootStatus.setError(status.getMessage());				} else if (fIsProjectAsSourceFolder) {					fRootStatus.setWarning(NewWizardMessages.getString("NewSourceFolderWizardPage.warning.ReplaceSF")); //$NON-NLS-1$				}								}		}	}