DESCRIPTION

Bug 457211 - Clean up ToolBarManager

Fixed braces style, simplified deep nested if statements, removed
commented out code and unnecessary line breaks, etc.

Change-Id: I07135dfbbd0485a37f66d9821745bbdb62e1d509
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Jayvion Booth
date: 2015-01-11 22:43:13.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-01-11 23:21:58.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/4084/

-------------------------------------
author: Brenden Conley
date: 2015-01-11 23:51:55.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/4084/ : SUCCESS

-------------------------------------
author: Zaid Mosley
date: 2015-01-12 08:08:37.000000000

Patch Set 3:

(3 comments)

Line:253, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Why not combine this with the above if statement?

Line:304, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Not related to your change, but I think we should always turn of redrawn independent of the number of items. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=457214

Line:311, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Could that be an enhanced-for loop?

-------------------------------------
author: Jayvion Booth
date: 2015-01-12 08:30:24.000000000

Patch Set 3:

(3 comments)

Line:253, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> The original author saw some value in this, probably not to make if () condition too complicated.

Line:304, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> I answered there.

Line:311, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> don't think so. 
If I understand the code intention correctly, the code tries to delete from right to left, avoiding possible button re-arrangements if the buttons were in the middle of the TB, so that the buttons are deleted starting from the end of the toolbar. In best case the right most buttons do not need to be re-layouted again.

I wouldn't touch this code without a good reason.

-------------------------------------
author: Zaid Mosley
date: 2015-01-12 08:38:14.000000000

Patch Set 3:

(3 comments)

Line:253, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Done

Line:304, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Done

Line:311, bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java -> Done

-------------------------------------
author: Zaid Mosley
date: 2015-01-13 08:58:07.000000000

Patch Set 4: Patch Set 3 was rebased

-------------------------------------
