Bug 219901 [Undo] new file creation subjec to Undo (file deleted without warning)
when creating a new file by right clicking on your project in the project explorer new->file this action is put on the undo/redo stack. Pressing Ctrl-Z to undo this action will thus delete your file. As this stack is separate from the stack in the editor , one can create a new file, work for a long time, then inadvertently press ctrl-z to undo a code change while having the focus on the project explorer and irrevocably lose their file. Redo will create a new EMPTY file; the work is gone, forever. This appears to only work for the "new file", not for "new->source file" etc. Although some may perceive this as a feature, it is hard to imagine a scenario where ctrl-z should permanently delete a file without warning.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java
*                
	 * @deprecated As of 3.3, use {@link #createNewFolder()} which uses the 
	 *   undoable operation support.
	 */
	protected void createFolder(IFolder folderHandle, IProgressMonitor monitor)
			throws CoreException {
		try {
			
			
			
			if (!folderHandle.exists()) {
				if (linkTargetPath != null) {
					folderHandle.createLink(linkTargetPath,
							IResource.ALLOW_MISSING_LOCAL, monitor);
				} else {
					IPath path = folderHandle.getFullPath();
					IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
							.getRoot();
					int numSegments = path.segmentCount();
					if (numSegments > 2
							&& !root.getFolder(path.removeLastSegments(1))
									.exists()) {
						
						
						
						for (int i = numSegments - 2; i > 0; i--) {
							IFolder folder = root.getFolder(path
									.removeLastSegments(i));
							if (!folder.exists()) {
								folder.create(false, true, monitor);