Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 432066

Summary: [formatter]Save Actions configured in the workspace fails to use the workspace formatter profile
Product: [Eclipse Project] JDT Reporter: Flávio Etrusco <flavio.etrusco>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: gautier.desaintmartinlacaze, manoj.palat, marie.griffiths
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 8   
Whiteboard: stalebug

Description Flávio Etrusco CLA 2014-04-04 22:18:28 EDT
Steps to reproduce:
1) Open the workspace preferences;
2) Select a Formatter Profile (or create a new one with a distinct difference, like placing o Braces on a New Line);
3) Enable Save Actions and enabled Format all lines;
4) Open a project and disable project specific formatter settings;
5) Open, modify and save a source file.

Result:
Source is formatted with Java Conventions profile.

Expected:
Source would be formatted with the profile configured in the workspace.

6) Enable project specific formatter settings, save the file again, the source is correctly formatted.
Comment 1 Mother Clanger CLA 2017-03-23 06:45:58 EDT
Also the formatter adds extra spaces on the save action as opposed to crtl+shift+F in the editor
e.g
std::make_shared <MyClass> (myvariable)
Gets changed to 
std::make_shared < MyClass > (myvariable)
Comment 2 Mateusz Matela CLA 2017-04-11 17:22:00 EDT
(In reply to Mother Clanger from comment #1)
> Also the formatter adds extra spaces on the save action as opposed to
> crtl+shift+F in the editor

What makes you append your problem to this bug? Is it specifically about adding extra spaces, or generally using invalid formatter profile?
And I don't recognize the syntax in your sample code - is it even Java? Or did you mean to report this to the CDT product?
Comment 3 Eclipse Genie CLA 2020-02-10 13:12:42 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.