Community
Participate
Working Groups
I20070828-0800 1. check out JDT/UI from head 2. Open org.eclipse.jdt.internal.ui.workingsets.JavaWorkingSetPageContentProvider 4. change class name to javaWorkingSetPageContentProvider 5. Save Is: Building workspace takes about a minute Should: Be lightning fast, type is only used once and has default visibility
It works fine when the type is renamed from javaWorkingSetPageContentProvider to JavaWorkingSetPageContentProvider because then the type matches the file name. But when its renamed so it no longer matches the filename, we must do a full build IF another type references the original type name. Otherwise we'll fail the build trying to find a missing .class file. See IncrementalTests.testRenameMainType() for an example of a case that fails if we do not do a full build. It involves 3 types: class A {} class B extends A {} class C extends B {} when A is renamed to _A AND C is also modified, then B is found as a .class file & it expects to find the class file for its superclass A. If we did not notice that A.java was modified & do a full build, we would abort the build because A.class no longer exists. So the bottom line is we can only optimize one direction of the rename if the type has references.
Verified for 3.4M2