Bug 38444 new project, cancel deletes existing files [code manipulation]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardSecondPage.java
final IPath newProjectLocation= fFirstPage.getLocationPath();
		
		fCanRemoveContent= !fFirstPage.getDetect();
		
		final boolean initialize= !(newProjectHandle.equals(fCurrProject) && newProjectLocation.equals(fCurrProjectLocation));
		
		final IRunnableWithProgress op= new IRunnableWithProgress() {
			public void run(IProgressMonitor monitor) throws InvocationTargetException {
				try {
					updateProject(initialize, monitor);
				} catch (CoreException e) {
					throw new InvocationTargetException(e);
				} 
			}
		};
	
		try {
			getContainer().run(false, true, new WorkspaceModifyDelegatingOperation(op, newProjectHandle));
		} catch (InvocationTargetException e) {
			final String title= NewWizardMessages.getString("JavaProjectWizardSecondPage.error.title"); 
			final String message= NewWizardMessages.getString("JavaProjectWizardSecondPage.error.message"); 
			ExceptionHandler.handle(e, getShell(), title, message);
		} catch  (InterruptedException e) {
			
		}
	}
	
	protected void updateProject(boolean initialize, IProgressMonitor monitor) throws CoreException {
		
		fCurrProject= fFirstPage.getProjectHandle();