Node:ecb-methods, Next:, Previous:ecb-sources, Up:Customizable options



Group ecb-methods

This group contains the following options:

auto-expand-token-tree User Option
Expand the methods-token-tree automatically if node invisible.

This option has only an effect if option ecb-highlight-token-with-point is switched on too. There are three possible choices:

  • nil: No auto. expanding of the method buffer.
  • expand-spec: Auto expand the method-buffer nodes if the node belonging to current token under point is invisible because its parent-node is collapsed. But expanding is only done if the type of the token under point in the edit-buffer is contained in ecb-methods-nodes-expand-spec.
  • all: Like expand-spec but expands all tokens regardless of the setting in ecb-methods-nodes-expand-spec.

This options takes only effect for semantic-sources - means sources supported by semantic!

auto-update-methods-after-save User Option
Automatically updating the ECB method buffer after saving a source.

bucket-token-display User Option
How ECB displays bucket tokens in the ECB methods buffer. Bucket tokens are tokens like "[+] Variables", "[+] Dependencies" etc. The name of the bucket-token comes from semantic but you can define a prefix, a suffix and a special face for the bucket token.

The default are empty prefix/suffix-strings and 'ecb-bucket-token-face'. But an alternative can be for example ("[" "]" nil) which means no special face and a display like "[+] [<bucket-name>]".

This options takes only effect for semantic-sources - means sources supported by semantic!

exclude-parents-regexp User Option
Regexp which parent classes should not be shown in the methods buffer (see also ecb-show-parents). If nil then all parents will be shown if ecb-show-parents is not nil.

This options takes only effect for semantic-sources - means sources supported by semantic!

expand-methods-switch-off-auto-expand User Option
Switch off auto expanding in the ECB-method buffer. If on then auto expanding is switched off after explicit expanding or collapsing by ecb-expand-methods-nodes.

This is done with ecb-toggle-auto-expand-token-tree so after the switch off the auto expanding feature can again switched on quickly.

But after explicitly expanding/collapsing the methods-buffer to a certain level the auto. expanding could undo this when the node belonging to current token under point in the edit-window is invisible after ecb-expand-methods-nodes - then the auto. expand feature would make this node immediately visible and destroys the explicitly set expand-level.

font-lock-tokens User Option
Adds font-locking (means highlighting) to the ECB-method buffer.

This options takes only effect for semantic-sources - means sources supported by semantic!

highlight-token-with-point User Option
How to highlight the method or variable under the cursor.
  • highlight-scroll: Always scroll the method buffer, so the current method of the edit-window is highlighted in the method-window.
  • highlight: Only highlight the current method of the edit window in the method window if the method is visible in the method-window.
  • nil: No highlighting is done.

See also ecb-highlight-token-with-point-delay.

This options takes only effect for semantic-sources - means sources supported by semantic!

highlight-token-with-point-delay User Option
Time Emacs must be idle before current token is highlighted. If nil then there is no delay, means current token is highlighted immediately. A small value of about 0.25 seconds saves CPU resources and you get even though almost the same effect as if you set no delay. But such a delay prevents also "jumping backward/forward" during scrolling within java-classes if point goes out of method-definition into class-definition. Therefore the default value is a delay of 0.25 seconds.

This options takes only effect for semantic-sources - means sources supported by semantic!

methods-buffer-after-create-hook User Option
Local hook running after the creation of the methods-buffer. Every function of this hook is called once without arguments direct after creating the methods-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings only for the methods-buffer of ECB.

methods-buffer-name User Option
Name of the ECB methods buffer. Because it is not a normal buffer for editing you should enclose the name with stars, e.g. " *ECB Methods*".

If it is necessary for you you can get emacs-lisp access to the buffer-object of the ECB-methods-buffer by this name, e.g. by a call of set-buffer.

Changes for this option at runtime will take affect only after deactivating and then activating ECB again!

methods-menu-sorter User Option
Function which re-sorts the menu-entries of the directories buffer.

If a function then this function is called to sort the menu-entries of the combined menu-entries of the user-menu-extensions of ecb-methods-menu-user-extension and the built-in-menu ecb-methods-menu. If nil then no special sorting will be done and the user-extensions are placed in front of the built-in-entries.

For the guidelines for such a sorter-function see ecb-directories-menu-sorter.

methods-menu-user-extension User Option
User extensions for the popup-menu of the methods buffer.

For further explanations see ecb-directories-menu-user-extension.

The node-argument of a menu-function contains as data the semantic-token of the method/variable/token for which the popup-menu has been opened.

