Bug 111440

Summary: [ltk][refactoring] preview page should sort/structure changed files
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-10-04 09:55:49 EDT
I20050928-1300

Rename type junit.framework.Test to A and go through the preview page. The files
to be changed are shown in random order. I'd expect them to be sorted in a
meaningful way (by name & package, or by package & name).

It would be even better if I could switch from the (sorted) flat mode to a tree
mode that would show the CUs' parents up to the Java project (or the Resources'
parents, if Java model information is not available).
Comment 1 Martin Aeschlimann CLA 2005-10-05 05:47:26 EDT
I assume this is a general preview page issue.
Comment 2 Dirk Baeumer CLA 2005-10-10 16:26:32 EDT
Downgrading priority to P3.
Comment 3 Dirk Baeumer CLA 2005-10-10 16:27:47 EDT
Implemenation node: LTK UI which provides the preview page doesn't know anything
about the kind of changes (e.g. it doesn't know anything about Java). So if we
want to provide such a feature it must be provided via an extension point.
Comment 4 Markus Keller CLA 2005-12-02 06:11:00 EST
I added sorting by cu name to the changes returned by the TextChangeManager. Before, sorting was random (by hashCode()). This will solve the problem for most java refactorings for now.
Comment 5 Dirk Baeumer CLA 2006-04-03 10:46:57 EDT
Moving to Markus Keller due to ownership changes.
Comment 6 Markus Keller CLA 2007-07-24 06:44:37 EDT
Is also a problem for preview in the new Replace dialog from the Search view (unordered and not hierarchical).
Comment 7 Markus Keller CLA 2011-01-03 13:34:36 EST
(In reply to comment #6)
> Is also a problem for preview in the new Replace dialog from the Search view
> (unordered and not hierarchical).

Added a similar workaround in org.eclipse.search.internal.ui.text.ReplaceRefactoring (sort by full path).