Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:13 Go to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
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 20:41 Go to previous message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
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: Fri Mar 29 04:47:11 GMT 2024

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

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

Back to the top