Per default the user-extensions are added at the beginning of the built-in menu-entries of ecb-methods-menu but the whole menu can be re-arranged with ecb-methods-menu-sorter.

If you change this option you have to restart ECB to take effect.

methods-nodes-collapse-spec User Option
Semantic token-types collapsed by ecb-expand-methods-nodes. For valid values of this option see ecb-methods-nodes-expand-spec!

This options takes only effect for semantic-sources - means sources supported by semantic!

methods-nodes-expand-spec User Option
Semantic token-types expanded by ecb-expand-methods-nodes.

The value of this option is either the symbol all (all tokens are expanded regardless of their type) or a list of symbols where each symbol is a valid semantic token-type. For a description of semantic token types see option ecb-show-tokens.

But this option also defines if bucket-nodes in the ECB-method-buffer (e.g. "[Variables]") should be expanded. Therefore valid symbols for this list are also all cars of the variable semantic-symbol->name-assoc-list.

If there is a bucket-name (the node-name stripped of the settings in ecb-bucket-token-display) which is not contained as cdr in semantic-symbol->name-assoc-list then the symbol with this bucket-name as name is also a valid symbol for this list. Example: In ECB there are buckets "[Parents]". The bucket-name is "Parents" and the valid symbol-name is then Parents.

This options takes only effect for semantic-sources - means sources supported by semantic!

post-process-semantic-tokenlist User Option
Define mode-dependent post-processing for the semantic-tokenlist. This is an alist where the car is a major-mode symbol and the cdr is a function-symbol of a function which should be used for post-processing the tokenlist (returned by semantic-bovinate-toplevel) for a buffer in this major-mode. Such a function is called with current semantic tokenlist of current buffer and must return a valid tokenlist again.

For oo-programming languages where the methods of a class can be defined outside the class-definition (e.g. C++, Eieio) the function ecb-group-function-tokens-with-parents can be used to get a much better method-display in the methods-window of ECB, because all method implementations of a class are grouped together.

This options takes only effect for semantic-sources - means sources supported by semantic!

show-only-positioned-tokens User Option
Show only nodes in the method-buffer which are "jump-able". If not nil then ECB displays in the method-buffer only nodes which are "jump-able", i.e. after selecting it by clicking or with RET then ECB jumps to the corresponding location in the edit-window. Example: With CLOS or Eieio source-code there can exist some position-less nodes like variable-attributes in a defclass form which are only displayed if this option is nil. Displaying such nodes can be senseful even if they can not be jumped.

This options takes only effect for semantic-sources - means sources supported by semantic!

show-tokens User Option
How to show tokens in the methods buffer first time after find-file. This variable is a list where each element represents a type of tokens:
(<token type> <display type> <sort method>)

The tokens in the methods buffer are displayed in the order as they appear in this list.

<token type>
A Semantic token type symbol (function, variable, rule, include etc.) or one of the following:
  • t: All token types not specified anywhere else in the list.
  • parent: The parents of a type.

<display type>
A symbol which describes how the tokens of this type shall be shown:
  • expanded: The tokens are shown in an expanded node.
  • collapsed: The tokens are shown in a collapsed node.
  • flattened: The tokens are added to the parent node.
  • hidden: The tokens are not shown.

<sort method>
A symbol describing how to sort the tokens of this type:
  • name: Sort by the token name.
  • access: Sort by token access (public, protected, private) and then by name.
  • nil: Don't sort tokens. They appear in the same order as in the source buffer.

This options takes only effect for semantic-sources - means sources supported by semantic!

token-display-function User Option
Function to use for displaying tokens in the methods buffer. This functionality is set on major-mode base, i.e. for every major-mode a different function can be used. The value of this option is a list of cons-cells:
  • The car is either a major-mode symbol or the special symbol 'default which means if no function for a certain major-mode is defined then the cdr of the 'default cons-cell is used.
  • The cdr is the function used for displaying a token in the related major-mode.

Every function is called with 3 arguments:

  1. The token
  2. The parent-token of token (can be nil)
  3. The value of ecb-font-lock-tokens.

Every function must return the display of the token as string, colorized if the third argument is not nil.

