Editing in MPS
Thanks to Tracy Snell's update to the tutorial, I succeeded go through it from the beginning to the end and have now the running result of the whole thing.
The thing I have the biggest problem with in MPS is the way models are actually edited. Having to change to another cell to type in the next portion of the program is just - sorry for being so honest here - horrible. It took me about half an hour to type in "Sytem.out.println("Hello")", because I first typed parts of it into one cell when they needed to be typed into two cells. I could only type in the string literal by using autocompletion, just typing in "Hello" didn't work. I had to CTRL-Space, choose '" string literal' and then type in Hello. What I need here is something like IDEA: at the base a plain text editor with added intelligence that assists me. MPS is more like a form based GUI application that looks like a text editor but clearly isn't one.
Are there any plans to make it feel more like IDEA in how models are edited?
Cheers,
Robert
Please sign in to leave a comment.
Hello, Robert.
We have plans to invest a lot resources in improving editor usability so experience of working with will be as close to that of IDEA as possible. But since we use a different approach to editing code we will never have many things which are available in IDEA. If we do so we will loose many benefits which we have in MPS. In my experience, when people start working with MPS they usually have problems with editing code but after a couple of days they get this thing and become comfortable with our editor. It's similar to learning a new language. When you start, many things seem unfamiliar and complex but when you manage to understand everything becomes much more simple.
P.S. Of course it doesn't mean that we won't improve usability of editor. There are a lot work which can be done in this area. All I wanted to write in this post is that MPS is different from text editor and if you use it properly you can be as productive as in IDEA.
Edited by: Konstantin Solomatov on Apr 9, 2008 12:30 AM
The main problem here is that in MPS we edit a tree (AST) and we store model as a tree and at the same time we try to make it feel more like regular text editing which is often not easy.
I just discussed with coworker (Igor) all aspects of entering 'System.out.println("Hello")'. It seems that the easiest to fix is the problem of entering string literal. We'll try to fix it.
Timur
Robert,
We've released a new MPS build where this problem is alleviated. You can type System.out without pressing controlspace just like in a text editor. When you want to type println, unfortunately, you have to press controlspace because there are a lot of method with println name but different signatures. We have plans to fix this usability problem but the fix isn't very easy.
Could you download the latest build and check if entering the code became easier?
Thanks,
I will try it out in the next few days.
So when I choose a method I need to choose the one with the signature I need. That's something I wasn't aware of. In IDEA I would choose the first method with the matching name and then fill in the parameters. If I understand you right, if I chose "println(int)" and tried to fill in a string parameter, it wouldn't work because the cell for the parameter expects an int. Probably this was also one reason for needing so long a time to get it typed in.
In the tutorial there is a part where you need to type in "node.mytext" for a property macro. Will the improved editing also allow me to just type in ""node.mytext" without having to change cells consciously.
Cheers,
Robert
So when I choose a method I need to choose the one with the signature I need. That's something I wasn't aware of. In IDEA I would choose the first method with the matching name and then fill in the parameters. If I understand you right, if I chose "println(int)" and tried to fill in a string parameter, it wouldn't work because the cell for the parameter expects an int. Probably this was also one reason for needing so long a time to get it typed in.
It would work but will be highlighted by type checker.
In the tutorial there is a part where you need to type in "node.mytext" for a property macro. Will the improved editing also allow me to just type in ""node.mytext" without having to change cells consciously.
In this case there is no ambiguity. If you type node dot myText, it should work well.