1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<html lang="en">
<head>
<title>ECB - the Emacs Code Browser</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name=description content="ECB - the Emacs Code Browser">
<meta name=generator content="makeinfo 4.2">
<link href="http://www.gnu.org/software/texinfo/" rel=generator-home>
</head>
<body>
<p>
Node:<a name="Filtering%20Methods">Filtering Methods</a>,
Previous:<a rel=previous accesskey=p href="Filtering-History.html#Filtering%20History">Filtering History</a>,
Up:<a rel=up accesskey=u href="Filtering-the-tree-buffers.html#Filtering%20the%20tree-buffers">Filtering the tree-buffers</a>
<hr><br>
<h4>Applying filters to the Methods-buffer</h4>
<p>The commands <code>ecb-methods-filter</code>,
<code>ecb-methods-filter-regexp</code>,
<code>ecb-methods-filter-protection</code>,
<code>ecb-methods-filter-tagclass</code>,
<code>ecb-methods-filter-function</code>,
<code>ecb-methods-filter-delete-last</code>,
<code>ecb-methods-filter-nofilter</code> 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.
<h5>Possible filter-criterias</h5>
<ul>
<li>Filter by protection:
Just insert the protection you want the Methods-buffer being filtered:
private, protected or public! For sources not supported by semantic
the protection filter will not be offered because these informations
are not available for such sources.
<li>Filter by regexp:
Insert the filter as regular expression.
<li>Filter by tag-class:
You can filter by tag-classes. The popup-menu contains mode-dependend
tag-filter entries and the command <code>ecb-methods-filter</code> offers
only the tag-classes of the current mode. This means for sources not
supported by semantic the tag-class filter will not be offered. And
for semantic-supported sources exactly these tag-classes are offered
the semantic-parser for the current major-mode offers. For example
texi-sources can only be filtered by the tag-classes "Definitions"
and "Sections" and java-sources can be filtered by "Methods",
"Variables", "Classes" etc. In general the semantic-variable
<code>semantic-symbol->name-assoc-list</code> is used to get the right
tag-classes.
<li>Filter by a filter-function:
Such a function gets two arguments: a tag and the source-buffer of
this tag. If the tag should be displayed (i.e. not being filtered out)
then the function has to return not nil otherwise nil.
<li>No special filter:
This means to display all tags specified with the option
<code>ecb-show-tokens</code>. If currently some of the above filters are
applied they will be all removed.
<li>Delete the last added:
This removes only the topmost filter-layer, means that filter added
last.
</ul>
<p>Be aware that the tag-list specified by the option
<code>ecb-show-tags</code> 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!
<p>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.
<p>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 <a href="Non-semantic-sources.html#Non-semantic%20sources">Non-semantic sources</a> for further details about working with
source-files not supported by the semantic-parser.
<h5>Inverse Filters</h5>
<p>But if <code>ecb-methods-filter</code> is called with a prefix-argument then
an inverse filter is applied to the Methods-buffer, i.e. all tags
which do <strong>NOT</strong> match the choosen filter will be displayed in
the Methods-buffer!
<h5>Layered filters</h5>
<p>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
<code>ecb-methods-filter-replace-existing</code>.
<h5>Display of currently applied filters</h5>
<p>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.
<h5>Default filters for certain files.</h5>
<p>The new option <code>ecb-default-tag-filter</code> 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 <code>ecb-methods-filter</code> 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.
<p>Usage-example: This can be used to display in outline-mode files (e.g.
<code>NEWS</code>) only the level-1-headings by defining a filter regexp
"^\* .*".
</body></html>
|