Hide-show - ECB - the Emacs Code Browser
Description: ECB - the Emacs Code Browser

Next: Window-managers and ECB, Previous: Non-semantic sources, Up: Common use-cases

### 10.14 Using hide-show from the methods-buffer-menu

The popup-menu of the Methods-buffer offer two entries for either hiding or showing the block which is related to the selected tag (that tag for which the popup-menu was opened):

- “Jump to tag and hide block”: Jumps to the tag and calls `hs-hide-block` from the hideshow-library which is shipped with (X)Emacs. After that the block is hidden, i.e. only the header-line of that tag (method, variable etc.) is visible, the rest is hidden behind the “...”.
- “Jump to tag and show block”: Jumps to the tag and calls `hs-show-block`. This shows the related hidden block if the block was hidden via `hs-hide-block` or the menu-entry “Jump to tag and hide block” (s.a.).

For this feature the library `hideshow.el` is used which should normally being included in the (X)Emacs-distribution. If this library is not loaded into Emacs, ECB does this automatically before the first call to one of these menu-entries.

IMPORTANT: If in some `major-mode` hiding and showing does not work as you expect it to work then you must probably add an entry for this `major-mode` to the hideshow-variable `hs-special-modes-alist`. See the documentation of this variable for further details. One example of such a `major-mode` is `jde-mode` of the Java Development Environment JDEE; just add an entry for it like the already contained entries for `c++-mode` or `java-mode` and hiding and showing will work for you with JDEE too.