getWrapper what is it ? [message #429129] |
Thu, 09 April 2009 12:04 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hi !
i'm currently debugging some code and i've founded lines using
getWrapper() method from AdapterFactoryEditingDomain.
i debug for performances issues and i see this method is called some
times and at each call this method browse all the model.
So what is this method ? :/
|
|
|
|
|
Re: getWrapper what is it ? [message #429136 is a reply to message #429135] |
Thu, 09 April 2009 12:40 |
Ed Merks Messages: 33146 Registered: July 2009 |
Senior Member |
|
|
Tristan,
No, there's no way to know given the object itself if there might be a
wrapper for it. If you've doing nothing to enable non-containment
children (GenFeature's Children property) and you don't use feature
maps, you won't be using wrappers.
Tristan FAURE wrote:
> Yes but i'm not certain we never use it
> i thought about overrding this mechanism but is it possible to check
> if the object has to be wrapped ?
>
> Ed Merks a écrit :
>> Tristan,
>>
>> When models use non-containment references as children, those
>> children are wrapped because such objects might occur more than once
>> in a tree. Also, a feature map entry doesn't know which feature map
>> contains it, so in that case too, a wrapper that knows the actual
>> parent is needed. So when an object needs to be selected in the
>> view, it's necessary to determine if there's actually only a wrapper
>> for it rather than just the "bare" object being there. Of course if
>> you have no wrappers, and the performance of the check is excessive
>> in your application, you could just specialize the adapter factory
>> editing domain to skip that check.
>>
>>
>> Tristan FAURE wrote:
>>> Hi !
>>> i'm currently debugging some code and i've founded lines using
>>> getWrapper() method from AdapterFactoryEditingDomain.
>>> i debug for performances issues and i see this method is called some
>>> times and at each call this method browse all the model.
>>> So what is this method ? :/
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: getWrapper what is it ? [message #429138 is a reply to message #429136] |
Thu, 09 April 2009 13:04 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
ok
thank you for your answers !
Ed Merks a écrit :
> Tristan,
>
> No, there's no way to know given the object itself if there might be a
> wrapper for it. If you've doing nothing to enable non-containment
> children (GenFeature's Children property) and you don't use feature
> maps, you won't be using wrappers.
>
>
> Tristan FAURE wrote:
>> Yes but i'm not certain we never use it
>> i thought about overrding this mechanism but is it possible to check
>> if the object has to be wrapped ?
>>
>> Ed Merks a écrit :
>>> Tristan,
>>>
>>> When models use non-containment references as children, those
>>> children are wrapped because such objects might occur more than once
>>> in a tree. Also, a feature map entry doesn't know which feature map
>>> contains it, so in that case too, a wrapper that knows the actual
>>> parent is needed. So when an object needs to be selected in the
>>> view, it's necessary to determine if there's actually only a wrapper
>>> for it rather than just the "bare" object being there. Of course if
>>> you have no wrappers, and the performance of the check is excessive
>>> in your application, you could just specialize the adapter factory
>>> editing domain to skip that check.
>>>
>>>
>>> Tristan FAURE wrote:
>>>> Hi !
>>>> i'm currently debugging some code and i've founded lines using
>>>> getWrapper() method from AdapterFactoryEditingDomain.
>>>> i debug for performances issues and i see this method is called
>>>> some times and at each call this method browse all the model.
>>>> So what is this method ? :/
|
|
|
Powered by
FUDForum. Page generated in 0.03981 seconds