fame package annotation related question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

fame package annotation related question

Stéphane Ducasse
I imagine that I cannot ask an FAME attribute the methods that defined it.
Am I correct?

So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
But this means that I also have to check that this is the correct attributes I got

        <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
        <package: #Java>

Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Tudor Girba-2
Hi Stef,

On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:

> I imagine that I cannot ask an FAME attribute the methods that defined it.
> Am I correct?

No. You have implementingSelector.

FAMIXPackage asMooseDescription attributes first implementingSelector
--> #numberOfMethods
http://www.themoosebook.org/book/internals/fame/smalltalk-integration

> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.

For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.

Cheers,
Doru

> But this means that I also have to check that this is the correct attributes I got
>
> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
> <package: #Java>
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"The coherence of a trip is given by the clearness of the goal."





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse

On Sep 23, 2011, at 3:16 PM, Tudor Girba wrote:

> Hi Stef,
>
> On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:
>
>> I imagine that I cannot ask an FAME attribute the methods that defined it.
>> Am I correct?
>
> No. You have implementingSelector.

Excellent
I will save my day.

> FAMIXPackage asMooseDescription attributes first implementingSelector
> --> #numberOfMethods
> http://www.themoosebook.org/book/internals/fame/smalltalk-integration
>
>> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
>
> For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.

Ok for now I will play and enhance the metareport builder.

Probably we will migrate everything to a subclass of FMPragmaProcessor or user.
I want to make progress on FAMIX30.

>
> Cheers,
> Doru
>
>> But this means that I also have to check that this is the correct attributes I got
>>
>> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
>> <package: #Java>
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "The coherence of a trip is given by the clearness of the goal."
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse
In reply to this post by Tudor Girba-2
Now do you have an idea how I can get the Fame object when I get a method?
I will look in FAMEPragmaProcessor

Stef

On Sep 23, 2011, at 3:16 PM, Tudor Girba wrote:

> Hi Stef,
>
> On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:
>
>> I imagine that I cannot ask an FAME attribute the methods that defined it.
>> Am I correct?
>
> No. You have implementingSelector.
>
> FAMIXPackage asMooseDescription attributes first implementingSelector
> --> #numberOfMethods
> http://www.themoosebook.org/book/internals/fame/smalltalk-integration
>
>> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
>
> For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.
>
> Cheers,
> Doru
>
>> But this means that I also have to check that this is the correct attributes I got
>>
>> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
>> <package: #Java>
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "The coherence of a trip is given by the clearness of the goal."
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse
In reply to this post by Tudor Girba-2
doru

do you have an idea

if this is correct that

        FMPragmaProcessor new processClass: FAMIXContainerEntity

returns a FM3MetaDescription whose attributes are empty?

FAMIXContainerEntity asMooseDescription attributes size
        -> 4

Do you think that we should fix processClass:

Stef


On Sep 23, 2011, at 3:16 PM, Tudor Girba wrote:

> Hi Stef,
>
> On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:
>
>> I imagine that I cannot ask an FAME attribute the methods that defined it.
>> Am I correct?
>
> No. You have implementingSelector.
>
> FAMIXPackage asMooseDescription attributes first implementingSelector
> --> #numberOfMethods
> http://www.themoosebook.org/book/internals/fame/smalltalk-integration
>
>> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
>
> For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.
>
> Cheers,
> Doru
>
>> But this means that I also have to check that this is the correct attributes I got
>>
>> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
>> <package: #Java>
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "The coherence of a trip is given by the clearness of the goal."
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse
I thought that I made a mistake but using

MoosePragmaProcessor I get the same behavior.

So is MoosePragmaProcessor when we reset the properties?

I will check MooseModel resetMeta


Stef
On Sep 23, 2011, at 9:53 PM, Stéphane Ducasse wrote:

> doru
>
> do you have an idea
>
> if this is correct that
>
> FMPragmaProcessor new processClass: FAMIXContainerEntity
>
> returns a FM3MetaDescription whose attributes are empty?
>
> FAMIXContainerEntity asMooseDescription attributes size
> -> 4
>
> Do you think that we should fix processClass:
>
> Stef
>
>
> On Sep 23, 2011, at 3:16 PM, Tudor Girba wrote:
>
>> Hi Stef,
>>
>> On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:
>>
>>> I imagine that I cannot ask an FAME attribute the methods that defined it.
>>> Am I correct?
>>
>> No. You have implementingSelector.
>>
>> FAMIXPackage asMooseDescription attributes first implementingSelector
>> --> #numberOfMethods
>> http://www.themoosebook.org/book/internals/fame/smalltalk-integration
>>
>>> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
>>
>> For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.
>>
>> Cheers,
>> Doru
>>
>>> But this means that I also have to check that this is the correct attributes I got
>>>
>>> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
>>> <package: #Java>
>>>
>>> Stef
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "The coherence of a trip is given by the clearness of the goal."
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Tudor Girba-2
Hi Stef,

ensureClass: is a private method (see the protocol).

An example of how to use the class, can be found in the tests, or in the buildFM3.
        processor := FMPragmaProcessor new.
        processor queue: FMPragmaProcessorTestDummy.
        processor run.

The MoosePragmaProcessor was just my attempt to not have the processor crash when there is no MSEClass: pragma in the class.

Cheers,
Doru



On 23 Sep 2011, at 22:03, Stéphane Ducasse wrote:

