Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311880

Summary: Add preference to keep position of excluded files in Project Explorer
Product: [Tools] CDT Reporter: Alex Freidin <freidin.alex>
Component: cdt-coreAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: enhancement    
Priority: P3 CC: malaperle
Version: 6.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Modifies sorting of excluded files according to user preference
none
Patch aleherb+eclipse: iplog+

Description Alex Freidin CLA 2010-05-06 09:48:25 EDT
Build Identifier: I20090611-1540

While working with large projects, it is sometimes more convenient to keep the position of a file after it was excluded from build. At the moment, excluded files are moved down to the bottom of directory listing and if you often include/exclude a specific file in a large directory, you need to look for it, as its position changes.
I added a preference in Window > Preferences > C/C++ > Appearance, so that the default behavior could be changed to keep the files order.

Reproducible: Always
Comment 1 Alex Freidin CLA 2010-05-06 11:41:15 EDT
Created attachment 167330 [details]
Modifies sorting of excluded files according to user preference

The patch is based on CDT_6_0_0 tag sources, not tested with HEAD.
Comment 2 Anton Leherbauer CLA 2010-10-14 02:29:37 EDT
I think this makes sense.
Comment 3 Alex Freidin CLA 2011-02-24 11:34:40 EST
Created attachment 189713 [details]
Patch

Updated patch for CDT 7.0.1 and HEAD.
Comment 4 Anton Leherbauer CLA 2011-02-25 03:27:37 EST
Thanks, I committed the patch with a minor change to the wording of the preference:

Keep sort order of excluded sources in Project Explorer and C/C++ Projects view

Hope that's OK.
Comment 6 Alex Freidin CLA 2011-02-27 03:45:26 EST
Thanks for applying.
Comment 7 Marc-André Laperle CLA 2012-02-04 01:32:52 EST
What about keeping the order of the folders? This doesn't seem to work for me (8.0.1 and 8.0.2 RC2). Was it intended to work in the original patch?