|
Re: EContentAdapter behavior [message #374788 is a reply to message #374787] |
Wed, 13 August 2008 15:33 |
Ed Merks Messages: 33254 Registered: July 2009 |
Senior Member |
|
|
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...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Re: EContentAdapter behavior [message #616703 is a reply to message #374787] |
Wed, 13 August 2008 15:33 |
Ed Merks Messages: 33254 Registered: July 2009 |
Senior Member |
|
|
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...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04097 seconds