You are right, and that should change once we move to the new
infrastructure.
Cheers,
Doru
On Apr 22, 2008, at 4:13 PM, Stéphane Ducasse wrote:
My main concern is that we have two design for importing things in
moose.
One is functional and you have to know that you get a model back
and the other is by side effect.
Too bad that we are not consistent.
Stef
On Apr 22, 2008, at 3:23 PM, Tudor Girba wrote:
> Hi Stef,
>
> In its current form, the MooseImporter just returns the top level
> entity from MSE, and the convention is that an MSE file is enclosed
> with (Moose.Model (entity ...) ). This means that the top level
> entity
> is Moose.Model and everything inside is put in the entities.
>
> To add this model to the root model you should do:
> loader := SCG.Moose.MooseImporter withActiveMetamodel.
> m := loader importSTream: NameMatchingTest lanModel readStream.
> MooseModel root add: m.
>
> This will probably change slightly in FAMIX 3.0 and in the Fame based
> descriptions and format.
>
> Doru
>
>
> On Apr 22, 2008, at 11:46 AM, stéphane ducasse wrote:
>> Hi
>>
>> I wanted to import a model from a stream
>>
>> I did the following:
>>
>> m := SCG.Moose.MooseModel new.
>> loader SCG.Moose.MooseImporter withActiveMetamodel.
>> loader importSTream: NameMatchingTest lanModel readStream.
>>
>> Now I do not know how I can specify in which model the resulting
>> entities should be added.
>>
>> When I use an SmalltalkImporter I usually do it that way:
>>
>> m := SCG.Moose.MooseModel new.
>> PundleImporter new
>> model: m ;
>> addPundleNamed: 'xxx' ;
>> run
>> and m is populated.
>>
>> So Importer is not following the same pattern or I'm stupid and in
>> both cases this is annoying.
>>
>> stef
>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
>
www.tudorgirba.com
>
www.tudorgirba.com/blog
>
> "Not knowing how to do something is not an argument for how it cannot
> be done."
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
www.tudorgirba.com/blog
"Problem solving should be concentrated on describing
the problem in a way that is relevant for the solution."