going further => starting from agreement example

Hello,

having finished the HelloWorld example I was thinking about going further. I have read Fowler's agreement article and I have taken a look at agreement implementation in MPS examples. I was thinking about making a test model based on Plan along the way of HelloWorld example, but I cannot generate the new model itself: unlike in HelloWorld I cannot specify a valid root, nor I don't have any suggestion.

What am I doing wrong?

Thanks

Giuliano



Attachment(s):
new_model.JPG
5 comments
Comment actions Permalink

Piergiuliano Bossi wrote:

Hello,

having finished the HelloWorld example I was thinking about going further. I have read Fowler's agreement article and I have taken a look at agreement implementation in MPS examples. I was thinking about making a test model based on Plan along the way of HelloWorld example, but I cannot generate the new model itself: unlike in HelloWorld I cannot specify a valid root, nor I don't have any suggestion.

You cannot create new model because you project has no model roots. You

must create one. To do it go to project properties under model roots

label. Press enter and add new model root. Left it's prefix empty and

set it path to some folder. After doing this you can create new model.

0
Comment actions Permalink

You cannot create new model because you project has

no model roots. You

must create one. To do it go to project properties

under model roots

label. Press enter and add new model root. Left it's

prefix empty and

set it path to some folder. After doing this you can

create new model.

Thanks, that worked and I even tried to do it on my own even if I didn't know what to specify in prefix field. Why this step wasn't necessary in HelloWorld example?

Another problem is that if I try to make a new plan I cannot go beyond first value definition (see attached jpg). If I take a look at the console I can see an exception saying that it couldn't find concept declaration for FloatingPointConstant (check attached log between 10:20 and 10:30 today).

Ciao

Giuliano



Attachment(s):
Copy of mps.log
plan_exception.JPG
0
Comment actions Permalink

Piergiuliano Bossi wrote:

>>You cannot create new model because you project has

>>no model roots. You

>>must create one. To do it go to project properties

>>under model roots

>>label. Press enter and add new model root. Left it's

>>prefix empty and

>>set it path to some folder. After doing this you can

>>create new model.

Thanks, that worked and I even tried to do it on my own even if I didn't know what to specify in prefix field. Why this step wasn't necessary in HelloWorld example?

Another problem is that if I try to make a new plan I cannot go beyond first value definition (see attached jpg). If I take a look at the console I can see an exception saying that it couldn't find concept declaration for FloatingPointConstant (check attached log between 10:20 and 10:30 today).

This step isn't necessary in HelloWorld tutorial because you checked

somewhere create default model root, and it was created for you (it is

usually %project%/models).

You can left prefix empty. In MPS model names is like java classes

fqNames, prefix is common prefix for all models stored in that root.

0
Comment actions Permalink

This step isn't necessary in HelloWorld tutorial

because you checked

somewhere create default model root, and it was

created for you (it is

usually %project%/models).

I guess it's a default, because I cannot really find it in the tutorial stuff. Anyway, who cares, it works. :-)

What about the other problem? Any hint?

Thanks

Giuliano

0
Comment actions Permalink

What about the other problem? Any hint?

In the model properties: add "jetbrains.mps.formulaLanguage"

to languages.

igor

0

Please sign in to leave a comment.