|
Re: Create Request (CreationEditPolicy) [message #759293 is a reply to message #759102] |
Mon, 28 November 2011 09:49 |
|
Hi,
I think that the method is called quite often because it is used to
calculate the feedback of the mouse.
What happens is probably that whenever you move the mouse, the diagram
computes a new feedback for the cursor by verificating whether the host
EditPart understand the request (by checking the result of
getCreateElementAndViewCommand).
Place a breakpoint on this method to see the invocation stack.
HTH
On 26/11/2011 12:31, rui.domingues wrote:
> Hi everyone.
>
> I am working on an editor where CreationEditPolicy was extended in order
> to cover some specific behaviour when the element is created.
>
> Now, I want that whenever I select the respective tool from palette, and
> click in diagram to create the element, the editor ask me (via popup),
> if the elemente should or not be created.
>
> My first action was to change a bit the method
> getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
> inside CreationEditPolicy extension, however I can't decide where the
> change should go since this method is called many times when we click in
> diagram to create the element.
> Note that It is called with requests with the same data.
>
>
> Anyone knows why is this method invoked several times, and if I have
> other options to put my code.??
>
> Thanks in advance
> Rui
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01987 seconds