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."