How are "QueriesGenerated" called?

Hi,

I noticed that NodeSubstitutions are generated to Java-files called "QueriesGenerated.java". The generated methods are then dynamically used, but I do not comprehend where and when these Methods are called. Can anyone point me in the right direction?

My goal is that I can specify specific concepts and Constraints on concepts which are then used to generate a "QueriesGenerated" with e.g. two methods which return a boolean value and are always named the same.

- (boolean) canBeAnnotated(node<> nodeToCheck)

- (boolean) canHaveAlternative(node<> nodeToCheck)

The implementation of these methods should then be dynamically generated from my DSL.

 

I hope it is understandable what my goal is.

Best regards

Moritz Fey

1 comment
Comment actions Permalink

Hi,

I just wanted to let you know that I found a way to accomplish this. By adding a custom language aspect to my language I can achieve my goal of dynamically change the underlying code.

https://confluence.jetbrains.com/display/MPSD33/Custom+language+aspect+cookbook 

 

Best regards 

Moritz Fey

0

Please sign in to leave a comment.