Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » WorkbenchWindowControlContribution not disposed on mouse drag & drop
WorkbenchWindowControlContribution not disposed on mouse drag & drop [message #333424] Wed, 10 December 2008 11:13 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Question: the software items you selected may not be valid...bug?
Next Topic:Is event thrown when opening folder i Explorer
Goto Forum:
  


Current Time: Thu May 01 12:08:06 EDT 2025

Powered by FUDForum. Page generated in 0.03815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top