Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Curious about IItemPropertyDescriptor
Curious about IItemPropertyDescriptor [message #488214] Sat, 26 September 2009 00:47 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
In the "always kind of wondered" category.. Why is it that
IItemPropertyDescriptor takes an object argument for getFeature(),
etc.., i.e. the metadata that is drawn from ecore and genmodel? Isn't
that invariant for a given descriptor?
Re: Curious about IItemPropertyDescriptor [message #488256 is a reply to message #488214] Sat, 26 September 2009 22:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
Miles,

For consistency, the signature of all those methods take the object as
an argument even though by default they are typically stateless and
often the result depends only on the type and not on the specific instance.


Miles Parker wrote:
>
> In the "always kind of wondered" category.. Why is it that
> IItemPropertyDescriptor takes an object argument for getFeature(),
> etc.., i.e. the metadata that is drawn from ecore and genmodel? Isn't
> that invariant for a given descriptor?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Curious about IItemPropertyDescriptor [message #488477 is a reply to message #488256] Mon, 28 September 2009 20:28 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
That makes sense. In practice I find it a bit confusing because there
is a one to one coorespondence between features and item property
descriptors but a one-to-many for passed properites. But I suppose then
in theory one could have an IItemPropertyDescriptor that served as a
provider for objects that might be members of multiple features, e.g.
some kind of ItemPropertyDescriptorAdapter. In fact I was thinking that
perhaps one could use this as say a way to generically decorate a set
of features rather than a single one.


On 2009-09-26 15:44:15 -0700, Ed Merks <Ed.Merks@gmail.com> said:

> Miles,
>
> For consistency, the signature of all those methods take the object as
> an argument even though by default they are typically stateless and
> often the result depends only on the type and not on the specific
> instance.
>
>
> Miles Parker wrote:
>>
>> In the "always kind of wondered" category.. Why is it that
>> IItemPropertyDescriptor takes an object argument for getFeature(),
>> etc.., i.e. the metadata that is drawn from ecore and genmodel? Isn't
>> that invariant for a given descriptor?
Re: Curious about IItemPropertyDescriptor [message #488522 is a reply to message #488477] Tue, 29 September 2009 06:26 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
Miles,

With stateful item providers, one per instance, one could have different
property descriptors per instance.


Miles Parker wrote:
>
> That makes sense. In practice I find it a bit confusing because there
> is a one to one coorespondence between features and item property
> descriptors but a one-to-many for passed properites. But I suppose
> then in theory one could have an IItemPropertyDescriptor that served
> as a provider for objects that might be members of multiple features,
> e.g. some kind of ItemPropertyDescriptorAdapter. In fact I was
> thinking that perhaps one could use this as say a way to generically
> decorate a set of features rather than a single one.
>
>
> On 2009-09-26 15:44:15 -0700, Ed Merks <Ed.Merks@gmail.com> said:
>
>> Miles,
>>
>> For consistency, the signature of all those methods take the object
>> as an argument even though by default they are typically stateless
>> and often the result depends only on the type and not on the specific
>> instance.
>>
>>
>> Miles Parker wrote:
>>>
>>> In the "always kind of wondered" category.. Why is it that
>>> IItemPropertyDescriptor takes an object argument for getFeature(),
>>> etc.., i.e. the metadata that is drawn from ecore and genmodel?
>>> Isn't that invariant for a given descriptor?
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Ordered
Next Topic:implementing factory override
Goto Forum:
  


Current Time: Mon Sep 23 19:47:54 GMT 2024

Powered by FUDForum. Page generated in 0.04282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top