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

Bug 14253

Summary: EditorActionBarContributor can't manage Action lifecycle
Product: [Eclipse Project] Platform Reporter: Randy Hudson <hudsonr>
Component: UIAssignee: Nick Edgar <n.a.edgar>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Randy Hudson CLA 2002-04-19 14:57:41 EDT
[See newgroup thread from 04/23/2001 last year]

EditorActionBarContributor is supposed to manage a set of Actions that get 
displayed across all Editors of the same type within a single window.  This is 
what the JDT does by example, at least.

So, I have an action that is enabled based on the current selection and 
observes the SelectionService.
I need to remove that action from the SelectionService.
The action bar contibutor is never disposed, even though it does go away, so I 
cannot remove it there.

So, i was forced to make the action live on the EditorPart, which *is* 
disposed.  Every time the contributor gets a new EditorPart, it swaps out all 
of the actions from the old editor with the new editor.

Clients are complaining that 2 instances of the same editor type results in 
double the amount of selection service listeners.
I could implement reference counting of Editor's, etc, but it would be a lot 
easier if the contributor was simply disposed().
Comment 1 Nick Edgar CLA 2002-04-22 10:54:38 EDT

*** This bug has been marked as a duplicate of 7235 ***