eclipse-cdt / cdt

Eclipse CDT™ C/C++ Development Tools
http://eclipse.org/cdt
Eclipse Public License 2.0
307 stars 201 forks source link

Paths and Symbols > Source Location disallows multi-config mode #480

Open thevbw opened 1 year ago

thevbw commented 1 year ago

Describe the bug You cannot add or remove a source location from multiple build configurations at the same time.

To Reproduce Steps to reproduce the behaviour:

  1. Go to a project's properties
  2. Click on C/C++ General, Paths and Symbols
  3. Open "Source Location" tab
  4. Select "[ Multiple configurations...]" or "[ All configurations ]" at the top.

Expected behaviour "Multiple configurations" functionality being available

Screenshots Screenshot_20230801_005218

Additional context Incredibly annoying when project has crosscompiling builds, because one has to update the same information >4 times.

Should be fixed by an override: https://github.com/thevbw/eclipse-cdt-pr/commit/52cbe4b57d6d0e0075ff27f4682a13bdf3a94d1e

If this is intentional, I implore it to be replaced with a warning.

jonahgraham commented 1 year ago

Thanks @thevbw for the bug report. I hope you will consider providing your change as a Pull Request so it can be properly reviewed and merged. In the meantime I had a quick look at your change and if that is all it takes to make it work, that is great. However canSupportMultiCfg is explicitly false in the superclass, so I wouldn't expect changing it to true alone could resolve the issue. Please provide what you have tested when you provide the PR so that we can verify that there is no regression here. In particular does the code work as expected when a subset of configurations are selected (as opposed to all of them). If not, what may be needed is adapting the CLocationTab (the superclass) to understand ICMultiConfigDescription