Referencing a Java Class in Constraints

Hello,

I am currently trying to reference a externally written Java class within MPS (more specifically within a Concept Constraint). To do so, I added the source path of my java class in the module properties, Java Tab. The class was also successfully built, when generating the language (I had initially some errors).

But when I want to create an instance of this class in the constraints file (at property-> set section), MPS does not know this class. Do I have to announce the class somewhere else?

Thanks a lot,

Christian

2 comments

You also need to import the modal (package) containing your class into the Constraints model. Control + R while positioned in the constraint code followed by your class' name should do the import for you.

0

Thanks for the fast answer. I was missing this import step.

0

Please sign in to leave a comment.