DESCRIPTION

Bug 404348, 421178 - remember disabled action sets

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


COMMENTS

author: Zaid Mosley
date: 2015-01-07 12:55:05.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2015-01-07 13:34:11.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2015-01-07 14:02:01.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Zaid Mosley
date: 2015-01-07 17:29:24.000000000

Patch Set 8: Code-Review-1

See detailed comments

-------------------------------------
author: Slade Moran
date: 2015-01-08 18:45:54.000000000

Patch Set 8:

(1 comment)

I'm not sure why you're moving the information about disabled actionSets from the actionSets into the page hidden.  Is it just the regular mechanism is disconnected?  For any given window, the perspective worked with the ActionSetManager to turn on or off actionSets (it seems to do it via the IContextService).  It doesn't matter what the defaults were when the perspective was created, only that the perspective remember what actionSets are active at the moment.

Line:54, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> The hidden items was designed as a way to make an IContributionItem that would in theory be visible not seen when used in conjunction with the jface overrides mechanism, like org.eclipse.ui.internal.WorkbenchWindow.menuOverride.  Why overrides the actionSet visibility (it used to just turn them on and off)?

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

Patch Set 8:

> I'm not sure why you're moving the information about disabled actionSets from the actionSets into the page hidden.  
It is not moving but adding the persistence layer.

> Is it just the regular mechanism is disconnected? 
I didn't get it, sorry.

> For any given window, the perspective worked with the ActionSetManager to turn on or off actionSets (it seems to do it via the IContextService). It doesn't matter what the defaults were when the perspective was created, only that the perspective remember what actionSets are active at the moment.

This is still true, but ActionSetManager (and also no one else) never persisted the "disabled" action sets as user choice. So you could request to show/hide them (depending on the application needs), but once user decides to get rid of some action set, this decision must "override" application choice. The best example is the debug action sett with the global debug buttons. In the old implementation you could try to "hide" them - but on next restart they will come back again, or, even worse, as soon as you hit a breakpoint - and this mean they will be back in a minute. See the nice comment about it in the LaunchView (written *before* the big e4 changes), line 1442:

			// When the launch view becomes visible, turn on the
			// debug action set. Note that the workLeon Ochoach will handle the
			// case where the user really doesn't want the action set
			// enabled - showActionSet(String) will do nothing for an
			// action set that's been manually disabled.

-------------------------------------
author: Jayvion Booth
date: 2015-01-08 19:20:23.000000000

Patch Set 8:

(1 comment)

Line:54, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> As answered before, if user decides *not* to see any contributions from Anyedit "bla" action set, this choice should be respected and no one else should change this (also not the AnyEdit plugin author trying to activate "bla" at each possible and impossible time).

Therefore I made the actions set "disabling" or "hiding" handled consistently to the menus/toolbars, using same persistence mechanism.

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