Bug 26669 - [Editor Mgmt] Add action for maximize/restore current window functionality
Summary: [Editor Mgmt] Add action for maximize/restore current window functionality
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P4 enhancement with 7 votes (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 24251 37250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-19 10:45 EST by Colin Sampaleanu CLA
Modified: 2003-09-22 20:42 EDT (History)
8 users (show)

See Also:


Attachments
patch file for org.eclipse.ui project (1.84 KB, patch)
2003-02-26 13:33 EST, John Arthorne CLA
no flags Details | Diff
patch file for project org.eclipse.ui.workbench (17.52 KB, patch)
2003-02-26 13:33 EST, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Sampaleanu CLA 2002-11-19 10:45:24 EST
I was very much looking forward to the new custom key binding support in M3 so I
could bind a key to the 'current window' maximize/restore functionality. However
there appears to be no defualt key binding for such a maximize/restore function,
and no way to bind any key to that action.

I currently find it very annoying that I have to double click on the title bar
of the editor window (or right click on the title bar and pick from the menu),
instead of having a key binding that I can use for this, as available in most
other IDEs.
Comment 1 John Arthorne CLA 2002-11-26 14:47:47 EST
I'd find this very useful too (see bug 1978).  The current shortcut is awkward
because it requires three key presses, and maximize (Alt-,x) currently requires
a different combination from restore(Alt-,r)).  Ideally this would be a single
toggle action that could be bound to a single shortcut.
Comment 2 John Arthorne CLA 2003-01-17 11:26:34 EST
I'm also quite excited about the possibility of binding this action to a mouse
gesture.  Gesture up for maximize, gesture down for restore would be very
intuitive.  This is part of my ongoing quest to eliminate double-click from my
UI manipulation vocabulary
Comment 3 Colin Sampaleanu CLA 2003-02-04 09:50:55 EST
Is there any chance at all this can make it into 2.1? This seems like a fairly
small change (in terms of code), but would make using Eclipse day significantly
more efficient for a number of people. Being able to switch back and forth
quickly between a large editor view and a normal view is especially important
for people with weak eyesight (like myself) since they generally need to use
larger fonts, so can't display as much onscreen.

Comment 4 Chris McLaren CLA 2003-02-11 13:44:13 EST
this is the responsibility of the workbench to add these actions. once that is 
done, you will automatically be able to customize the key bindings.
Comment 5 Nick Edgar CLA 2003-02-19 11:13:11 EST
There are no plans for the UI team to work on this defect until higher 
priority items are addressed.  If you would like to work on this defect, 
please let us know on the platform-ui-dev mailing list.

Comment 6 John Arthorne CLA 2003-02-26 13:32:49 EST
As a way of testing, I added this functionality to the UI.  I will attach the
patch files (patch computed against RC1).  I don't care if this gets into 2.1,
but I thought I'd attach the patch so it doesn't get lost.

Summary of changes:

org.eclipse.ui:
 - added command and acceleratorSet to plugin.xml
 - added translation of command name and desc to plugin.properties

org.eclipse.ui.workbench:
 - new action, MaximizePartAction
 - hooked action to "Keyboard Shortcuts" menu in WorkbenchActionBuilder
 - added translations to messages.properties


Comment 7 John Arthorne CLA 2003-02-26 13:33:16 EST
Created attachment 3726 [details]
patch file for org.eclipse.ui project
Comment 8 John Arthorne CLA 2003-02-26 13:33:46 EST
Created attachment 3727 [details]
patch file for project org.eclipse.ui.workbench
Comment 9 Stephen Colebourne CLA 2003-04-18 14:24:12 EDT
I would like to strongly support the addition of mouse gestures to the Eclipse 
editor. In addition to maximise and minimize, I would want to see Close, Back 
and Forward added. The Opera web browser should be seen as the model to follow 
here. (Close would be the most useful, as its still a pain in Eclipse...)
Comment 10 Colin Sampaleanu CLA 2003-04-21 09:03:34 EDT
Thanks to John Arthorne, there appears to be a patch attached to this feature
request which implements this functionality in a reasonable fashion. Now that
2.1 is out, is there any chance this patch can be applied relatively soon before
the codebase starts drifting too far?

The previous comment prior to his attaching the patch was that there were higher
priority items for the UI team to work on but if somebody else wanted to work on
it that would be welcome, so hopefully there is nothing standing in the way of
getting this in now.
Comment 11 JeevanS CLA 2003-05-10 00:43:12 EDT
Hi,

I had submitted feature request id=37250 for the same.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37250
As I was not aware of this bug report.

I want exactly the same thing -- A key binding to maximize/restore the current 
window.

I saw the patches attached to this bug.
PLEASE how can one use these patches ?
I use 
Eclipse Platform
Version: 2.1.0
Build id: 200303071024

