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/src/org/eclipse/ui/wizards/newresource/BasicNewProjectResourceWizard.java
IPreferenceConstants.OPEN_PERSP_MODE);
		
		if (workbenchPerspectiveSetting == IPreferenceConstants.OPM_NEW_WINDOW) {
			openInNewWindow(finalPersp);
			return;
		}
		
		replaceCurrentPerspective(finalPersp);
	}
	/**
	 * Adds to the list all perspective IDs in the Workbench who's original ID
	 * matches the given ID.
	 * 
	 * @param perspectiveIds
	 *            the list of perspective IDs to supplement.
	 * @param id
	 *            the id to query.
	 * @since 3.0
	 */
	private static void addPerspectiveAndDescendants(List perspectiveIds,
			String id) {
		IPerspectiveRegistry registry = PlatformUI.getWorkbench()
				.getPerspectiveRegistry();
		IPerspectiveDescriptor[] perspectives = registry.getPerspectives();
		for (int i = 0; i < perspectives.length; i++) {
			
			
			PerspectiveDescriptor descriptor = ((PerspectiveDescriptor) perspectives[i]);
			if (descriptor.getOriginalId().equals(id)) {
				perspectiveIds.add(descriptor.getId());