Community
Participate
Working Groups
Build ID: 5.0 Steps To Reproduce: CDT 5 has the ability to edit project build settings for multiple configurations. It would nice if the user could modify build settings based on a selected set of Files / Folders. Currently if a user want to set an option on a set of files they have to add the option value to all files individually, or add the option value to the resources' container and unset the option on resources which shouldn't have the option set. More information:
Created attachment 175408 [details] patch 1 Add support for editing CDT properties on multiple resources simultaneously. Interestingly this feature requires little (in most cases no) change to ICPropertyTabs that already support multi-configuration selection. These property pages already operate on multiple ICResourceDescriptions, and most of them don't care what project the resource descriptions are from. This feature is blocked on platform improvements in bug 294628. Having this functionality should make a big difference to usability of CDT with large modular workspace. Any/all feedback appreciated. Major changes: cdt.core: - ICMultiProjectDescription added to model the multiple project desc item (akin to the other ICMultiItemsHolder) - ICMultiItemsHolder made generic managebuilder.ui: - plugin.xml: Update multi-config aware PropertyPages to allow multiSelection, and update the enabledWhen enablement expression to iterate over the resources to confirm they're of the same type (i.e. all Projects, all Folders, or all Files) cdt.ui: - AbstractPage.java (bulk of the change): - add #getProjects() - deprecated #getProject(). - deprecated IResource internalElement - Update the loading & saving code to handle multiple project configs correctly. - Don't allow creating / deleting configurations when multiple resources are selected. - When selecting multiple resources, show the project name in the config menu drop-down - CDTPropertyManager.java: add support for ICMultiProjectDescription - ConfigMultiSelectionDialog.java: add project name column ; allow resizing - JavaDoc tweaks.
Created attachment 175409 [details] screenshot
Does preference "Multiple Configurations Edit" affects this? How do you handle if resources have conflicting options?
(In reply to comment #3) > Does preference "Multiple Configurations Edit" affects this? Do you mean the string list preferences? I haven't fiddled with how this is handled. > How do you handle > if resources have conflicting options? They deal with ICResourceDescriptions as they did before. So it's an equivalent issue to selecting two configuration from different tool chains -- I'm not sure how well this is currently handled. A major point is that, as far as property tabs are concerned, they're still dealing with ICResourceDescription (or ICMultiResourceDescriptions), so while the change could affect some pages subtley (if they assume all the resource configs are in the same project), its much less major than the addition of multi-configuration handling was in the first place.
Created attachment 175418 [details] patch 2 Small tweak to previous patch: - #getProject() return null if no projects selected (preferences page) - ArtifactTab, handle resources in multiple projects correctly Still a lingering issue with artifact tab unrelated to this: Bug 321137