Bug 40347 [misc] Renaming a project with an open editor fills log
I20030716+plugin-export 1) have a Java file open in the Java editor 2) rename the enclosing project -> exception in log but no stacktrace
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
}
	
	/**
	 * Sets the document provider's save policy.
	 */
	public void setSavePolicy(ISavePolicy savePolicy) {
		fSavePolicy= savePolicy;
	}
	
	/**
	 * Creates a compilation unit from the given file.
	 * 
	 * @param file the file from which to create the compilation unit
	 */
	protected ICompilationUnit createCompilationUnit(IFile file) {
		Object element= JavaCore.create(file);
		if (element instanceof ICompilationUnit)
			return (ICompilationUnit) element;
		return null;
	}
	
	/**
	 * Creates a line tracker working with the same line delimiters as the document
	 * of the given element. Assumes the element to be managed by this document provider.
	 * 
	 * @param element the element serving as blue print
	 * @return a line tracker based on the same line delimiters as the element's document
	 */
	public ILineTracker createLineTracker(Object element) {
		return new DefaultLineTracker();