Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 2896

Summary: Strange selection handling in IWorkbenchWindowActionDelegate (1GKK15I)
Product: [Eclipse Project] Platform Reporter: Dirk Baeumer <dirk_baeumer>
Component: UIAssignee: Simon Arsenault <simon_arsenault>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: P2    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 4981    

Description Dirk Baeumer CLA 2001-10-10 22:45:40 EDT
I implemented an IWorkbenchWindowActionDelegate and found some strange behaviour regarding selections:

	- if you shutdown eclipse and start is again then your contributed actions receive a selectionChanged call if the ouliner had the
	  focus. If for example the navigator or packages view had the focus on shutdown the actions don't receive any selectionChanged calls.
	- Selection changes in the text editor aren't forwarded to the IWorkbenchWindowActionDelegate.

One architectural issue: the IActionDelegate is the only concept where I receive selection changes for free (without registering for it).
Why isn't there some init method on IActionDelegate too. In this method I could access a selection service and hook up my own selection
changed listener if needed. Then we could remove the selectionChanged method.


NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 19:23:51 EST
PRODUCT VERSION:
201

Comment 2 Dirk Baeumer CLA 2002-01-23 11:35:37 EST
Parts seem to be fixed. Unclear is

- if you shutdown eclipse and start is again then your contributed actions 
receive a selectionChanged call if the ouliner had the focus. If for example 
the navigator or packages view had the focus on shutdown the actions don't 
receive any selectionChanged calls.
 
Comment 3 Kevin Haaland CLA 2002-01-23 17:56:45 EST
Pls take a look. There is a similiar defect report about the selection change 
event being sent multiple times. When I find it I will link them in bugzilla. 
Comment 4 Simon Arsenault CLA 2002-04-11 11:32:35 EDT
Can you provide me with the name of the class that implements the 
IWorkbenchWindowActionDelegate which is having this problem? I can't seem to 
reproduce it with the readme example ones.
Comment 5 Nick Edgar CLA 2002-05-16 10:16:25 EDT
Dirk, is this still a problem?  I see bug 4981 has been fixed.
If it's still a problem, please supply a test case.
Comment 6 Dirk Baeumer CLA 2002-05-16 11:57:13 EDT
Can't reproduce
Comment 7 Simon Arsenault CLA 2002-05-16 12:04:04 EDT
May have gotten fixed by someone else. Please re-open if you see the problem 
again.