DESCRIPTION

Bug 445538 - [Perspectives] Pin Editor command broken and can no longer
be added to perspective's toolbar

Because CommandContributionItem's are now replaced with
HandledContributionItem's in CoolBarToTrimManager we can't update the
state of originally contributed items anymore.

Moved the "pin editor" show/hide and refresh logic from the anonymous
subclass of the ContributionItemFactory.CommandContributionItem into the
WorkLeon OchoachActionBuilder.

Updated CPD tooltips and popup text which warn user that selected item
visibility can't be changed via CPD if the item represents an initially
disabled CommandContributionItem (default is enabled).

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


COMMENTS

author: Jayvion Booth
date: 2015-02-23 19:38:33.000000000

Uploaded patch set 11.

-------------------------------------
author: Brenden Conley
date: 2015-02-23 19:38:40.000000000

Patch Set 11:

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

-------------------------------------
author: Brenden Conley
date: 2015-02-23 20:00:17.000000000

Patch Set 11: Verified+1

Build Successful 

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

-------------------------------------
author: Skylar Chambers
date: 2015-02-24 08:51:53.000000000

Patch Set 11:

Thanks for the updated patch, Andrey. 

One last issue found: Open new workspace. Open editor C1. Go to CPD and try to enable Pin Editor. Click OK on the Make Item Visible dialog. Click OK on CPD. Enable "Close editors..." in Preferences. The Pin Editor tool button comes up on the toolbar but is disabled, though focus is on the editor.

Rest all looks good.

-------------------------------------
author: Jayvion Booth
date: 2015-02-24 17:46:40.000000000

Patch Set 11:

> One last issue found: Open new workspace. Open editor C1. Go to CPD and try to enable Pin Editor. Click OK on the Make Item Visible dialog. Click OK on CPD. Enable "Close editors..." in Preferences. The Pin Editor tool button comes up on the toolbar but is disabled, though focus is on the editor.

Noopur,
I can't reproduce, but I'm on Linux and you have most likely Windows. So it *can* be platform dependent.

From the code point of view CPD checkbox changes on "not available" elements can't be done (the item isn't updated) and so nothing is persisted after OK in Make Item Visible dialog and later in CPD.

So the only issue I might imagine is that because button enablement is evaluated before the dialog is closed and on windows some contexts might be updated in the different order as on Linux, so that pin enablement is evaluated to "false", but right now I have no clue why. PinEditorHandler has no extra enablement rules I know about.

Can you reproduce it without opening CPD?
Can you reproduce it after opening CPD but *not* clicking anywhere and simply pressing OK?

I have an idea what has to be done (simply postpone the button show/refresh *after* the dialog closes), but I'm still debugging.

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