You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Formatting accomplished with #295.
Sorting of include statements still to be supported. Usage of ImportOrderStep is not a suitable option. CDT offers a highly configurable solution. Aiming to integrate CDT include-organizer.
Hence this issue remains open.
The usage of IncludeOrganizer as it is provided by CDT is not an option.
The amount of dependencies on other Eclipse components is quite high.
Only a very small set of options is supported without pre-knowledge of the project setup (knowledge which headers belong to other libraries). Unfortunately even the header substitution is not applied.
The results differ for the same configuration depending whether it is run with a project or without. This cannot be easily worked-around.
All in all it seems a better idea to implement an own organizer similar to the Spotless Java Import sorter.
It seems like a missing piece is an include organizer. One option is to build one from scratch, another would be to use clang-format (#475), and follow it up with eclipseCdt(). Regardless, even without include organizing, it's tremendously valuable to have Eclipse CDT's autoformatter included, thanks so much @fvgh! I'm going to close this as "long-ago implemented", and if you have a specific unmet need, feel free to open a new issue.
Activity
fvgh commentedon Aug 29, 2018
I provided an example use case. Feedback is welcome.
fvgh commentedon Sep 15, 2018
Formatting accomplished with #295.
Sorting of
includestatements still to be supported. Usage ofImportOrderStepis not a suitable option. CDT offers a highly configurable solution. Aiming to integrate CDT include-organizer.Hence this issue remains open.
fvgh commentedon Mar 30, 2019
The usage of IncludeOrganizer as it is provided by CDT is not an option.
All in all it seems a better idea to implement an own organizer similar to the Spotless Java Import sorter.
nedtwigg commentedon Jul 2, 2020
I try to keep the issues in-sync with our releases, but I missed this one! We have had C/C++ support since:
It seems like a missing piece is an include organizer. One option is to build one from scratch, another would be to use clang-format (#475), and follow it up with
eclipseCdt(). Regardless, even without include organizing, it's tremendously valuable to have Eclipse CDT's autoformatter included, thanks so much @fvgh! I'm going to close this as "long-ago implemented", and if you have a specific unmet need, feel free to open a new issue.nedtwigg commentedon Aug 25, 2020
As of
plugin-gradle 5.2.0we also supportclang-format. PR for maven welcome :)