Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 549255 - [formatter] Extend Blank Lines settings to remove excess lines - UI
Summary: [formatter] Extend Blank Lines settings to remove excess lines - UI
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.13 M3   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 549249
Blocks:
  Show dependency tree
 
Reported: 2019-07-14 15:50 EDT by Mateusz Matela CLA
Modified: 2019-08-20 19:01 EDT (History)
1 user (show)

See Also:
noopur_gupta: review+


Attachments
UI preview (16.19 KB, image/png)
2019-07-14 15:50 EDT, Mateusz Matela CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Matela CLA 2019-07-14 15:50:30 EDT
Created attachment 279268 [details]
UI preview

The UI part for bug 549249.

Added a button next to each blank line spinner, disabled if the blank lines value is greater or equal to the "Number of empty lines to preserve" value.
Comment 1 Eclipse Genie CLA 2019-07-14 16:30:14 EDT
New Gerrit change created: https://git.eclipse.org/r/146059
Comment 2 Eclipse Genie CLA 2019-07-14 16:39:28 EDT
New Gerrit change created: https://git.eclipse.org/r/146060
Comment 3 Mateusz Matela CLA 2019-07-14 16:44:54 EDT
Noopur, can you check if everything looks good?
Comment 4 Noopur Gupta CLA 2019-07-23 02:54:44 EDT
I'll take a look this week.
Comment 5 Noopur Gupta CLA 2019-07-29 05:18:55 EDT
The new button looks fine. Just a few questions: Is pressing the button equivalent to setting the spinner value to 0? If so, do we still need a new button? If so, should the button be disabled when the spinner value is 0?
Comment 6 Mateusz Matela CLA 2019-07-29 06:15:00 EDT
(In reply to Noopur Gupta from comment #5)

Up until now, setting the spinner button to 0 meant "don't add blank lines here, but if there already are some, leave them in" (up to the Number of empty lines to preserve setting). Now pressing the button changes this behavior to always remove blank lines (so the Number of empty lines to preserve is ignored). That's why the button is only disabled when it's not possible to have more blank lines anyway, that is when the Number of empty lines to preserve is not greater than the spinner value.
Comment 7 Noopur Gupta CLA 2019-07-29 07:21:17 EDT
OK, got it. Looks fine.
Comment 9 Mateusz Matela CLA 2019-07-29 17:09:41 EDT
Thanks.

Can you merge the platform.images gerrit? I don't have rights.

I'd like to wait with the N&N note. I want to make more changes related to blank lines in this release and they'll probably all fit into one N&N item.