WorkbenchWindowControlContribution not disposed on mouse drag & drop [message #333424] |
Wed, 10 December 2008 11:13  |
Eclipse User |
|
|
|
Hi there!
I have implemented a WorkbenchWindowControlContribution which's createControl() method
creates a Label and registers a listener on my data model that updates the label.
I have put this contribution the status-line via the org.eclipse.ui.menu
extension point.
The problem i encountered is that when i drag & drop the control contribution with the mouse,
the createControl() method is called two times (once on drag and once on drop). The dispose()
method, however, is not called at all.
As far as i can see, the dispose method is only called by the ToolbarManager upon it's own disposal.
I managed with adding a dispose listener on the parent composite provided to the createControl()
method which removes the listener from my data model.
This work's well. Anyhow, could somebody please confirm that it is intentional that the dispose()
method is NOT called by the framework? This seems kind of strange...
Thnx,
MH
|
|
|
Re: WorkbenchWindowControlContribution not disposed on mouse drag & drop [message #333476 is a reply to message #333424] |
Fri, 12 December 2008 15:41  |
Eclipse User |
|
|
|
This was a bug that has been fixed in the 3.5 stream.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252904
Marcel Hoetter wrote:
> Hi there!
>
> I have implemented a WorkbenchWindowControlContribution which's
> createControl() method
> creates a Label and registers a listener on my data model that updates
> the label.
> I have put this contribution the status-line via the org.eclipse.ui.menu
> extension point.
>
> The problem i encountered is that when i drag & drop the control
> contribution with the mouse,
> the createControl() method is called two times (once on drag and once on
> drop). The dispose() method, however, is not called at all.
>
> As far as i can see, the dispose method is only called by the
> ToolbarManager upon it's own disposal.
>
> I managed with adding a dispose listener on the parent composite
> provided to the createControl() method which removes the listener from
> my data model.
>
> This work's well. Anyhow, could somebody please confirm that it is
> intentional that the dispose() method is NOT called by the framework?
> This seems kind of strange...
>
> Thnx,
>
> MH
|
|
|
Powered by
FUDForum. Page generated in 0.03815 seconds