> I thought that I made a mistake but using
>
> MoosePragmaProcessor I get the same behavior.
>
> So is MoosePragmaProcessor when we reset the properties?
>
> I will check MooseModel resetMeta
>
>
> Stef
> On Sep 23, 2011, at 9:53 PM, Stéphane Ducasse wrote:
>
>> doru
>>
>> do you have an idea
>>
>> if this is correct that
>>
>> FMPragmaProcessor new processClass: FAMIXContainerEntity
>>
>> returns a FM3MetaDescription whose attributes are empty?
>>
>> FAMIXContainerEntity asMooseDescription attributes size
>> -> 4
>>
>> Do you think that we should fix processClass:
>>
>> Stef
>>
>>
>> On Sep 23, 2011, at 3:16 PM, Tudor Girba wrote:
>>
>>> Hi Stef,
>>>
>>> On 23 Sep 2011, at 14:44, Stéphane Ducasse wrote:
>>>
>>>> I imagine that I cannot ask an FAME attribute the methods that defined it.
>>>> Am I correct?
>>>
>>> No. You have implementingSelector.
>>>
>>> FAMIXPackage asMooseDescription attributes first implementingSelector
>>> --> #numberOfMethods
>>> http://www.themoosebook.org/book/internals/fame/smalltalk-integration
>>>
>>>> So this means that if I want to know that an attribute got tagged with a package pragma: I have to query that at the smalltalk level.
>>>
>>> For the package pragma, we have to enhance the FMPragmaProcessor to take it into account.
>>>
>>> Cheers,
>>> Doru
>>>
>>>> But this means that I also have to check that this is the correct attributes I got
>>>>
>>>> <MSEProperty: #annotationInstances type: #FAMIXAnnotationInstance opposite: #annotatedEntity> <multivalued> <derived>
>>>> <package: #Java>
>>>>
>>>> Stef
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "The coherence of a trip is given by the clearness of the goal."
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse


> Hi Stef,
>
> ensureClass: is a private method (see the protocol).
>
> An example of how to use the class, can be found in the tests, or in the buildFM3.
> processor := FMPragmaProcessor new.
> processor queue: FMPragmaProcessorTestDummy.
> processor run.
>
> The MoosePragmaProcessor was just my attempt to not have the processor crash when there is no MSEClass: pragma in the class.

Ok I'm diving into that.
What I will do is to hack the metamodelreport so that I get progress from this side.
And I will look at all the meta stuff in parallel

Now I'm still confused why
>>> FMPragmaProcessor new processClass: FAMIXContainerEntity
>>>
>>> returns a FM3MetaDescription whose attributes are empty?

And this resetMeta is working.
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Tudor Girba-2
Hi Stef,

On 24 Sep 2011, at 10:23, Stéphane Ducasse wrote:

>
>
>> Hi Stef,
>>
>> ensureClass: is a private method (see the protocol).
>>
>> An example of how to use the class, can be found in the tests, or in the buildFM3.
>> processor := FMPragmaProcessor new.
>> processor queue: FMPragmaProcessorTestDummy.
>> processor run.
>>
>> The MoosePragmaProcessor was just my attempt to not have the processor crash when there is no MSEClass: pragma in the class.
>
> Ok I'm diving into that.
> What I will do is to hack the metamodelreport so that I get progress from this side.
> And I will look at all the meta stuff in parallel
>
> Now I'm still confused why
>>>> FMPragmaProcessor new processClass: FAMIXContainerEntity
>>>>
>>>> returns a FM3MetaDescription whose attributes are empty?
>
> And this resetMeta is working.

I told you that processClass: is an internal method (i.e., it is used in combination with others :)).

So, if you look at the run method, you will see that it also calls resolveObjectReferences.

Try this:

processor := FMPragmaProcessor new.
description := processor processClass: FMPragmaProcessorTestDummy.
processor resolveObjectReferences.
description inspect

Cheers,
Doru


>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"It's not what we do that matters most, it's how we do it."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: fame package annotation related question

Stéphane Ducasse
Ok I will look at it and write a comment as usual.

Stef


> Hi Stef,
>
> On 24 Sep 2011, at 10:23, Stéphane Ducasse wrote:
>
>>
>>
>>> Hi Stef,
>>>
>>> ensureClass: is a private method (see the protocol).
>>>
>>> An example of how to use the class, can be found in the tests, or in the buildFM3.
>>> processor := FMPragmaProcessor new.
>>> processor queue: FMPragmaProcessorTestDummy.
>>> processor run.
>>>
>>> The MoosePragmaProcessor was just my attempt to not have the processor crash when there is no MSEClass: pragma in the class.
>>
>> Ok I'm diving into that.
>> What I will do is to hack the metamodelreport so that I get progress from this side.
>> And I will look at all the meta stuff in parallel
>>
>> Now I'm still confused why
>>>>> FMPragmaProcessor new processClass: FAMIXContainerEntity
>>>>>
>>>>> returns a FM3MetaDescription whose attributes are empty?
>>
>> And this resetMeta is working.
>
> I told you that processClass: is an internal method (i.e., it is used in combination with others :)).
>
> So, if you look at the run method, you will see that it also calls resolveObjectReferences.
>
> Try this:
>
> processor := FMPragmaProcessor new.
> description := processor processClass: FMPragmaProcessorTestDummy.
> processor resolveObjectReferences.
> description inspect
>
> Cheers,
> Doru
>
>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "It's not what we do that matters most, it's how we do it."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev