Inspect ConceptFunction parameters at runtime??

Hi,

it's possibile to inspect concept function parameters at runtime?
For example parameters like genContext, editorContext, childNode, parentNode, link ecc?
I'm studing MPS and while it's possible to look at the definition of these functions and parameters it's not clear at first their value at runtime.

I tried with a breakpoint :-) but it does not work as I expected.
Then I tried an sout/println statement but I have not seen any output.

Thx,
Mar
4 comments
To trace your programs, you should try using the logging language - https://confluence.jetbrains.com/display/MPSD32/Logging
0
Thanks! It works, however even if I use the SNodeOperations.getDebugText() (I have not found nothing better)
the message for example for a node, on the Messages tab is not very usefull.

My approach was similar to the approach one can use when developing in Java: if you don't know what a method receives you can put a breakpoint on that method and inspect parameters and local vars.
Let's say... scopes, the reference scope function has many arguments: exists, referenceNode, contextNode, containingLink, linkTarget, operationContext, enclosingNode, model, position, contextRole

So the question is: in case of missing documentation there is a suggested technic to try to figure out the possibilities that the framework offer?

Thx,
Mar
0
I personally look at the usages of the concept function in the platform code base. Most parameters are used across the MPS code base, the others could probably be deprecated. Use Find Usage with search scope global (Find Usage Settings).  

The best source of documentation, other than that is in the MPS source code, open the MPS project with Idea and look at the javadoc  in the implementation. Not ideal, and I would personally really like an easier way to find this information.
0
You have probably noticed the parameter descriptions in the Inspector window for many concept functions in MPS, but I'm mentioning this for completeness. It is not ideal, but helps, I think.
0

Please sign in to leave a comment.