ICodeLocationAware documentation

Hello, guys ! Where can i get documentation on subject ? Where can i get docs on other concepts and other stuff ? It seems there are official docs only on general principles etc. :-(
Is that forum read by JetBrains' employees ?
Ok, sorry for mine misunderstanding. ICodeLocationAware is no way a marker interface i.e. it has no special meaning unlike for example INamedConcept, am i right ?
Are you using mbeddr? We have an interface which is called ICodeLocationAware. I never came across one in MPS itself... In case you are I can help you :-)

PS: Yes this forum is read by the MPS team
Oh yeah, completely foolish mistake ! I'm sure i've seen that the concept is in com.mbeddr.core but have forgotten about that. My bad. Yes, I've started to go through mbeddr's User Guide. The first thing that made me scratch my had was something like hash code in report's output coming after report's number ("$$hello: Hello (who=World) @HelloWorld:main:0#5547256265962754822"). By digging into the concept code i came to that this "hash code" is made by SNode's getId(). What is this function ?
In the initNodeID()'s code, what is this/.getId() notation ? I mean, what does /. part mean ?
Sorry if i ask general not mbeddr's specific questions.
In MPS every node has a unique ID which can be used to identify this node within the containing model. We use this functionality to trace back to the report statement (or any other code) which caused the message (In some cases the implementation is not yet finished and we end up in some generator, but we are working on that)

The / operator is a downcast operator. Typically you write code on MPS' node API. There you get code completion for all elements which have been declared in the concept. In some cases you need however to go down to MPS underlying data structure. (E.g when you want to get access to the node's ID) In those cases you can use the / operator which will transform an node<...> into an SNode.

Hope that helps :-)
Thank you very much !

And one little itch.
In some cases the implementation is not yet finished and we end up in some generator, but   we are working on that

Do you mean your own generator for unique identifiers, not generator in MPS sense ?
No. In the Analyze Menu you can find an option called "mbeddr Analyze Error Output". If you paste a mbeddr log output there it will show you where the error is coming from. In some cases this does not point into your code but into some of our MPS generators. This is obviously a bug. The same can happen if you run an mbeddr binary in MPS. On the console in MPS you see the output of that program with some hyperlinks behind it. Those are supposed to go into the user-written code as well but, again, in some cases they end up in one of our MPS generators.
Maybe i'm asking for a too complicated answer for a newbie like me but why does this happen ?
No, it is nice that you are taking the time :-)

This is because we haven't fully used the interface ICodeLocationAware. This interface is supposed to store the original code location. So everywhere in the generator where we produce some kind of output we should actually pass the original code to the log statement. Because we introduced that interface not so long ago and haven't had the time yet to look through all of our generators (or just missed some statements) this bug exists. So it is not a general problem but just a matter of time.

May I ask what you are doing / planning to do with mbeddr?

BTW: If you have more questions regarding mbeddr you can contact us in our google group or me directly via bernd dot kolb at gmail dot com
Well, with big regrets, but i don't have any particular purpose in mind. I
do this just because i think MPS approach seems to be the future to me. And
i'm of cause a big fan of extensible programming (Still i can't say i'm
fully devoted to Language Oriented Programming in the Intentional Software
sense  - though it also seems to be promising, and i'm not fully into
building small DSL for each problem).
And thanks of course for your help offer.

Please sign in to leave a comment.