Home > Navigation > Navigation between expressions of the parsed source tree

Navigation between expressions of the parsed source tree

August 31st, 2011

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.

Expressions are strings, numbers, identifier references, binary operations, method calls and others. You can take an overview of expressions for the current source tree, using the Expression Lab DXCore plug-in. The feature may be useful for plug-in developers as well as users, reviewing the code and editing some its parts, such as an XML Doc comments.

You can move in both directions between expressions: forward and backward. There are corresponding shortcuts to move in these directions:

  • Ctrl+Alt+Tab and Tab to move to the next expression
  • Ctrl+Shift+Alt+Tab and Shift+Tab to move to the previous expression

The feature was widely available via the simple shortcuts like Tab (to move forward) and Shift+Tab (to move backward). However, when the Tab to Next Reference feature appeared, which is bound to the same shortcuts (Tab and Shift+Tab), then the Expression Focus become less important, and the availability of its shortcuts has been reduced by changing its context. Currently, the feature is mostly available inside XML Doc comments. So, it allows you to easily edit XML API documentation like this (the special Key Watcher tool window plug-in shows my key presses):

CodeRush Expression Focus preview

To change the default key bindings, go to the Shortcuts options page and tweak them inside the Navigation | Structure folder:

CodeRush Navigation Structure Shortcuts options page

Or you can create your own shortcuts and assign them to the ExpressionFocusNext and ExpressionFocusPrev actions.

Products: CodeRush Pro
Versions: 11.1 and up
VS IDEs: any
Updated: Sep/02/2011
ID: C126

Similar Posts: