Bug 388505 - [Workbench] "Show In" menu doesn't use MRU order any more
Summary: [Workbench] "Show In" menu doesn't use MRU order any more
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5 M7   Edit
Assignee: Tomasz Zarna CLA
QA Contact: Brian de Alwis CLA
URL:
Whiteboard:
Keywords: bugday, greatfix, helpwanted
Depends on:
Blocks: 467693
  Show dependency tree
 
Reported: 2012-08-31 07:04 EDT by Markus Keller CLA
Modified: 2015-05-20 07:01 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2012-08-31 07:04:23 EDT
OK in 3.8, broken in 4.2.1 RC2 and in master

"Show In" menu doesn't use MRU order any more:

- select a problem in the Problems view
- Show In > Package Explorer (using keyboard or context menu)
- go back to Problems view
- open Show In menu

=> expected: Package Explorer on top
=> was: random order as before
Comment 1 Robert Pamely CLA 2014-05-31 11:16:08 EDT
The main problem appears to be in org.eclipse.ui.internal.WorkbenchPage. The methods that do the sorting in performedShowIn and sortShowInPartIds are not implemented. Both of these methods are called at the moment.

Also org.eclipse.ui.internal.ShowInHandler.execute has a suspect TODO comment where it calls performedShowIn.

The menu context item list appears to be maintained in org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout, so this will probably need to be sorted by the sortShowInPartIds method.
Comment 2 Eclipse Genie CLA 2015-03-06 18:24:25 EST
New Gerrit change created: https://git.eclipse.org/r/43338
Comment 4 Brian de Alwis CLA 2015-04-19 14:40:27 EDT
Thanks Tomasz!

As noted on the Gerrit discussion, the behaviour differs slightly from 3.x:

> > in 3.x the list seemed to be kept on a per-perspective basis whereas Tomasz'
> > solution is on a per-window basis. I don't use Show In so I don't have a 
> > feeling as to how important this is.
> I don't use perspectives, so for me, it also doesn't matter;-) Since the order
> has been broken for years now, I don't think many will notice this change at
> all. And it's also not clear why per-perspective would be better than
> per-window, per-workbench, or per-view.

When persisting out the show-in list, we persist the list in MRU order rather than a map of part -> timestamps.
Comment 5 Brian de Alwis CLA 2015-04-28 16:39:36 EDT
Verified in I20150428-0800