Writing Documentation for language
We are trying to create a language which we think will change from time to time. If there is a Concept A and a property B, we need to write why such property is needed etc.
I mean like we document Java instance variables, I want to document every thing I am writing in MPS. It may be a Concept or Editor or Generator. For some strange reason, I am not able to find how to do it.
Does such functionality exist? How can I do it?
I mean like we document Java instance variables, I want to document every thing I am writing in MPS. It may be a Concept or Editor or Generator. For some strange reason, I am not able to find how to do it.
Does such functionality exist? How can I do it?
Please sign in to leave a comment.
We are thinking about this functionality for a long time, but don't have time to implement it.
I would suggest looking on MPS "Annotations". This is how "Deprecated" annotation is implemented on a concept. The thing is that the concept doesn't know about annotations that can be attached to it. See "deprecatedNode" annotation link declaration for an example (can be found with ctrl-n).
In a couple words - the
I've called other MPS developers to have a look at this thread and post their ideas.
If you have further questions, feel free to ask.
Mihail
The feature you've mentioned is better to be done within plugin aspect using Actions. You just add an action to editor popup menu and assign a shortcut to it (AFAIR, in 2.0 you can do it directly in action itself). In action, you just show the popup.
See ShowParameters action to find out how we've done it in a similar case (showing parameters of a method in a method call)&
Regards,
Mihail
Now that it will be in IDEA, it's time to study it again.
Still, I'd like to put some "comments" to the concepts..and only then to show them. E.g. how to "comment" enum elements? No idea..
As a starting point you can use jetbrains.mps.baseLanguage.javadoc language - currently existing language for documenting java.