Community
Participate
Working Groups
Build Identifier: 7.0.1 Adding new built-in profiles using athe plugin_customization.ini is not working as expected: the org.eclipse.cdt.ui/org.eclipse.cdt.ui.formatterprofiles should contain now the FULL profile on a single line. Instead of this, it would be better to specify the URL to the file i.e something like: org.eclipse.cdt.ui/org.eclipse.cdt.ui.formatterprofiles=product:contributed_profiles.xml At the moment the whole XML file must be pasted into the INI file. Reproducible: Always
> 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?