Archive

Posts Tagged ‘Source Tree’

Navigation between expressions of the parsed source tree

August 31st, 2011 Comments off

After DXCore has parsed the source code and built an abstract source tree for the active source file, you can navigate between its nodes and detail nodes by using the special navigation feature shipped with CodeRush. The feature is called the Expression Focus. It allows you to navigate between the smallest parts of the source tree – expressions.

Read more…

DXCore Expression Lab tool window for observing the parsed source code trees

August 16th, 2011 Comments off

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.

Read more…

DXCore – source code and source tree elements coordinate inside source files

May 27th, 2011 2 comments

Inside Visual Studio IDE, the source code text has its coordinates: the line number and the column:

Source code coordinates

Read more…

How to enumerate solution and source code items using DXCore

April 6th, 2011 Comments off

One of the trivial tasks when developing a DXCore plug-in is the enumeration of the active solution items, such as projects, source files, then interfaces, classes, methods, properties, statements, etc. A similar task is to get an active element (in other words, the element where the editor caret is located) inside the active source file to start working with one.

All of the items of the solution are represented by the DXCore classes, located in the “DevExpress.DXCore.Parser” assembly inside the “DevExpress.CodeRush.StructuralParser” namespace. Consider, we have a standard Visual Studio solution, DXCore uses the following classes to represent its hierarchy:

Read more…

DXCore abstract source tree structure

January 12th, 2011 Comments off

DXCore supports lots of programming languages provided by the language services in Visual Studio. These services provide language-specific support (such as CSharp, Visual Basic, C++) for editing source code in the integrated development environment (IDE). DXCore includes appropriate source code parsers for these programming languages. When the source code is parsed, DXCore builds an abstract syntax tree (AST) that is a representation of the syntactic structure of the source code of a particular programming language. This abstract syntax tree is unified for all languages supported by IDETools. That’s why it is easy to develop a language-independent feature as a DXCore plug-in – in most cases your feature will be available in all corresponding languages automatically.

Read more…