Folding and Unfolding Source Code

Focus your attention on a particular method or function in source code by hiding the other parts of the source code.

bullet
To fold and unfold source code
  1. With a source file open, click anywhere in the source code.

  2. Choose Editor > Code Folding > Fold Methods & Functions.

  3. Navigate to the method you want to unfold.

  4. Double-click the ellipsis button to unfold the method.

    ../Art/code_folding_1_2x.png
  5. Use the focus ribbon to select the method’s scope.

    ../Art/code_folding_2_2x.png
  6. Click in the focus ribbon to fold the method.

The Code Folding submenu provides several options for folding and unfolding code.

The focus ribbon is located between the editor gutter and the source code. Move the pointer into the focus ribbon to display a scope in the focus box. Then click in the focus ribbon to fold the code in scope.