DXCore Expression Lab tool window for observing the parsed source code trees
The Expression Lab is a DXCore diagnostic plug-in containing the tool window that displays the hierarchical abstract source tree built by the DXCore. This is useful to learn the structure of the parsed source code and created a source tree to build your own DXCore plug-ins. When you know the structure of the tree, you can build your own trees or its parts and generate the appropriate code for all programming languages supported by the DXCore. Also, you can see the set of properties each language element has, to learn more on how to construct any specific elements.
This is what the tool window look like:
On the left you can see the resulting hierarchical source tree of the active source file opened inside the IDE. The tree contains all language elements parsed by the DXCore and constructed into a single hierarchical tree. Each language element has its own icon to easier distinguish between them. You can collapse or expand nodes of the tree if necessary. By default, all nodes are collapsed, because too many nodes may distract from learning the specific parts of the source tree. If you would like to see a part of the tree for the specific source code, click inside the code editor and the Expression Lab will expand the appropriate nodes automatically, then select the part of the tree that represents the selected piece of code.
On the right side of the window, you can see the grid with the properties of the selected language element. The grid, containing the properties, can be categorized, either where properties are grouped by its categories, or listed alphabetically as a plain list. To toggle the view, click the corresponding button above the grid. On top of the properties grid, you can see the element type of the selected language element. Under the grid, you can see the name of the property and its description.
The toolbar has several buttons that toggle different options of the Expression Lab window. Here they are:
|Show/hide property grid||Toggles the visibility of the properties grid on the right part of the tool window.|
|Show Comments||Toggles the visibility of the parsed code comments in the hierarchical source tree.|
|Show XML Doc Comments||Toggles the visibility of the parsed XML Doc comments in the hierarchical source tree.|
|Show Attributes||Toggles the visibility of the parsed code attributes in the hierarchical source tree.|
|Show detail nodes||Toggles the visibility of the detail nodes. Details nodes are language elements that do not represent the body of an element but its important characteristics. For example, if you have a conditional statement, its expression is a detail node, and its content is represented by language element nodes. Detail nodes are rendered with blue text in the tree.|
|Select code on click||Toggles the ability to select the source code inside the code editor when you click on the nodes of the hierarchical source tree.|
|Track Caret||Toggles the ability to expand the hierarchical source tree nodes automatically once the editor caret position is changed.|
|Validate parse tree||Validates the hierarchical source tree for corrupted nodes. Shows a message box with the results of the validation.|
And, the last capability for this window is that you can check how much memory is allocated to any part of the hierarchical source tree. To check that, click the Enabled checkbox below the source tree near the Memory Used label, and you will see the amount of memory used to store language elements for the selected part of the source tree.
Also, there is the RunExpressionLab action, to show the tool window using the keyboard shortcut. By default, this action is not bound to any shortcut. You can do this yourself if you plan to use the Expression Lab window while developing DXCore plug-ins.—– Products: DXCore Versions: 11.1 and up VS IDEs: any Updated: Aug/16/2011 ID: D107