DESCRIPTION

Bug 471782 - [ViewMgmt] History View always blank

Fixed various view management regressions regressions caused by changes
in bug 430988. Added tests for the expected behavior.

To open legacy views, use IWorkLeon OchoachPage.showView(viewId); to open e4
views init the shared placeholder first (basically same as the Ctrl+3
does, see org.eclipse.ui.internal.quickaccess.ViewElement). 

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


COMMENTS

author: Brenden Conley
date: 2015-11-11 19:18:19.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2015-11-11 19:34:47.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Kelly Potter
date: 2015-11-11 19:40:25.000000000

Patch Set 5:

(3 comments)

Line:81, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> Why would we want to use "MPartDescriptor" as the unique identifier for a view to be opened? Part descriptors are heavy-weight objects which are slow to construct and drag along a lot of metadata that is unnecessary for identification of the part.

A string ID seems more lightweight and contains no more information than is needed to identify the part. They would therefore seem preferable to use as the thing to identify the part being opened.

Line:120, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> This seems like the sort of thing that should be an API somewhere... or at least an internal utility class. There should really be one standard way to open a part in the workbench and it should always do the right thing.

This method seems to be a duplicate of the one in ViewElement, and both should share an implementation.

Line:143, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> Seems like this should also be a helper utility (on MApplication?). Putting this on the source of the data could potentially let us do better than an exhaustive search in the future.

-------------------------------------
author: Jayvion Booth
date: 2015-11-12 19:03:35.000000000

Patch Set 6: Patch Set 5 was rebased

-------------------------------------
author: Jayvion Booth
date: 2015-11-12 19:50:51.000000000

Patch Set 5:

(3 comments)

Stefan, thanks for comments. See answers inlined. I would now push the change because it fixes really nasty problem with view management, and I don't wont keep this bug open any longer.

Line:81, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> Agree. The original commit introduced this and this seem to be *the* way to specify e4 only parts.

Line:120, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> They are similar, sure. I've first tried to understand why it is needed at al (the code path for "compatibility view" should just work also for e4 views except I miss something trivial), but I given up. Without tests I do not see how to verify this and I've failed to write e4 fragment test contributing a view to the IDE.

I would now push the change because it fixes really nasty problem with view management, but I would like to know if any on the CC has a good idea why this code in the else branch must be for e4 based parts at all, and why we couldn't just get rid of it.

Line:143, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java -> Where would be the best place for it, what do you think?

-------------------------------------
author: Gerrit Code Review
date: 2015-11-12 19:51:20.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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