Skip to main content



      Home
Home » Eclipse Projects » GEF » EditPart#deactivate
EditPart#deactivate [message #10346] Tue, 18 June 2002 15:39 Go to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.planet-wagenknecht.de

Hi!

Can I assume, EditPart#deactivate is called every time an EditPart is
deleted/destroyed? I need a activation/deactivation process in model so my
model can add listeners to some other elements and remove them if the
EditPart is destroyed or deleted.

Thanks, Gunnar
Re: EditPart#deactivate [message #10378 is a reply to message #10346] Tue, 18 June 2002 16:01 Go to previous message
Eclipse UserFriend
Originally posted by: none.ibm.com

yes, deactivate() is guaranteed to be called iff activate() is called. They
are inverses. See AbstractEditPartViewer.unhookControl, which deactivates
when the viewer is disposed. This *is* the intended place to add/remove
model listeners.

dispose() is the inverse of doInitialize(). It is *NOT* guaranteed to be
called right now. The purpose of dispose is for the EditPart to remove its
links to the EditPartViewer independant of activation. This was needed to
that EditParts could populate a viewer without being activated, for example
when generating a thumbnail of a resource without opening it in an editor.
As a result of this definition, if you are disposing the Viewer there is no
reason to clean up any links between EditPart<->viewer, since they are all
trash anyway.

"Gunnar Wagenknecht" <g.wagenknecht@planet-wagenknecht.de> wrote in message
news:aeo1bi$f8f$1@rogue.oti.com...
> Hi!
>
> Can I assume, EditPart#deactivate is called every time an EditPart is
> deleted/destroyed? I need a activation/deactivation process in model so my
> model can add listeners to some other elements and remove them if the
> EditPart is destroyed or deleted.
>
> Thanks, Gunnar
>
>
Previous Topic:NonResizableEditPolicy
Next Topic:New download?
Goto Forum:
  


Current Time: Thu May 08 13:27:31 EDT 2025

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

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

Back to the top