Bug 2587 - DCR: When zooming in on an editor, zoom in on the whole workbook (1GKBCK5)
Summary: DCR: When zooming in on an editor, zoom in on the whole workbook (1GKBCK5)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2001-10-10 22:39 EDT by Veronika Irvine CLA
Modified: 2002-01-18 15:29 EST (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 Veronika Irvine CLA 2001-10-10 22:39:21 EDT
If I have a bunch of editors open and I double click on the tab of one editor, that editor becomes maximized but only that editor.  It
appears as a single tab in a tab folder.

It would be better if ALL the editors in that editor workbook were maximized for the following reasons:

1) If I want to browse the code in several classes in the maximized mode I have to double click to maximize file A, double click to minimize
file A, and then double click to maximize file B.  That is a lot of clicking.

2) The current code actually does a lot of work.  It deletes all the tabs except the active tab when you maximize the file, it remembers the order of the 
tabs that were deleted and then when you minimize the editor, it has to recreate the tabs in the right order.  If you implement this DCR you
will actually delete code to get more functionality and it will be faster and less flashy.

3) There is no saving in real-estate with the current implementation.  The space to show all the tabs is the same space as to show the one tab.

NOTES:
	CM (9/20/2001 3:59:58 PM)
		Concur whole-heartedly.
Comment 1 DJ Houghton CLA 2001-10-29 19:02:37 EST
PRODUCT VERSION:
1.0 135

Comment 2 Carolyn MacLeod CLA 2002-01-11 13:20:53 EST
I always zoom the editor I am curently working on, but since I typically have 
between 4 and 8 editors open that are all current, I always have to un-zoom, 
select another editor, zoom again... to go back and forth. It would be a really 
noticable usability improvement to have all of my currently open editor tabs 
visible in zoom mode. Apparently this is "low-hanging fruit", i.e. it would be 
easy to implement, and according to Veronika you would even be able to delete 
code (bonus!). Please consider this as important for 2.0.
Comment 3 Nick Edgar CLA 2002-01-11 14:53:29 EST
Please investigate and fix if low risk.
Comment 4 Carolyn MacLeod CLA 2002-01-18 15:02:31 EST
Here is how to do the fix.
Veronika hacked it and is using it because she couldn't stand it anymore, 
particularly when using her laptop where screen real estate is at a premium.
I am using it now, too, and it is SO NICE. What a relief!

It is a very simple fix - you only have to delete a bit of code in 2 methods.
Please please do this, because it is "low-hanging fruit", i.e. very easy to do 
and a *huge* win.

1) Go to class: org.eclipse.ui.internal.EditorWorkbook
2) In method zoomIn() comment out the following lines of code:
	// Remove each tab but the active.
	if (tabFolder != null) {
		// Get active editor.
		CTabItem activeTab = tabFolder.getSelection();
		if (activeTab == null)
			return;

		// Hide all inactive tabs.
		Object [] tabArray = mapTabToEditor.keySet().toArray();
		for (int nX = 0; nX < tabArray.length; nX ++) {
			CTabItem tab = (CTabItem)tabArray[nX];
			if (tab != activeTab)
				removeTab(tab);
		}
	}
3) In method zoomOut() comment out the following lines of code:
	// Create a tab for each inactive editor.
	if (tabFolder != null) {
		int count = 0;
		Iterator enum = editors.iterator();
		while (enum.hasNext()) {
			EditorPane part = (EditorPane) enum.next();
			if (part != visibleEditor)
				createTab(part, count);
			++ count;
		}
	}
That's all! Try it for a while, and then go delete the commented out code. You 
will like it - it is much nicer for zooming. This fix has many advantages. It 
reduces the number of lines of code (always a good thing), and it is faster 
(not visually, I suppose, but obviously it does save a millisecond or so), and 
it deletes an ill-concieved "feature" that never should have been there in the 
first place. It reduces the number of steps to perform a very common operation 
from 3 down to 1. It eliminates the need for the user to context switch from 
big to small to big again. It removes a large level of frustration when using 
the product.
It would be *really cool* if we could have this in the next integration 
build.  :)
Comment 5 Nick Edgar CLA 2002-01-18 15:19:26 EST
Thanks for the (un)patch.
We should try it.  I've bumped up the priority.
Comment 6 Simon Arsenault CLA 2002-01-18 15:29:06 EST
Changed zoom of editor to be entire workbook. Closing an editor within the zoom 
workbook leaves the workbook zoom unless there are no more editors. This will 
be in build > 2002-01-18.

Note, when opening a new editor, the workbook is unzoom. It is probably 
possible to avoid this, but because the logic is complex, I did not want to 
introduce it now unless there is a demand for it (the complexity comes from 
editor reuse which span over all workbooks).

PS I did this work before noticing the "patch" from Carolyn. Actually, the fix 
was a bit more work than that to keep the workbench consistent!