| Summary: | Code Style formatted contribution in a product | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Rudolf Hornig <rudolf.hornig> |
| Component: | cdt-editor | Assignee: | Project Inbox <cdt-editor-inbox> |
| Status: | ASSIGNED --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | cdtdoug, hef-cdt, jamesblackburn+eclipse, yevshif |
| Version: | 8.0 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Rudolf Hornig
> is not working as expected ...
That's generally how customisation ini files work. Patches are always appreciated.
It's actually worse than this, you must also set the cdt.core formatter properties individually to match your default profile: org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80 org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_compact_if=0 org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16 org.eclipse.cdt.core/org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48 etc. If I remember correctly these settings are only updated when the user changes profile, and aren't correctly initialised to the settings defined by the formatter profile. (In reply to comment #2) > It's actually worse than this, you must also set the cdt.core formatter > properties individually to match your default profile: [...] > If I remember correctly these settings are only updated when the user changes > profile, and aren't correctly initialised to the settings defined by the > formatter profile. I have been trying to add a new coding style and can verify that this is true. The coding style I set via: org.eclipse.cdt.ui/org.eclipse.cdt.ui.formatterprofiles=[xml for myprofile] org.eclipse.cdt.ui/formatter_profile=myprofile is set as default in the Code Style preference dialog, but the settings don't take effect unless I select another coding style, and then revert back to the myprofile. So it appears that the only way to get it work is to also set the cdt.core formatter properties? Should this be a new bug? |