Bug 53649 - [Workbench] Minimized views should yield real estate
Summary: [Workbench] Minimized views should yield real estate
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Stefan Xenos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 56541 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-03 13:22 EST by Cherie Wong CLA
Modified: 2004-10-04 08:02 EDT (History)
3 users (show)

See Also:


Attachments
The beginnings of a fix (15.88 KB, patch)
2004-07-12 22:38 EDT, Stefan Xenos CLA
no flags Details | Diff
Working patch (24.88 KB, patch)
2004-07-13 20:58 EDT, Stefan Xenos CLA
no flags Details | Diff
Latest patch (42.35 KB, patch)
2004-07-14 21:14 EDT, Stefan Xenos CLA
no flags Details | Diff
some minimal changes to JFace (4.80 KB, patch)
2004-07-14 21:15 EDT, Stefan Xenos CLA
no flags Details | Diff
Work in progress (47.22 KB, patch)
2004-07-15 01:53 EDT, Stefan Xenos CLA
no flags Details | Diff
Nearly there. :-) (54.21 KB, patch)
2004-07-20 02:48 EDT, Stefan Xenos CLA
no flags Details | Diff
Minimized Outline view in 3.1 M2 (45.88 KB, image/jpeg)
2004-10-04 08:02 EDT, Alexander Burdukov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cherie Wong CLA 2004-03-03 13:22:50 EST
Consider opening Java perspective with:
1. package explorer on the left (as usual)
2. an editor and the problems view stacked on top of each other on the right 
(as usual)

If you 'minimize' the problems view, the editor gets the real estate 
previously occupied by it.

If you 'minimize' the package explorer, it collapses into its title bar but 
the editor or problems view does not get anything out of it.  All you see is a 
gray panel on the left.  It's only beneficial to minimize views if there is 
another view below it.

It would be good if views always yield its previously occupied space to the 
rest of the workbench on minimize.  It could give priority to open views 
vertically above/below it so that current behaviour is not lost :)
Comment 1 Stefan Xenos CLA 2004-07-12 22:38:00 EDT
Created attachment 13190 [details]
The beginnings of a fix

This (buggy!!) patch adds some preliminary support for this enhancement. I'm
attaching it here in its current state in case I don't have a chance to get
back to this right away.

Known bugs:
- The minimized sizes aren't being computed correctly.
- The layout runtime is way too slow.

However, the general behavior is in place: if two panes are separated by a
horizontal sash, minimizing one pane will reduce it to its minimum height.
Otherwise, minimizing the pane will reduce it to its minimum width.
Comment 2 Stefan Xenos CLA 2004-07-12 22:39:05 EDT
*** Bug 56541 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Xenos CLA 2004-07-13 20:58:00 EDT
Created attachment 13231 [details]
Working patch

This patch now behaves correctly. However, it still needs to be optimized
before it can go into head.
Comment 4 Stefan Xenos CLA 2004-07-14 21:14:10 EDT
Created attachment 13280 [details]
Latest patch

This patch adds the following:
- Some optimization to the layout code (caching is still needed)
- Adds support for wrapping presentations
- Fixes some problems with presentations containing complex minimum size
constraints (when a sash or drag/drop operation in the editor area causes a
minimum size to change, the change was not always propogated into the
perspective)
- Adds an experimental feature to the default presentation: When a stack is
minimized horizontally, it turns itself into a vertical toolbar in order to
save space. I'm posting this here to get some feedback, but it is not necessary
to include this when the patch goes in.

I still want to provide more explicit API for a presentation to determine if
it's been minimized horizontally or vertically. I will attach some required
JFace changes in the next patch.
Comment 5 Stefan Xenos CLA 2004-07-14 21:15:32 EDT
Created attachment 13281 [details]
some minimal changes to JFace
Comment 6 Stefan Xenos CLA 2004-07-15 01:53:14 EDT
Created attachment 13283 [details]
Work in progress

This patch also contains the beginning of a fix for 51580 by allowing
constraints on both the minimum and maximum size of each pane.
Comment 7 Stefan Xenos CLA 2004-07-20 02:48:15 EDT
Created attachment 13438 [details]
Nearly there. :-)

I believe the layout algorithm is finished. 

- Caching is in place
- The constraint system seems to work (I've tried creating panes with constant
area, constant perimeters, fixed sizes, and quantized widths and heights).
- Most of the new API for the presentation layer is in place.

Still needed:
- JavaDoc needed
- The presentation layer needs API to indicate whether it actually uses
preferred size or maximum size constraints.
- WorkbenchPart needs API to take advantage of the new layout algorithm

This bug is fixed. The remaining work is needed to fix bug 51580.
Comment 8 Stefan Xenos CLA 2004-07-20 18:07:08 EDT
Fixed in head
Comment 9 Alexander Burdukov CLA 2004-10-04 08:02:21 EDT
Created attachment 14975 [details]
Minimized Outline view in 3.1 M2

I'm not sure that the fix was included into 3.1 M2 build, but problem still
exists. Although, the minimize behavior is changed and minimized view allocated
on smaller area, there is still empty area after minimize. See pic attached.