Bug 38444 new project, cancel deletes existing files [code manipulation]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardSecondPage.java
}
					
					if (binPath.segmentCount() > 0 && !binPath.equals(srcPath)) {
						IFolder folder= fCurrProject.getFolder(binPath);
						CoreUtility.createFolder(folder, true, true, null);
					}
					
					final IPath projectPath= fCurrProject.getFullPath();
					
					List cpEntries= new ArrayList();
					cpEntries.add(JavaCore.newSourceEntry(projectPath.append(srcPath)));
					cpEntries.addAll(Arrays.asList(PreferenceConstants.getDefaultJRELibrary()));
					entries= (IClasspathEntry[]) cpEntries.toArray(new IClasspathEntry[cpEntries.size()]);
					
					
					outputLocation= projectPath.append(binPath);
				} else {
					IPath projectPath= fCurrProject.getFullPath();
					List cpEntries= new ArrayList();
					cpEntries.add(JavaCore.newSourceEntry(projectPath));
					cpEntries.addAll(Arrays.asList(PreferenceConstants.getDefaultJRELibrary()));
					entries= (IClasspathEntry[]) cpEntries.toArray(new IClasspathEntry[cpEntries.size()]);
					outputLocation= projectPath;
				}
				init(JavaCore.create(fCurrProject), outputLocation, entries, false);
			}
			monitor.worked(1);
		} finally {
			monitor.done();
		}