DESCRIPTION

Bug 420956 - Fix perspective customization on 4.x

This is hopefully the last patch in the series of patches towards usable
perspective customization on 4.x.

The CustomizePerspectiveDialog shows now all toolbar/menubar
contributions from action sets (with right labels) previously shown in
3.x stream, allows properly disable/enable their status per perspective
and persist the state in the model. Additionally the label provider is
enhanced to show the availability of almost all contribution depending
on the action set state.

Change-Id: I6f002c518e671437775187ffcc6c51050aa8e0ae
Signed-off-by: Jayvion Booth xxx@xxx.xxx
Also-by: Heath Gonzalez xxx@xxx.xxx
Also-by: Slade Moran xxx@xxx.xxx
Also-by: Jaydon Logan xxx@xxx.xxx
Conflicts:
	bundles/org.eclipse.ui.workLeon Ochoach/Eclipse
UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java


COMMENTS

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

Uploaded patch set 9.

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

Patch Set 9:

I manually solved the merge conflict.

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

Patch Set 9:

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

-------------------------------------
author: Brenden Conley
date: 2015-01-07 14:29:42.000000000

Patch Set 9: Verified+1

Build Successful 

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

-------------------------------------
author: Slade Moran
date: 2015-01-08 19:19:44.000000000

Patch Set 9: Code-Review-1

(3 comments)

I liked almost all of this patch, it's a good direction.  But the CommandContributionItems need to be changed into model elements only so they can be rendered by the menu or tool renderer.

Line:164, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizeActionBars.java -> Please make sure the new context that was created is destroyed.

Line:622, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> This breaks our model, as we need the renderer to create a HandledContributionItem.

Line:1652, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java -> This is a pretty heavy weight operation.

-------------------------------------
author: Jayvion Booth
date: 2015-01-08 19:38:27.000000000

Patch Set 9:

(3 comments)

Line:164, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizeActionBars.java -> Will do.

Line:622, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> > the CommandContributionItems need to be changed into model elements only so they can be rendered by the menu or tool renderer.

Can you elaborate it a little bit more? I'm not really familiar with e4 or Eclipse 4.x model - I'm just trying to learn it by debugging. 

Is there a factory for them? I only found ToolBarManagerRenderer.processHandledItem which converts MHandledToolItem to HandledContributionItem.  MHandledToolItem are casted from MToolBarElement which are in fact MUIElement and coming ? magically ? from MToolBar.

Line:1652, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java -> What do you mean by that? Performance? I didn't noticed anything special - on 3 years old workstation. Or is this API is not recommended to be used in general?

-------------------------------------
author: Jayvion Booth
date: 2015-01-10 09:51:45.000000000

Patch Set 9:

(2 comments)

Please check the next patch set which should address your comments.

Line:164, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizeActionBars.java -> Done

Line:622, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java -> Paul, I think/hope I've now got it - see the next patch.

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