Bug 202268 - Rebuild workspace after changing casing of class name takes a long time
Summary: Rebuild workspace after changing casing of class name takes a long time
Status: VERIFIED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-05 08:53 EDT by Benno Baumgartner CLA
Modified: 2007-09-18 09:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2007-09-05 08:53:21 EDT
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
Comment 1 Kent Johnson CLA 2007-09-06 15:37:53 EDT
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.
Comment 2 Jerome Lanneluc CLA 2007-09-18 09:35:40 EDT
Verified for 3.4M2