Project: JDT
Bug 120586 [correction] Exceptions in log when renaming CU on quick fix
Reported: 2005-12-13 10:47:42 | Status: verified fixed

20051213-0010 1. add '*.foo' as new Java extension to the Java Source File content type (restart required, pending bug in platform) 2. create a Java project and package 'p', and create a file (use new file wizard) 'E.foo' 3. Set content to package p; public class F { } 4. use quick fix on the wrong type name: Choose to rename the CU 5. Works fine but messages logged: !ENTRY org.eclipse.jdt.core 4 969 2005-12-13 16:43:02.221 !MESSAGE F.foo [in p [in <project root> [in Test3]]] does not exist !ENTRY org.eclipse.jdt.core 4 969 2005-12-13 16:43:02.231 !MESSAGE F.foo [in p [in <project root> [in Test3]]] does not exist The problem is CompilationUnitEditor$RememberedOffset.getRememberedOffset(IJavaElement) line: 1002 fElement is the old element. Accessing it returns a JavaModelExeption. This the correct behaviour as it doesn't eist anymore (I checked on the file system) Interestingly, this doesn't happen if the file would be called E.java. There the Java model claims that E.java is still existing (tested using the debugger). This looks like a bug too, but seems to just cover the bug in the Java editor of accessing the old element.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java