DESCRIPTION

Bug 420956 - Explicitly dispose CommandContributionItem after disconnecting it from manager

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


COMMENTS

author: Brenden Conley
date: 2015-02-08 19:07:04.000000000

Patch Set 6:

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

-------------------------------------
author: Skylar Chambers
date: 2015-02-09 08:19:22.000000000

Patch Set 6: Code-Review+1

(2 comments)

Looks good. See comments in-lined.

Line:647, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> This is not required as the id will be set in HandledContributionItem#setModel anyway, though setting it explicitly doesn't seem to cause any issue.

Line:656, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> Disposing the item looks good as it is already removed from the containing manager.

-------------------------------------
author: Jayvion Booth
date: 2015-02-09 08:26:56.000000000

Patch Set 6:

(1 comment)

Line:647, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> The idea to set the id upfront was: we don't know what contribution managers are doing with items - if we insert an item without id and the manager wants to check it for whatever reason? At least while debugging this id helps to see *what* is being added.
And you've right, *currently* no one checks the id so there are no side effects with this code.

-------------------------------------
author: Skylar Chambers
date: 2015-02-09 08:38:27.000000000

Patch Set 6:

(1 comment)

Line:647, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> Correct, we can set the id upfront.

-------------------------------------
author: Jayvion Booth
date: 2015-02-12 05:58:24.000000000

Patch Set 7: Patch Set 6 was rebased

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