Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding assignment of variables #5

Open
ptijsma opened this issue Jul 7, 2019 · 0 comments
Open

Adding assignment of variables #5

ptijsma opened this issue Jul 7, 2019 · 0 comments

Comments

@ptijsma
Copy link

ptijsma commented Jul 7, 2019

Hi Waldo,

When investigating the UsedBy, it adds the SourceCodeToken element where it nicely shows where the particular searched element is used in code, but it would be a great addition to also list the variable or field a certain field or parameter is assigned to.

For example:

"UsedInSourceCodeToken":  {
                                      "CodeModel":  "NavModelToolsAPI.Model.CodeModel",
                                      "ParentElement":  "Page\u003cTEST Code List Page\u003e.\u003cOnAfterGetRecord\u003e",
                                      "TokenID":  22,
                                      "C_TokenID":  0,
                                      "C_Level":  0,
                                      "WithContext":  "",
                                      "Token":  43,
                                      "Length":  4,
                                      "LineNo":  3,
                                      "BeginPos":  27,
                                      "IsWhiteSpace":  false,
                                      "EndPos":  31,
                                      "Value":  "Code",
                                      "ReferenceElement":  "Table\u003cTEST Code List\u003e.Field\u003cCode\u003e",
                                      "VariableElement":  "Page\u003cTEST Code List Page\u003e.\u003cOnAfterGetRecord\u003e.Variable\u003cTESTCodeList\u003e",
                                      "UsingElement":  "Table\u003cTEST Code List\u003e.Field\u003cCode\u003e",
                                      "TokenType":  1,
                                      "IsKeyword":  false,
                                      "IsIdentifier":  true,
                                      "SpaceBeforeString":  null,
                                      "IsHyperLink":  false,
                                      "KnowledgeBaseUrl":  null,
                                      "ToolTip":  null,
                                      "ForeColor":  "Black"
                                  },

This shows the ReferenceElement and UsingElement (which always seem to be the same by the way, not sure what's the difference), but this is the element being investigated. It also shows exactly where in the code it is used (Line No., BeginPos etc.)
It would be great if it could show to wich variable it has been assigned to (for nested Where-used loops)

OnAfterGetRecord()
TESTCodeList.GET("Code List Code");
SomeName := Name;
GlobalCode := TESTCodeList.Code; <--

I know, stupid example, but hey... You get the drift ;-)

Thanks,
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant