Hi,
Yes, it is possible. Actually, that is the whole idea behind the meta-
descriptions :).
If you have an EMOF.Property called aProperty, you get the value for
a given anEntity like:
anEntity mmGet: aProperty
For more details concerning the bridge between the Meta-world and the
Smalltalk-world take a look at the extensions to Object from the Meta-
Support package that Adrian wrote.
In the Property (MetaMeasurement used for metrics is a subclass of
Property) you get the description that you can use for the UI.
Cheers,
Doru
On Jun 6, 2007, at 9:47 AM, Richard Wettel wrote:
Hi Doru,
The mappers in CodeCity map metrics on visual properties of the
glyphs. And the way I get the list of selectors that compute
metrics is:
<aFAMIXEntity> allDeclaredProperties collect: [:each|each
definingMethod selector]
At the time, I did not realize that getting from attribute name to
selector is easier than the other way around. And in the case of some
of the metrics it seemed more intuitive to show the name of the
selector rather than its acronym. Maybe I should have just keep the
list of the properties and display their description. Is that
possible? Never too late to change :)
Ricky
On Jun 6, 2007, at 8:09 AM, Tudor Girba wrote:
Hi Ricky,
That is an interesting question. I would be very interested in
knowing why you need this :).
Could you develop on your use case?
Cheers,
Doru
On Jun 6, 2007, at 12:42 AM, Adrian Kuhn wrote:
> Hey Ricky,
>
> the otherway round is easier, since you can get from #NOM to
> #numberOfMethods using
>
> (self metaDescription attributeNamed: #NOM) definingMethod selector
>
> so you could enumerate all attributes and detect the matching one
> indirectly.
>
> Does this answer your question?
It does, Adrian. Thanks.
> cheers,
> AA
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Tudor Girba
www.iam.unibe.ch/~girba
www.iam.unibe.ch/~girba/blog/
"It is not what we do that matters, it is how we do it."