Bug 95589 - [DetachedViews] Delete occurs in wrong part with torn off view
Summary: [DetachedViews] Delete occurs in wrong part with torn off view
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 major with 2 votes (vote)
Target Milestone: 3.1.1   Edit
Assignee: Eric Moffatt CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
: 66666 95468 98264 99470 102143 102750 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-17 12:02 EDT by John Arthorne CLA Friend
Modified: 2005-09-26 15:18 EDT (History)
7 users (show)

See Also:


Attachments
Keep Key bindings synch'd when a Detached View activates (948 bytes, patch)
2005-08-04 13:55 EDT, Eric Moffatt CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA Friend 2005-05-17 12:02:15 EDT
Build: N20050517-0010 (also in M7)

1) Open a Java editor
2) Tear off the Package Explorer
3) Click inside the Java editor
4) Click on an element in the Package Explorer
5) Hit the Delete key

-> Deletion occurs in the editor, even though Package Explorer is the active
part.  Note this is *only* a problem with the delete key, all other keys seem to
go to the package explorer (character keys, arrow keys, etc).
Comment 1 Douglas Pollock CLA Friend 2005-05-24 11:32:47 EDT
*** Bug 95468 has been marked as a duplicate of this bug. ***
Comment 2 Kim Horne CLA Friend 2005-06-03 08:48:59 EDT
*** Bug 98264 has been marked as a duplicate of this bug. ***
Comment 3 Kim Horne CLA Friend 2005-06-03 19:38:25 EDT
*** Bug 98264 has been marked as a duplicate of this bug. ***
Comment 4 Douglas Pollock CLA Friend 2005-06-29 12:07:55 EDT
*** Bug 102143 has been marked as a duplicate of this bug. ***
Comment 5 Douglas Pollock CLA Friend 2005-08-03 09:57:19 EDT
*** Bug 102750 has been marked as a duplicate of this bug. ***
Comment 6 Douglas Pollock CLA Friend 2005-08-03 09:57:52 EDT
Upgrading to major, as this bug seems to be noticed by a fair number of 
people. 
Comment 7 Eric Moffatt CLA Friend 2005-08-03 10:36:02 EDT
This appears to be another manifestation of bug 66666 which involved the Copy 
operation not working in a detached Console view (only when using the 
accelerator, Ctrl-C). These all represent 'retargetable' actions so my best 
guess is that that they aren't being targeted to the detached view on 
activation...
Comment 8 Eric Moffatt CLA Friend 2005-08-03 15:59:22 EDT
This is definitely related to the following code (from Workbench:init)...

		final ActivePartSourceProvider activePartSourceProvider = new 
ActivePartSourceProvider(
				this);
		handlerService.addSourceProvider(activePartSourceProvider);
		contextService.addSourceProvider(activePartSourceProvider);

The source provider (I'll call it the 'APSP') controls the life-cycle of a part 
changed listener based on the activation or deactivation of an IWorkbenchWindow 
(as well as Open and Close).

When activation is passed into a part in a DetachedWindow the WorkbenchWindow 
deactivates, causing the ActivePartSourceProvider's (APSP) part listener to be 
removed which, in turn, leads to the various defects being reported.

I've hacked the current code to prevent the APSP from either adding or removing 
its part listener and everything seems to work fine (including multiple windows 
on the same workbench which is what this looks to be for), including the defect 
scenarios...

The current DetachedWindow implementation registers its shell with 
the 'context' service but there'a no corresponding code for registering with 
the 'handler' service. How this relates to the control of the accelerator keys 
is still a mystery.

Hints on a non-hack fix based on this info are welcome...;-).
Comment 9 Douglas Pollock CLA Friend 2005-08-03 16:03:27 EDT
We could sit down and look at this tomorrow.  It's probably just a matter of  
creating a source provider for the detached window.  
 
  
Comment 10 Eric Moffatt CLA Friend 2005-08-04 13:53:53 EDT
*** Bug 99470 has been marked as a duplicate of this bug. ***
Comment 11 Eric Moffatt CLA Friend 2005-08-04 13:54:22 EDT
*** Bug 66666 has been marked as a duplicate of this bug. ***
Comment 12 Eric Moffatt CLA Friend 2005-08-04 13:55:04 EDT
Created attachment 25699 [details]
Keep Key bindings synch'd when a Detached View activates


I've marked bug 66666 & bug 99470 as Dup's as well...
Comment 13 John Arthorne CLA Friend 2005-08-04 13:57:49 EDT
It would have been cooler to keep bug "66666" open and mark this as a duplicate
of that one ;)
Comment 14 Eric Moffatt CLA Friend 2005-08-04 14:19:00 EDT
Maybe we should reserve '666' defect numbers for the truly evil defects...;-).
Comment 15 Douglas Pollock CLA Friend 2005-08-04 14:44:10 EDT
I've committed Eric's patch under the moniker of Bug 66666, so it will appear  
in the build notes.  We can't let an opportunity like this pass us by.... 
  
Comment 16 Mirko J. Ploch CLA Friend 2005-08-15 13:14:08 EDT
Is it possible to make this fix a part of the 3.1.1 release (Maintenance Builds)?
Comment 17 Eric Moffatt CLA Friend 2005-08-15 14:47:00 EDT
The concensus is that this looks to be a good candidate for 3.1.1 inclusion. 
We'll wait for DougP to give his input before actually proceeding however (next 
week).
Comment 18 Douglas Pollock CLA Friend 2005-08-23 11:11:01 EDT
I believe this bug is a safe candidate for 3.1.1.  Re-opening so it can be 
verified on the 3.1.1 branch. 
 
Comment 19 Douglas Pollock CLA Friend 2005-08-23 15:46:29 EDT
Fixed in R3_1_maintenance 
Comment 20 Eric Moffatt CLA Friend 2005-09-26 14:30:04 EDT
Verified in 3.1.1 RC2
Comment 21 Boris Bokowski CLA Friend 2005-09-26 15:18:58 EDT
Verified (Windows XP, build M20050923-1430)