Bug 242391 - Ability to change build settings on multiple resources simultaneously
Summary: Ability to change build settings on multiple resources simultaneously
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 5.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on: 294628
Blocks: 248764
  Show dependency tree
 
Reported: 2008-07-29 10:15 EDT by James Blackburn CLA
Modified: 2020-09-04 15:23 EDT (History)
1 user (show)

See Also:


Attachments
patch 1 (57.66 KB, patch)
2010-07-28 10:09 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff
screenshot (112.72 KB, image/png)
2010-07-28 10:09 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details
patch 2 (58.84 KB, patch)
2010-07-28 11:34 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2008-07-29 10:15:59 EDT
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:
Comment 1 James Blackburn CLA 2010-07-28 10:09:11 EDT
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.
Comment 2 James Blackburn CLA 2010-07-28 10:09:51 EDT
Created attachment 175409 [details]
screenshot
Comment 3 Andrew Gvozdev CLA 2010-07-28 10:22:46 EDT
Does preference "Multiple Configurations Edit" affects this? How do you handle if resources have conflicting options?
Comment 4 James Blackburn CLA 2010-07-28 10:50:30 EDT
(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.
Comment 5 James Blackburn CLA 2010-07-28 11:34:47 EDT
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