Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 91449 - [DnD] [Perspectives] Dragging a perspective button should not be overloaded to open a new window
Summary: [DnD] [Perspectives] Dragging a perspective button should not be overloaded t...
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 15:39 EDT by Nick Edgar CLA
Modified: 2008-02-05 15:43 EST (History)
3 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 2005-04-14 15:39:57 EDT
3.1M6

- when dragging a perspective button in the perspective bar to rearrange its
order, I moved it slightly out of bounds of the perspective bar
- the result was not a rearrangement of the perspectives, but a new window
- this was unexpected
- also, it's not really detaching the perspective, but rather opening a new
window with a fresh perspective of the same kind

This is equivalent to doing Window > New Window.

The DnD support seems to be causing more confusion than benefit.
I suggest we back out of it for 3.1.
Comment 1 Michael Van Meekeren CLA 2005-04-14 16:02:40 EDT
I wrote this so I'll take ownership, we could enhance to actually close the
existing perspective and reopen in the other window with the new save/restore
state support.
Comment 2 Stefan Xenos CLA 2005-04-14 23:14:49 EDT
That's not bad, but it would be slow and lose any state stored in the widgets.

We could also try reparenting the widgets to a new workbench window... but that
would also require reparenting all the workbench parts into a new IWorkbenchPage.
Comment 3 Paul CLA 2005-04-19 13:16:17 EDT
For what it's worth, the cursor and "highlight" rect that displays while
dragging a perspective button indicates pretty clearly what's going to happen
when you let go of the mouse button.  Even if a user accidentally drags a
perspective to a new window, nothing in the original window is mucked up--they
simply have to close the new window...easy enough to figure out.
Comment 4 Michael Van Meekeren CLA 2005-04-19 13:48:35 EDT
good point, loss of state is bad, but re-parenting wont work on all platforms.  

How about opening a new perspective with close to the same state as the current
perspective, but leave the old one open as they might be unhappy when realizing
that this is not exactly the same.
Comment 5 Nick Edgar CLA 2005-04-20 09:37:27 EDT
Agree that there's decent feedback for the two cases, but I've still
accidentally detached a perspective twice when reordering the items.

We could try the saveState/restoreState trick.  My feeling is that we should
either make it really work (fully detached, with as much state saved as
possible), or back out of it since in its current form it doesn't provide
anything over Window > New Window, plus this is not the behaviour I'd expect
from DnD.

If we allow detaching, it would be nice and consistent to allow re-attach.  But
this would be trickier due to shared views: presumably we'd have to drop the
state of the views in the perspective being reattached if there's a conflict.
Comment 6 Eric Moffatt CLA 2005-08-11 10:01:16 EDT
If we take the approach of having this gesture open a new window with as much 
state as possible maintained then why wouldn't we do this for the 'New Window' 
action as well ?

I could live without the gesture (i.e. DnD only used to re-order)
Comment 7 Christoph Bode CLA 2006-10-05 02:33:00 EDT
For me as a developer of a RCP application the Drag n Drop feature is not important.

Our testers found the feature accidently and it causes exceptions in our application. So (if you stay with this feature) I would vote for something that can be switched off in RCP applications.

Thanks for your work :)
Comment 8 Nick Edgar CLA 2006-10-10 13:48:02 EDT
I agree that most RCP apps will probably not want this.  If you have more details of the failure (e.g. a stack dump), please post them here.
Comment 9 Eric Moffatt CLA 2006-10-10 15:05:24 EDT
Nick, I don't think anyone has reported a 'failure' here (except perhaps for the GUI design..;-).

I could propbably wire this up with a configurable (i.e. -not- user settable)) option specific to this feature if desired.
Comment 10 Christoph Bode CLA 2006-10-11 02:40:02 EDT
Nick, sorry if I stated my point incomprehensibly. There are no Platform failures in our application - we maid the exceptions ourselfs ;) Our data management was not designed to have more than one workbench window open...

Eric, our thanks to you would be assured! Right now we close a second workbench window shortly after creation - which gives me bad dreams in the night.
Comment 11 Eric Moffatt CLA 2006-10-11 10:39:14 EDT
I'm perfectly in favor of doing this (especially since there's an existing (and more intuitive?) path to the same functioanlity; open a new window and set its perspective.

I'm just ttring to determine if there's a better approach than making yet another 'tweak' preference tied specifically to this request. I'm already looking at a number of other similar issues. In this case I'm wondering if I can simply remove the functioanlity altogether and take the heat...;-).
Comment 12 Eric Moffatt CLA 2006-10-12 13:50:28 EDT
Committed in >20061012. 

Removed the functionality completely. I'll likely get flamed by somebody but I can't find a single person here who thinks that it makes sense...
Comment 13 Markus Maghörndl CLA 2007-09-19 04:29:53 EDT
Here is the person who thinks that it made sense ;-)
The users of the RCP I am working on, are used to open perspectives this way.
A 'tweak' preference to preserve backward compatibility would have been the better choice. (Not very nice, but a pragmatic solution.)  
 
I also commited #203927 about the problem.
Comment 14 Eric Moffatt CLA 2008-02-05 15:43:24 EST
Closing since 203927 covers the review...