|
Re: Where to handle Notifications: GraphicalEditPart vs CanonicalEditPolicy? [message #20834 is a reply to message #20063] |
Wed, 16 August 2006 11:25  |
Eclipse User |
|
|
|
Yury wrote:
> Both GraphicalEditPart and CanonicalEditPolicy implement
> NotificationListener and register themselves as adapters of semantic and
> notation elements. Which events should be processed in GraphicalEditPart
> and which in CanonicalEditPolicy and why?
>
Hi;
The canonical edit policy is the component responsible for keeping the
Children view in sync with the semantic element children.
The Canonical edit policy should handle the events concerning adding or
removing a child to the semantic element it is trying to keep in sync.
While the graphical edit part should handle events that might affect
the look of the edit part's figure like; the font, the color etc; or the
Edit Part hierarchy like child addition and deletion to trigger a
refresh in the cases where the EditPart does not have a canonical edit
policy installed on it.
|
|
|
Powered by
FUDForum. Page generated in 0.23943 seconds