The following functions are predefined:

  • All functions of semantic-token->text-functions.
  • For every function in semantic-token->text-functions with name "semantic-XYZ" a function with name "ecb-XYC" is predefined. The differences between the semantic- and the ECB-version are:
    • The ECB-version displays for type tokens only the type-name and nothing else (exception: In c++-mode a template specifier is appended to the type-name if a template instead a normal class).
    • The ECB-version displays type-tokens according to the setting in ecb-type-token-display. This is useful for better recognizing different classes, structs etc. in the ECB-method window.

    For all tokens which are not types the display of the ECB-version is identical to the semantic version. Example: For semantic-name-nonterminal the pendant is ecb-name-nonterminal.

This functionality also allows the user to display tokens as UML. To enable this functionality set the function for a major-mode (e.g. jde-mode) to semantic-uml-concise-prototype-nonterminal, semantic-uml-prototype-nonterminal, or semantic-uml-abbreviate-nonterminal or the ECB-versions of these functions.

If the value is nil, i.e. neither a function for a major-mode is defined nor the special 'default, then semantic-prototype-nonterminal is used for displaying the tokens.

This options takes only effect for semantic-sources - means sources supported by semantic!

token-jump-sets-mark User Option
Set the mark after jumping to a token from the ECB-method buffer. If set the user can easily jump back.

token-visit-post-actions User Option
Actions to perform after visiting a token from the Method-buffer. With this option actions can be added which will be performed after visiting the start of the token in the source-buffer.

This functionality is set on a major-mode base, i.e. for every major-mode a different setting can be used. The value of this option is a list of cons-cells:

  • The car is either a major-mode symbol or the special symbol 'default.
  • The cdr is a list of action-functions or nil.

ECB first performs all actions defined for the special symbol 'default (if any) and then all actions defined for current major-mode (if any).

ECB offers some predefined senseful action-functions. Currently there are: ecb-token-visit-highlight-token-header ecb-token-visit-smart-token-start ecb-token-visit-recenter ecb-token-visit-recenter-top ecb-token-visit-goto-doc-start ecb-token-visit-narrow-token See the documentation of these function for details what they do.

But you can add any arbitrary function if the following conditions are fulfilled: The function gets the semantic token as argument returns the (new) point after finishing its job.

type-token-display User Option
How to display semantic type-tokens in the methods buffer. Normally all token displaying, colorizing and facing is done by semantic according to the value of semantic-face-alist and the semantic display-function (e.g. one from semantic-token->text-functions). But sometimes a finer distinction in displaying the different type specifiers of type-tokens can be useful. For a description when this option is evaluated look at ecb-token-display-function!

This functionality is set on a major-mode base, i.e. for every major-mode a different setting can be used. The value of this option is a list of cons-cells:

  • The car is either a major-mode symbol or the special symbol 'default which means if no setting for a certain major-mode is defined then the cdr of the 'default cons-cell is used.
  • The cdr is a list of 3-element-lists:
    1. First entry is a semantic type specifier in string-form. Current available type specifiers are for example "class", "interface", "struct", "typedef" and "enum". In addition to these ones there is also a special ECB type specifier "group" which is related to grouping tokens (see ecb-post-process-semantic-tokenlist and ecb-group-function-tokens-with-parents). Any arbitrary specifier can be set here but if it is not "group" or not known by semantic it will be useless.
    2. Second entry is a flag which indicates if the type-specifier string from (1.) itself should be removed (if there is any) from the display.
    3. Third entry is the face which is used in the ECB-method window to display type-tokens with this specifier. ECB has some predefined faces for this (ecb-type-token-class-face, ecb-type-token-struct-face, ecb-type-token-typedef-face, ecb-type-token-enum-face and ecb-type-token-group-face) but any arbitrary face can be set here. This face is merged with the faces semantic already uses to display a token, i.e. the result is a display where all face-attributes of the ECB-face take effect plus all face-attributes of the semantic-faces which are not set in the ECB-face (with XEmacs this merge doesn't work so here the ECB-face replaces the semantic-faces; this may be fixed in future versions).

The default value is nil means there is no special ECB-displaying of type-tokens in addition to the displaying and colorizing semantic does. But a value like the following could be a useful setting:

((default
   ("class" t ecb-type-token-class-face)
   ("group" nil ecb-type-token-group-face))
 (c-mode
  ("struct" nil ecb-type-token-struct-face)
  ("typedef" nil ecb-type-token-typedef-face)))

This means that in c-mode only "struct"s and "typedef"s are displayed with special faces (the specifiers itself are not removed) and in all other modes "class"s and grouping-tokens (see ecb-token-display-function, ecb-group-function-tokens-with-parents) have special faces and the "class" specifier-string is removed from the display.

This options takes only effect for semantic-sources - means sources supported by semantic!