Community
Participate
Working Groups
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
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.
I think this makes sense.
Created attachment 189713 [details] Patch Updated patch for CDT 7.0.1 and HEAD.
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.
*** cdt cvs genie on behalf of aleherbau *** Bug 311880 - Add preference to keep position of excluded files in Project Explorer Patch by Alex Freidin [*] PreferenceConstants.java 1.63 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java?root=Tools_Project&r1=1.62&r2=1.63 [*] CElementSorter.java 1.25 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java?root=Tools_Project&r1=1.24&r2=1.25 [*] PreferencesMessages.java 1.52 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.java?root=Tools_Project&r1=1.51&r2=1.52 [*] PreferencesMessages.properties 1.103 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties?root=Tools_Project&r1=1.102&r2=1.103 [*] AppearancePreferencePage.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/AppearancePreferencePage.java?root=Tools_Project&r1=1.13&r2=1.14
Thanks for applying.
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?