Bug 85519 [implementation] saveAs existing file fails - content replaced with original content
I20050215-2300 (m5 test pass) - have pkg/Test1.java open - have pkg/Test2.java open - dirty Test1.java - save Test1.java as Test2.java expected: content of Test2 gets replaced with data in Test1 actual: a second editor with Test2.java is opened, Test1.java is closed, the unsaved changes in Test1.java are lost -> lost data.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
CompilationUnitInfo cuInfo= (CompilationUnitInfo) info;
			
			try  {
			    cuInfo.fCopy.discardWorkingCopy();
			} catch (JavaModelException x)  {
			    handleCoreException(x, x.getMessage());
			}			
			
			if (cuInfo.fModel != null)
				cuInfo.fModel.removeAnnotationModelListener(fGlobalAnnotationModelListener);
		}
		super.disposeFileInfo(element, info);
	}
	/**
	 * Creates and returns a new sub-progress monitor for the
	 * given parent monitor.
	 * 
	 * @param monitor the parent progress monitor
	 * @param ticks the number of work ticks allocated from the parent monitor
	 * @return the new sub-progress monitor
	 */
	private IProgressMonitor getSubProgressMonitor(IProgressMonitor monitor, int ticks) {
		if (monitor != null)
			return new SubProgressMonitor(monitor, ticks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
		return new NullProgressMonitor();
	}
	protected void commitWorkingCopy(IProgressMonitor monitor, Object element, CompilationUnitInfo info, boolean overwrite) throws CoreException {
		if (monitor == null)
			monitor= new NullProgressMonitor();