Bug 7235 - [Contributions] Need dispose() for action delegates
Summary: [Contributions] Need dispose() for action delegates
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, investigate
: 13833 14253 (view as bug list)
Depends on:
Blocks: 7012 7122
  Show dependency tree
 
Reported: 2002-01-03 10:25 EST by Nick Edgar CLA
Modified: 2002-12-02 14:57 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 2002-01-03 10:25:31 EST
Action delegates should have a dispose() method so they can unhook any 
listeners they have hooked.

See bug 7122.
Comment 1 Darin Swanson CLA 2002-01-31 17:28:18 EST
The debug team was wondering what is the milestone for this bug?
Comment 2 Nick Edgar CLA 2002-02-01 14:57:47 EST
How critical is this for you?
Is it actually preventing you from doing something, or just not elegant?
Comment 3 Darin Swanson CLA 2002-02-01 15:08:26 EST
I am currently coding the workaround. For example:IViewActionDelegates have to 
register as IPartListeners and then dispose themselves when their view closes.

So we do have a workaround but it is definately less than elegant and would 
just disappear with the dipose method added.
Comment 4 Nick Edgar CLA 2002-02-01 15:14:18 EST
I agree this is suboptimal.
Will investigate for M4.
Comment 5 Darin Swanson CLA 2002-04-04 22:02:45 EST
Is this going to make it for 2.0?
Comment 6 Nick Edgar CLA 2002-04-04 22:30:16 EST
Will do for early M6.
There are several issues in doing this:
- Contribution managers don't have dispose (should add this too).
- Can't just add dispose() to IActionDelegate since that would be a breaking 
API change.  Could add IActionDelegateWithDispose, similar to 
IActionDelegateWithEvent. This gets pretty unwieldy though.

Could add IActionDelegate2 (for lack of a better name) which extends 
IActionDelegate with run(IAction, Event) and dispose().
Would you be willing to change your existing IActionDelegateWithEvent 
implementations?

Comment 7 Darin Swanson CLA 2002-04-05 08:08:55 EST
For the code this would remove from our action delegates, I would be happy to 
update as necessary.
Comment 8 Nick Edgar CLA 2002-04-15 16:53:36 EDT
*** Bug 13833 has been marked as a duplicate of this bug. ***
Comment 9 Nick Edgar CLA 2002-04-22 10:54:38 EDT
*** Bug 14253 has been marked as a duplicate of this bug. ***
Comment 10 Nick Edgar CLA 2002-06-14 15:38:16 EDT
Was not able to do this for 2.0.
Comment 11 Simon Arsenault CLA 2002-12-02 14:57:31 EST
Added IActionDelegate2 which provides the lifecycle methods for action 
delegates. It also replaces IActionDelegateWithEvent interface which now is 
marked as deprecated. Will be in 20021203 integration build.