Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 97859 - [DetachedViews] non-closeable view can be closed after detaching
Summary: [DetachedViews] non-closeable view can be closed after detaching
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 104596 107014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-01 10:50 EDT by Boris Bokowski CLA
Modified: 2006-12-26 21:09 EST (History)
6 users (show)

See Also:


Attachments
Re-attach non-closable view when the DW is closed (2.27 KB, patch)
2005-08-08 15:36 EDT, Eric Moffatt CLA
no flags Details | Diff
Disallow closing non-closable views in both Detached and Fast Views (3.07 KB, patch)
2005-08-10 10:13 EDT, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Bokowski CLA 2005-06-01 10:50:15 EDT
When you detach a non-closeable view, the new shell containing the detached 
view can be closed.  This will close the non-closeable view too.
Comment 1 Nick Edgar CLA 2005-07-28 12:24:35 EDT
*** Bug 104596 has been marked as a duplicate of this bug. ***
Comment 2 Eric Moffatt CLA 2005-08-08 15:36:42 EDT
Created attachment 25865 [details]
Re-attach non-closable view when the DW is closed


I'm sure there is an easier way to go from a view pane to its presentable
part...Stefan??
Comment 3 Eric Moffatt CLA 2005-08-09 09:09:22 EDT
It turns out you can also close the view if you make it a FastView then use the 
close action...I'll fix this and supply a patch for both...
Comment 4 Eric Moffatt CLA 2005-08-10 10:13:57 EDT
Created attachment 25970 [details]
Disallow closing non-closable views in both Detached and Fast Views
Comment 5 Eric Moffatt CLA 2005-11-04 09:24:02 EST
Nick , could you please apply this patch for me ??
Thanks
Comment 6 Yves Harms CLA 2006-02-21 10:33:10 EST
What is the state of this bug ?
Comment 7 Nick Edgar CLA 2006-02-21 12:23:32 EST
Sorry, I forgot about this one.  Paul, can you review the patch?
Comment 8 Paul Webster CLA 2006-02-22 11:43:52 EST
I've released half of the patch that was still needed into HEAD >20060222

It now re-attaches the view from the detached window if it's non-closeable, instead of hiding it.

PW
Comment 9 Paul Webster CLA 2006-03-28 14:24:41 EST
verifiedt I20060328-0010

PW
Comment 10 Paul Webster CLA 2006-04-04 12:36:54 EDT
*** Bug 107014 has been marked as a duplicate of this bug. ***
Comment 11 Gunnar Ahlberg CLA 2006-05-22 05:20:41 EDT
This is a great patch, and it's on it's way for a problem I'm having.

However, the patch fails if the view implements ISaveablePart2.

The view can implement this interface, open a dialog and the user may respond "don't close" in some way. This is within the scope of the interface, just return ISaveablePart2.NO however, to the users surprise, the view is closed anyways.

Could you please re-open this bug? I'm working on another patch which honours the ISaveablePart. However, there is a problem where the ISaveablePart is called twice. Help here is welcome.

Btw: I'm no fan of ISaveable part either. It can be a pain as it can veto an operation that is already started. 
Comment 12 Gunnar Ahlberg CLA 2006-05-22 07:33:42 EDT
Forget about my last comment, everything in this patch is great, me thinks.
Comment 13 Feng Dihai CLA 2006-12-26 21:09:45 EST
But it re-attaches the view in some "mysterious" place out of our expectation.
It's better to re-attach the view to its original place, or if it was placed in a PlaceHolder then let it go back to the PlaceHolder.

(In reply to comment #8)
> I've released half of the patch that was still needed into HEAD >20060222
> 
> It now re-attaches the view from the detached window if it's non-closeable,
> instead of hiding it.
> 
> PW
>