Re: EContentAdapter behavior [message #374787] |
Wed, 13 August 2008 11:23  |
Eclipse User |
|
|
|
Hi
As I thought... I'm running into trouble again...
Removing an Activity from the diagram works the way mentioned before.
Removing a SquenceEdge doesn't work this way. I'm getting pretty mad
about this, there has to be a way doing it for all those BPMN objects
the same way.
Thanks
Till
Till Essers schrieb:
> Hi
>
> Don't know what I am listening to, I just called:
> editor.getDiagram().eAdapters().add(adapter);
> to add my EContentAdapter.
>
> Ok, I think I've found out what I have to do:
> I have to listen to the REMOVE notification,
> then test on the old value, not the notifier. Doing this I can see the
> element being removed from the node before the adapter is removed from
> the node.
> Hopefully it's just called when the element is removed... otherwise I
> would run into trouble again :D
>
> Tricky thing this EContentAdapter...
>
> Thanks
>
>
> Ed Merks schrieb:
>> Till,
>>
>> Are you listening to just the diagram resource or also the resource
>> containing the model? I'm assuming they're in different resources,
>> but that might be a wrong assumption. It sounds like delete is
>> cleaning up the node, but I would have imagined you'd have seen a
>> notification that the node's element was being SET to null...
|
|
|
Re: EContentAdapter behavior [message #374788 is a reply to message #374787] |
Wed, 13 August 2008 11:33   |
Eclipse User |
|
|
|
Till,
It seems clear you're listening to the diagram and likely not listening
to the underlying domain model at all. Yet probably what you're
interested in are the changes to the actual domain model regardless of
how the diagram might be rendering it or referring to it. I wonder what
kinds of notifications you'll see if you did
editor.getDiagram().getElement().eAdapters().add(adapter) instead...
Till Essers wrote:
> Hi
>
> As I thought... I'm running into trouble again...
> Removing an Activity from the diagram works the way mentioned before.
> Removing a SquenceEdge doesn't work this way. I'm getting pretty mad
> about this, there has to be a way doing it for all those BPMN objects
> the same way.
>
> Thanks
> Till
>
> Till Essers schrieb:
>> Hi
>>
>> Don't know what I am listening to, I just called:
>> editor.getDiagram().eAdapters().add(adapter);
>> to add my EContentAdapter.
>>
>> Ok, I think I've found out what I have to do:
>> I have to listen to the REMOVE notification,
>> then test on the old value, not the notifier. Doing this I can see
>> the element being removed from the node before the adapter is removed
>> from the node.
>> Hopefully it's just called when the element is removed... otherwise I
>> would run into trouble again :D
>>
>> Tricky thing this EContentAdapter...
>>
>> Thanks
>>
>>
>> Ed Merks schrieb:
>>> Till,
>>>
>>> Are you listening to just the diagram resource or also the resource
>>> containing the model? I'm assuming they're in different resources,
>>> but that might be a wrong assumption. It sounds like delete is
>>> cleaning up the node, but I would have imagined you'd have seen a
>>> notification that the node's element was being SET to null...
|
|
|
|
Re: EContentAdapter behavior [message #374790 is a reply to message #374788] |
Wed, 13 August 2008 12:05  |
Eclipse User |
|
|
|
Hi Ed,
I think you know pretty well what kind of notifications I'm receiving
after adding the ".getElement()" ...
Thank you, I KNEW it couldn't be that complicated it seemed to be ;)
Ed Merks schrieb:
> Till,
>
> It seems clear you're listening to the diagram and likely not listening
> to the underlying domain model at all. Yet probably what you're
> interested in are the changes to the actual domain model regardless of
> how the diagram might be rendering it or referring to it. I wonder what
> kinds of notifications you'll see if you did
> editor.getDiagram().getElement().eAdapters().add(adapter) instead...
>
>
|
|
|
Re: EContentAdapter behavior [message #616703 is a reply to message #374787] |
Wed, 13 August 2008 11:33  |
Eclipse User |
|
|
|
Till,
It seems clear you're listening to the diagram and likely not listening
to the underlying domain model at all. Yet probably what you're
interested in are the changes to the actual domain model regardless of
how the diagram might be rendering it or referring to it. I wonder what
kinds of notifications you'll see if you did
editor.getDiagram().getElement().eAdapters().add(adapter) instead...
Till Essers wrote:
> Hi
>
> As I thought... I'm running into trouble again...
> Removing an Activity from the diagram works the way mentioned before.
> Removing a SquenceEdge doesn't work this way. I'm getting pretty mad
> about this, there has to be a way doing it for all those BPMN objects
> the same way.
>
> Thanks
> Till
>
> Till Essers schrieb:
>> Hi
>>
>> Don't know what I am listening to, I just called:
>> editor.getDiagram().eAdapters().add(adapter);
>> to add my EContentAdapter.
>>
>> Ok, I think I've found out what I have to do:
>> I have to listen to the REMOVE notification,
>> then test on the old value, not the notifier. Doing this I can see
>> the element being removed from the node before the adapter is removed
>> from the node.
>> Hopefully it's just called when the element is removed... otherwise I
>> would run into trouble again :D
>>
>> Tricky thing this EContentAdapter...
>>
>> Thanks
>>
>>
>> Ed Merks schrieb:
>>> Till,
>>>
>>> Are you listening to just the diagram resource or also the resource
>>> containing the model? I'm assuming they're in different resources,
>>> but that might be a wrong assumption. It sounds like delete is
>>> cleaning up the node, but I would have imagined you'd have seen a
>>> notification that the node's element was being SET to null...
|
|
|
|
Re: EContentAdapter behavior [message #616705 is a reply to message #374788] |
Wed, 13 August 2008 12:05  |
Eclipse User |
|
|
|
Hi Ed,
I think you know pretty well what kind of notifications I'm receiving
after adding the ".getElement()" ...
Thank you, I KNEW it couldn't be that complicated it seemed to be ;)
Ed Merks schrieb:
> Till,
>
> It seems clear you're listening to the diagram and likely not listening
> to the underlying domain model at all. Yet probably what you're
> interested in are the changes to the actual domain model regardless of
> how the diagram might be rendering it or referring to it. I wonder what
> kinds of notifications you'll see if you did
> editor.getDiagram().getElement().eAdapters().add(adapter) instead...
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04045 seconds