rgds
g1
Comment 12 John Arthorne CLA 2003-05-13 10:58:45 EDT
Jeevan, you can always add your vote to the bug to help increase its visibility.
Comment 13 Simon Arsenault CLA 2003-06-11 13:52:26 EDT
*** Bug 24251 has been marked as a duplicate of this bug. ***
Comment 14 Simon Arsenault CLA 2003-06-12 13:50:50 EDT
*** Bug 37250 has been marked as a duplicate of this bug. ***
Comment 15 Simon Arsenault CLA 2003-06-12 16:01:52 EDT
Patch was applied today and will be part of the next integration build. Some 
changes were required because of code changes since 2.1 M1 build. Also, some 
changes to MaximizePartAction was done since it was not quite right.

The shortcut key is Ctrl+M, however, I see that JDT is using this one too for 
Smart Typing...not sure what shortcut JDT uses for "Dumb Typing" ;-)  Anyway, 
this will need to be resolved.

It would be nice if the menu item changed from Maximize to Restore depending if 
the active part is maximized or not. Unfortunately, there is no notification 
when this state changes currently in the perspective.
Comment 16 Tom Hofmann CLA 2003-06-13 01:31:40 EDT
Ctrl+M is no longer used for smart typing by JDT UI, since mode toggling is 
done using the Insert key now. -> all good.
Comment 17 Nick Edgar CLA 2003-06-16 10:55:36 EDT
I think Ctrl+M is too strong an accelerator to use for Maximize.
Other editors, e.g. the HTML editor in WSAD may use this.
Some other possibilities:
- F12
- Ctrl+Shift+M
- leave it unbound, and let the user specify the key binding (safest, but not 
great for out-of-box experience)

Erich, any preference from the JDT team?

Comment 18 Nick Edgar CLA 2003-06-16 10:59:01 EDT
Meant Ctrl+F12 instead of F12.
Comment 19 John Arthorne CLA 2003-06-16 11:32:23 EDT
I just chose Ctrl+M to be consistent with VA/Java (and because it's intuitive).
 Since the bindings can be customized, I have no strong preference. 
Ctrl+Shift+M seems better than Ctrl+F12 since it's more easily reachable by a
touch-typist without straying far from the home row.
Comment 20 Simon Arsenault CLA 2003-06-16 12:01:06 EDT
I checked with the wsadie team (based on 2.1.1), and looking at the shortcut 
customize preference page, no one is using ctrl+m  Of course, there could be an 
editor that is using ctrl+m but not using the key binding service yet.

I'm ok with not using ctrl+m is some other editor needs it...but I definitely 
would want some shortcut key assign to it out-of-the-box.
Comment 21 Colin Sampaleanu CLA 2003-06-16 15:32:31 EDT
I think anybody that actually needs this command is going to use it a lot,
probably more often than the majority of keystroke shortcuts. If you need it,
you need it because you want more screen real-estate, but on the other hand, you
also have to switch back to normal mode to do some activities. I know when I was
using the similar feature in JBuilder (curtain?), I would use it all the time.

I know that if you put it on some hard to reach keys, I would map it to
something like Ctrl-M anyways.

So I think it (the question about what key to put it on) depends on how many
people you actually think would use and benefit from the feature :-)
Comment 22 Craig Larman CLA 2003-06-16 15:44:37 EDT
when i first created this request (or another one that was merged into this 
one), i suggested F12 (if i recall) as the default gesture, because its fast 
and i have a vague memory it was F12 in some other IDE i used to use years ago. 
gesture ease/speed are key to make this a productivity enhancement. Ctrl-M is a 
fine, fast alternative. - craig
Comment 23 Colin Sampaleanu CLA 2003-06-16 15:56:15 EDT
I still prefer Ctrl-M or Craig's suggestion of F12, but if something that is
three keys is desired, how about Ctrl-Alt-Z? I seem to remember JBuilder uses
this for the same action, and it is actually easy to type with one hand without
looking, since the keys are very close together.

Comment 24 Tom Hofmann CLA 2003-06-17 03:45:03 EDT
+1 for a short shortcut (short <= 2 keys).
Comment 25 John Arthorne CLA 2003-06-23 13:51:07 EDT
Tom, you mentioned smart typing is no longer using Ctrl+M, but it is still in
use in the latest integration build (I20030618).  Do you know if this will be
removed soon?  As it is, it conflicts with the new maximize/restore action which
is currently using Ctrl+M.
Comment 26 Tom Hofmann CLA 2003-06-24 03:42:09 EDT
Oops, that's a leftover... will be removed tonight.
Comment 27 Kai-Uwe Maetzel CLA 2003-06-26 11:31:56 EDT
Removed and released to HEAD.
Comment 28 Nikolay Metchev CLA 2003-07-28 05:21:09 EDT
shouldn't this bug be resolved fixed? I suggest people vote for other bugs!
Comment 29 Nick Edgar CLA 2003-09-09 14:32:33 EDT
Ctrl+M is fine for now.  This PR can be closed.
Comment 30 Simon Arsenault CLA 2003-09-22 16:03:37 EDT
Closing as per Nick's comments
Comment 31 Johan Compagner CLA 2003-09-22 18:09:41 EDT
is Ctrl-Enter now also removed as a shortcut for this behaviour?
Very annoying that it does this.. (and it is not listed as the keybinding for 
that in the keys preference section)
Comment 32 Nick Edgar CLA 2003-09-22 20:42:28 EDT
No, that is a different problem.  See bug 42225.