Trying to find the model of the generator declaration


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 ?

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.



Comment actions Permalink

Thank you that solved my problem.


Please sign in to leave a comment.