Bug 76528 - [ViewMgmt] Resizing view affects other side of same view
Summary: [ViewMgmt] Resizing view affects other side of same view
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2004-10-18 21:53 EDT by Nick Edgar CLA
Modified: 2009-07-30 13:39 EDT (History)
1 user (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-10-18 21:53:19 EDT
build I20041013

- layout out a perspective in a single column as follows:
view A
view B
editor area

- grab the sash at the bottom of view B and drag it down
- the top of view B moves down as well

This is unexpected.  Normally dragging a sash should only affect the adjacent
edges of the two parts on either side of the sash.

I suspect this is due to the editor area changing size.
Comment 1 Nick Edgar CLA 2004-10-18 22:04:05 EDT
More info.  It seems to depend on how the view was dropped above the editor area.

Initial state:
- Navigator and Tasks in same folder
- editor area underneath

Scenario 1:
- drag Tasks to the bottom of its folder (drag cursor pointing down)
- drag the sash between the Tasks view and the editor area
- it moves the top as well

Scenario 2 (starting from Initial state):
- drag Tasks to the top of the editor area (drag cursor pointing up)
- drag the sash between the Tasks view and the editor area
- it does not move the top as well
- drag the sash between the Tasks view and the Navigator view
- it does not move the top as well
- it keeps the Tasks view the same size, but resizes the editor area instead

Comment 2 Stefan Xenos CLA 2004-10-18 23:25:14 EDT
What is happening right now is that the underlying implementation (a KD tree) is
being revealed. The sash on one side of the view will always be a parent of the
sash on the other side. 

When dragging the parent node, its changes will affect the child node and there
will be no limit on how far you can drag the sash. When dragging the child node,
the changes will only affect adjacent parts but the sash cannot be dragged
farther once the view's minimum size is reached.

This is easy to observe if you align 4 or 5 views in a column.

I agree that this should be changed. I believe the ideal behavior would be as
follows:

- Resizing a sash only affects adjacent views until the adjacent views reach
minimum size. 
- Once an adjacent view reaches its minimum size, attempting to shrink it
further will start to push the next view over (reducing its size up to the minimum).
- If there are no more views whose size can be reduced, the sash will not be
allowed to move further in that direction.


Note: this is an old problem. It was much more severe in Eclipse 2.1, when
resizing views on one side of the editor area would affect the size of views on
the other side of the editor area.
Comment 3 Nick Edgar CLA 2004-10-20 12:09:58 EDT
+1 for the desired behaviour you describe.
Comment 4 Oleg Besedin CLA 2009-07-30 13:39:20 EDT
This seeems to be working in Eclipse 3.5.