Node:Filtering Methods, Previous:Filtering History, Up:Filtering the tree-buffers



Applying filters to the Methods-buffer

The commands ecb-methods-filter, ecb-methods-filter-regexp, ecb-methods-filter-protection, ecb-methods-filter-tagclass, ecb-methods-filter-function, ecb-methods-filter-delete-last, ecb-methods-filter-nofilter allows to filter the tags/nodes of the Methods-buffer by several criterias. As for the Sources- and the History-buffer the same functionality is also available via the popup-menu of the Methods-buffer.

Possible filter-criterias

Be aware that the tag-list specified by the option ecb-show-tags is the basis of all filters, i.e. tags which are excluded by that option will never be shown regardless of the filter type here!

All tags which match the applied filter(s) will be displayed in the Methods-buffer. Such a filter is only applied to the current source-buffer, i.e. each source-buffer can have its own tag-filters.

These tag-filters can also applied to sources which are not supported by the semantic-parser but "only" by imenu or etags. But because for these sources not all information are avaiable the protection- and tag-class filter are not offered with such "non-semantic"-sources. See Non-semantic sources for further details about working with source-files not supported by the semantic-parser.

Inverse Filters

But if ecb-methods-filter is called with a prefix-argument then an inverse filter is applied to the Methods-buffer, i.e. all tags which do NOT match the choosen filter will be displayed in the Methods-buffer!

Layered filters

Per default the choosen filter will be applied on top of already existing filters. This means that filters applied before are combined with the new filter. This behavior can changed via the option ecb-methods-filter-replace-existing.

Display of currently applied filters

The current active filter will be displayed in the modeline of the Methods-buffer [regexp, prot (= protection), tag-class, function (= filter-function)]. If an inverse filter has been applied then this is signalized by a preceding caret ^. If currently more than 1 filter is applied then always the top-most filter is displayed in the modeline but the fact of more than 1 filter is visualized by the number of the filters - included in parens. You can see all currently applied filters by moving the mouse over the filter-string in modeline of the Methods-buffer: They will displayed as help-echo.

Default filters for certain files.

The new option ecb-default-tag-filter allow to define default tag-filters for certain files which are applied automatically after loading such a file into a buffer. The possible filters are the same as offered by the command ecb-methods-filter and they are applied in the same manner - the only difference is they are applied automatically. The files can be specified on a combined major-mode- and filename-regexp-basis.

Usage-example: This can be used to display in outline-mode files (e.g. NEWS) only the level-1-headings by defining a filter regexp "^\* .*".