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
private static final int SIZING_CONTAINER_GROUP_HEIGHT = 250;
	private IStructuredSelection currentSelection;
	private IFolder newFolder;
	
	private URI linkTargetPath;
	
	private ResourceAndContainerGroup resourceGroup;
	private Button advancedButton;
	private CreateLinkedResourceGroup linkedResourceGroup;
	private Composite linkedResourceParent;
	private Composite linkedResourceComposite;
	/**
	 * Height of the "advanced" linked resource group. Set when the advanced
	 * group is first made visible.
	 */
	private int linkedResourceGroupHeight = -1;
	/**
	 * First time the advanced group is validated.
	 */
	private boolean firstLinkCheck = true;
	/**
	 * Creates a new folder creation wizard page. If the initial resource
	 * selection contains exactly one container resource then it will be used as
	 * the default container resource.
	 * 
	 * @param pageName
	 *            the name of the page
	 * @param selection
	 *            the current resource selection