Tutorial for MPS 1.5 ?
Friendly greetings !
I'm new to MPS and jetbrain's tools.
I'm willing to learn MPS and downloaded the current release for linux (MPS 1.5), but the tutorial look like outdated.
Contextual menu name and behaviour do not work as expected in the tutorial. i could manage it to create the 1st Calculator Structure, but i can't find a way to create the sandbox.
Are you planning to update the tutorial soon ?
is there a new tutorial hidden somewhere ?
what version of MPS is used by the tutorial ?
I'll probably download the MPS version used by the tutorial, then use the 1.5 version once i understood the basic concept of MPS.
Thank you very much.
*hugs*
Please sign in to leave a comment.
Hi!
You are right - MPS tutorial is outdated now. We are going to update it ASAP. Unfortunately there is no newer tutorial version now, sorry..
I think MPS 1.1 was used to create this tutorial. You can download and use it. Nevertheless I suggest you to stay with the latest version (1.5) and try passing through the tutorial there. Latest MPS version contains a number of new features + other improvements, so I suggest you using it. :-)
ok thank you.
I will retry ... and/or wait for the new tutorial version :-)
No, it was MPS 1.0, not 1.1. You can see it on the screenshots.
Can you help please ?
I am stuck here : http://www.jetbrains.com/mps/docs/tutorial.html#Creating_an_editor_for_Calculator
After creating the editor, i'm supposed to right click on sandbox -> Create Root Node -> Calculator
but " [S] jetbrains.mps.tutorial.calculator.sandbox " do not have any child so i can't right click on sandbox.
I can right click on the root [S] thingy, and create a new "model" of "model from source".
I bet that i should create a "model". but it ask for a model name, a stereotype and some other stuff.
What to do please ? Thank you :-)
screenshot attached
Attachment(s):
MPS.jpg
Hi!
Right, it was changed - new version of MPS will create "solution" (root node with "S" icon in project tree) for you but will not create new model instance in this solution ("sandbox" node on tutorial screen shots), so to make it working you need to create new model instance manually:
Now you can:
Sorry again for inconveniences - we are going to update tutorial ASAP!
it worked. thank you :-)
Hi!
MPS Tutorial was recently updated in accordance with MPS 1.5 release state.
\o/ \o/
Hi,
i just finished to translate a tutorial which describes how one can write a bean-extension for the BaseLang. You can find it here. Originally it was written as accompanying text for an article i published within the german JAVA MAGAZIN 06/10.
It actually is based on MPS 1.1 but i wrote an appropriate update for 1.5 here.
There is also a FAQ here and i also collected some ideas for maybe-projects (some already started) here.
I would be very appreciated for any feedback or any desire to participate!
Feel free to contact me via mirkoDOTrichterATcompagoDOTde.
Regards, Mirko
Did anybody else try the updates Tutorial: http://www.jetbrains.com/mps/docs/tutorial.html
I installed JetBrains MPS 1.5 (build 6411) and did the tutorial.
Now I am stuck here:
"The only thing that's left is handling the InputFieldReference. We don't have a generator for it yet. To create it, we need to define a reduction rule. Reduction rules are applied to all the nodes that are copied during generation, for example, in $COPY_SRC$ macro. Let's create the corresponding reduction rule in the mapping configuration:"
At language generation I am getting 1 error and 2 warnungs:
The error is "No reference in role "localVariableDeclaration" (declaration cadinality is 1)"
the error points to the reduction rule in generator\main.
The two warnungs are pointing to the two lines with i = ...
Does anybody else have this error? Is there a solution?
When I click "ignore errors" at language generation I am getting this output from the generator (bold line marks the error):
public void update() {
int i_a = 0;
int i_b = 0;
int i_c = 0;
try {
i_a = Integer.parseInt(inputField_a.getText());
i_b = Integer.parseInt(inputField_b.getText());
i_c = Integer.parseInt(inputField_c.getText());
} catch (NumberFormatException e) {
// just ignore it
}
.setText("" + (2 + 3 + 9 + i_a));
}
I have the same problem. The interesting thing is that if you take a look at the
picture in the tutorial, the mentioned line also appears in red.
I've attached a picture that shows the error.
Attachment(s):
mps.png
Well, they say and know that there is a problem. But the tutorial sais:
But we have to worry cause the generated code is broken ...
If we ignore such line, the try-catch block statement appears as blank. In addition, MPS does report the mentioned error at the line that was shown on the previous picture.
I am now able to generate the block statement of the try-catch. Once I go to "Generate Text" from the sanbox, it outputs the Java code correctly.
However, it is still not possible to generate the language (it reports 1 error and 1 warning). I also tried the calculator-sample that comes with MPS, and guess what: it has the same error. So, at least now I feel confortable to state that the error is not being caused by anything I have typed.
Anyways, the problem persists :-(
Here's the error reported by the model checker.
Attachment(s):
error.png
Hi!
Concerning the problem reported by ModelChecker - it looks like I missed it because I was passing tutorial with ModelChecker switched off. :-O
Anyway, for now I suggest you to press "ignore" in ModelChecker dialog, so you will be able to generate calculator language code properly. We have a bug report asking to correct this problem with ModelChecker and I'm going to modify MPS Tutorial text to reflect this problem ASAP.
Hi!
You should be able to generate language code properly if you press "ignore" button in ModelChecker dialog (see my posting below).
Concerning the compilation problems in generated code - it looks like the reason was either in incorrect generator state (you was not able to generate it) or you made some mistakes in generator itself... I hope, ignoring ModelChecker errors should correct all these problems.
Hi!
MPS tutorial was updated to work around this problem:
part was removed from there. With the current version of this tutorial you should be able to create corresponding template without any errors. See updated implementing generator tutorial part.