| 1679 | } |
| 1680 | |
| 1681 | bool UICodeEditor::toggleFoldUnfold( Int64 docLineIdx ) { |
| 1682 | if ( mDoc->getFoldRangeService().isFoldingRegionInLine( docLineIdx ) ) { |
| 1683 | sendCommonEvent( Event::OnBeforeFoldUnfoldRange ); |
| 1684 | if ( mDocView.isFolded( docLineIdx ) ) { |
| 1685 | mDocView.unfoldRegion( docLineIdx ); |
| 1686 | } else { |
| 1687 | mDocView.foldRegion( docLineIdx ); |
| 1688 | } |
| 1689 | return true; |
| 1690 | } |
| 1691 | return false; |
| 1692 | } |
| 1693 | |
| 1694 | void UICodeEditor::foldAll() { |
| 1695 | sendCommonEvent( Event::OnBeforeFoldUnfoldRange ); |
no test coverage detected