Bug 65835 - [ViewMgmt] (regression) View tabs open in random order
Summary: [ViewMgmt] (regression) View tabs open in random order
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P1 major (vote)
Target Milestone: 3.0 RC3   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-04 18:38 EDT by Nick Edgar CLA
Modified: 2004-07-06 09:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2004-06-04 18:38:57 EDT
build I20040604-0800

- new window in Java perspective
- in the left view stack, the order is: Hierarchy, Package Explorer
  - it should be: Package Explorer, Hierarchy
- in the bottom right view stack, the order is: Javadoc, Declaration, Problems
  - it should be: Problems, Javadoc, Declaration 
- see JavaPerspectiveFactory for the correct order

Note that the resulting order is not the reverse of the correct order.
It's as if what should be the first view in the folder is getting warped to the end.
Comment 1 Nick Edgar CLA 2004-06-04 18:39:11 EDT
Michael, please consider for RC2.
Comment 2 Nick Edgar CLA 2004-06-07 12:15:34 EDT
It's important for the initial layout to honour the order of views specified by
the perspective factory.
Comment 3 Michael Van Meekeren CLA 2004-06-14 13:48:46 EDT
Kim, this is likely similar to the saveState restoreState code for Editors, 
can you investigate?
Comment 4 Kim Horne CLA 2004-06-16 16:21:44 EDT
The problem here is quite different.  The problem is with our insertion logic in
DefaultPartPresentation.  We iterate through existing tabs asking if it's not
visible and if its bounds are greater than 0.  This works fine when the tab
folder is actually visible, but breaks down when opening a perspective because
the tab folder has not been sized and no tabs are visible.  As a result, we keep
pumping them into the beginning of the stack.  

And then there is the placeholder problem.  We're ignoring the position of
placeholders when views are created.  We get the folder right, but not the
position. 
Comment 5 Kim Horne CLA 2004-06-16 22:12:05 EDT
Fix in HEAD.
Comment 6 Kim Horne CLA 2004-06-17 11:52:57 EDT
Verified in HEAD.  There is one deviation from the old behaviour, however.  If
the folder being restored contains placeholders and one of them is realized, the
order may not be as expected because of our code that shuffles tabs around based
on the LRU queue.
Comment 7 Kim Horne CLA 2004-06-18 16:23:48 EDT
This does not work on Linux.  We have bounds checking logic that fails on linux
because the bound with is never 0 - it's 1.
Comment 8 Kim Horne CLA 2004-06-18 16:52:21 EDT
Edited fix in HEAD.
Comment 9 Billy Biggs CLA 2004-06-18 20:16:10 EDT
Verified on I200406181804.
Comment 10 Kim Horne CLA 2004-06-18 20:16:25 EDT
Marking as such.
Comment 11 Kim Horne CLA 2004-07-06 09:29:56 EDT
Closing to keep a tidy house.  Pardon the spam.