Code Places
- 4 minutes to read
This topic describes the Code Places feature. This feature helps you find your way in large code bases and explore an unfamiliar code.
Note
You can configure the Code Places feature in the Navigation | Code Places options page. See the Code Places Settings for more information.
How to Enable
Code Places is initially turned off. To enable it:
use the Navigation | Code Places options page;
or
the CodeRush Visualize toolbar.
Code Places Window
CodeRush displays type declarations (class, interfaces, delegates, enums), members of the corresponding type declarations (methods, properties, events), and regions contained in an opened cs., vb., ts. or js. file in the Code Places window. This window contains the following tabs:
- File Places
Visualizes types and members for the opened file.
- History
Displays types and members changed for the opened file.
- Global History
Displays information about types and members changed in all files.
- Favorites
Displays favorite code places.
Note
CodeRush stores information about edited members and types while the solution is open. You can reopen an edited file and see the members and types in the History and Global History tabs. Favorite code places are saved between sessions in the Favorites tab.
Code Places are fully synchronized with the code editor. When you change the code (add, remove or replace a member) CodeRush updates the code places list accordingly in the File Places tab.
Note
You can use Collapse All/Expand All buttons in the Code Places window to collapse or expand all the code places and the corresponding members in the code editor.
Track Your Changes
CodeRush marks changed members with the “clock” icon. You can see the “clock” icon in File Places and History tabs once you make a change in an active file.
The “clock” icon brightness helps you understand how much time has passed since you changed a code place in a file. For example, the most bright colors have the last edited members.
Drag & Drop Support
The File Places tab of the Code Places window supports drag & drop to reorder members for the opened file. To change a member’s position, drag a member and drop it where you need it.
Navigate to Code Places
Navigate to Member Declaration
Open the Code Places window, and double-click the desired type member in the code places list. CodeRush moves the caret to the corresponding declaration and scrolls the view if necessary to show this code in the editor.
You can also navigate to a type member on a single click. Change the Navigate to the member setting to “Single click” on the Navigation | Code Places options page.
Navigate to Member Body
Open the Code Places window, hold the Alt key and click an item.
Filter Code Places
You can use the search field in each tab to find a specific member. CodeRush filters types and members as you type.
If you type uppercase characters, CodeRush searches for capitalized words within file names. Matched letters are blue.
Favorite Code Places
Right-click a member in the File Places tab.
Select Add to Favorites -> Add to new group in the invoked context menu.
Enter a group name in the New Favorites Group dialog and press Enter.
CodeRush marks the favorite code place with a star icon and adds the code place to the newly created favorite group in the Favorites tab.
You can also add code places to different favorites groups.
Right-click a code place in the File Places tab, and select the desired group in the Add to Favorites sub menu.
Filter Favorites
You can use the search field in the Favorites tab to find favorite code places. CodeRush filters types and members as you type.
Manage Favorites
Remove Code Place from Favorites
Right-click a code place in the File Places or Favorites tab, and select Remove from Favorites item in the invoked context menu.
Rename Group
Right-click a group and select Rename Group in the context menu.
Enter a new group name in the “Rename Favorites Group” dialog and click Enter.
Remove Group
Right-click a group name and select the Remove from Favorites item.
This action also removes all code places in a group.
Sort Code Places
You can sort code places by kind, accessibility, alphabetically, or you can combine these sorting criteria. Use the Sort Code Places option in the Navigation | Code Places options page to configure code places sorting.