Trying to find the model of the generator declaration

Hello

My Goal : Implementing a LOC calculation like Marcus Völter suggests in his thesis. Therefore I have to count the number of Rules ( node<BaseMappingRule> ) in the generator aspect.

 

My Problem : for every Language module I do 

for( model : langugage.getModels() ){
.....
}

That way I get models for structure / editor / typsystem ..... , but none for the generator.

So how do I acceess the nodes of the generator aspect ?

2 comments
Comment actions Permalink

Generators are modules of their own, which hold generator models and are only associated with Languages in the repository. You'll need to use jetbrains.mps.smodel.Language.getGenerators() to get hold of the generator for a language.

Vaclav

 

0
Comment actions Permalink

Thank you that solved my problem.

0

Please sign in to leave a comment.