Getting Variable Information from the Symbol table

I am breaking this into a new thread because the issues here are specific to variables. In the same way that I pulled out the buffers from getAllSymbolsDeep(), I have now pulled out the variables and have figured out:
mobSymbol:fullName() and mobSymbol:getName() seem to be the same in all cases.
mobSymbol:getNumReads() and mobSymbol:getNumWrites() are very handy and will save me a lot of work
mobSymbol:isImported() means it is shared, but not new shared
mobSymbol:isExported() means it is new shared or new shared global
mobSymbol:getAsNode() <> ? and mobSymbol:getLikeNode() <> ? let me know if it is an AS or LIKE definition
mobVariable = cast( mobSymbol, Variable ). and mobVariable:getDataType():getProgressName() give me the datatype either way! (nice)
Which is most of what I want.

I don't yet see a way to tell if it is new shared global vs new shared unless it would be to actually traverse to the getDefineNode and parse that from scratch.

And, I am guessing that the way to determine what it is defined LIKE would be to navigate to the getLikeNode(), but I haven't tried that yet.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tamhas's picture

OK, got the LIKE

OK, got the LIKE with:
mobSymbol:getLikeNode():firstChild():firstChild():getText()

So, my one big hole here is new shared vs new shared global.