~ubuntu-branches/ubuntu/saucy/ecb/saucy

« back to all changes in this revision

Viewing changes to info-help/ecb.info-8

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-09-01 22:15:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040901221518-0jfdt2apb2rj69ey
Tags: 2.27-1
And include latest Upstream too...

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
END-INFO-DIR-ENTRY
7
7
 
8
8
 
 
9
File: ecb.info,  Node: ecb-non-semantic,  Next: ecb-winman,  Prev: ecb-speedbar,  Up: Customizable options
 
10
 
 
11
Group ecb-non-semantic
 
12
----------------------
 
13
 
 
14
This group contains settings for parsing and displaying non-semantic files:
 
15
 
 
16
 - User Option: auto-save-before-etags-methods-rebuild
 
17
   Automatic saving of current buffer before rebuilding its methods.
 
18
 
 
19
   This option is only relevant for sources which are supported and parsed by
 
20
   etags (see `ecb-process-non-semantic-files'). Because etags is an external
 
21
   tool a source-buffer can only be reparsed if the buffer is saved to disk.
 
22
   So the command `ecb-rebuild-methods-buffer' checks for sources which are
 
23
   not supported by semantic or imenu if either this option is t or if the
 
24
   major-mode of the source-buffer is contained in this list: In both cases
 
25
   ECB saves the current source-buffer before it re-runs etags for reparsing
 
26
   the source. If nil or if the major-mode is not contained then no automatic
 
27
   saving will be done!
 
28
 
 
29
   For all source supported by semantic or by imenu this option takes no
 
30
   effect.
 
31
 
 
32
 - User Option: non-semantic-exclude-modes
 
33
   Exclude modes from parsing with imenu or etags. Per default, ECB tries to
 
34
   parse all file-types not supported by semantic with imenu or etags or some
 
35
   other method (for details see the option
 
36
   `ecb-non-semantic-parsing-function'). If a file-type can not be parsed by
 
37
   semantic, imenu or etags than this simply results in an empty
 
38
   method-buffer for this file. But nevertheless you will get a message
 
39
   "Sorry, no support for a file of that extension" which comes from the
 
40
   speedbar-library and can not switched off. Therefore if a `major-mode' is
 
41
   known as not parse-able by semantic, imenu or etags it can be added to
 
42
   this option and then it will be excluded from being tried to parsed.
 
43
 
 
44
 - User Option: non-semantic-methods-initial-expand
 
45
   Initially expand all tags for not by semantic supported sources.  This
 
46
   option can be customized on a major-mode basis, i.e. if a `major-mode' is
 
47
   contained in this option then all tags for this modes will be initially
 
48
   expanded - otherwise not.
 
49
 
 
50
 - User Option: non-semantic-parsing-function
 
51
   Define mode-dependent parsing functions for non-semantic files. This is an
 
52
   alist where the car is a major-mode symbol and the cdr is a
 
53
   function-symbol of a function which should be used for parsing a
 
54
   non-semantic buffer, i.h. a buffer for which no semantic grammar exists.
 
55
   Such a function gets one argument - the filename of current buffer - and
 
56
   has to generate and return a tag/tag list which is understandable by
 
57
   `speedbar-insert-generic-list'. speedbar has already included two
 
58
   functions `speedbar-fetch-dynamic-imenu' and
 
59
   `speedbar-fetch-dynamic-etags' which can be used for parsing buffers with
 
60
   imenu rsp. etags.
 
61
 
 
62
   This option takes only effect if `ecb-process-non-semantic-files' is not
 
63
   nil: Then ECB checks for non-semantic buffers if current `major-mode' is
 
64
   contained in this option and if yes, then the specified parsing function
 
65
   is called; if not then the cars of the elements of
 
66
   `speedbar-dynamic-tags-function-list' are called in that sequence they are
 
67
   listed in this variable. See option `speedbar-dynamic-tags-function-list'
 
68
   for further details.
 
69
 
 
70
   In most cases imenu-parsing is preferable over etags-parsing because imenu
 
71
   operates on Emacs-buffers and needs no external tool and therefore parsing
 
72
   works also if current contents of a buffer are not saved to disk. But
 
73
   maybe sometimes etags may return better parsing results
 
74
 
 
75
   IMPORTANT: if imenu-parsing should be used then the option
 
76
   `speedbar-use-imenu-flag' must be set to not nil!
 
77
 
 
78
 - User Option: process-non-semantic-files
 
79
   Display content of non-semantic-files in the ECB-methods-buffer. See also
 
80
   `ecb-non-semantic-parsing-function'.
 
81
 
 
82
 - User Option: rebuild-non-semantic-methods-before-hook
 
83
   Hook running at beginning of the function
 
84
   `ecb-rebuild-methods-buffer-for-non-semantic'. This function is always
 
85
   called by the command `ecb-rebuild-methods-buffer' for not semantic
 
86
   supported source-types.
 
87
 
 
88
   Every function of this hook gets one argument: The complete filename of
 
89
   the current source-buffer in the edit-window. The Method-buffer is only
 
90
   rebuild by `ecb-rebuild-methods-buffer-for-non-semantic' if either the
 
91
   hook contains no function (the default) or if no function of this hook
 
92
   returns nil! See `run-hook-with-args-until-failure' for description how
 
93
   these function are processed.
 
94
 
 
95
 
 
96
File: ecb.info,  Node: ecb-winman,  Next: ecb-mode-line,  Prev: ecb-non-semantic,  Up: Customizable options
 
97
 
 
98
Group ecb-winman
 
99
----------------
 
100
 
 
101
This group contains settings for supporting several window-managers:
 
102
 
 
103
 - User Option: winman-escreen-number
 
104
   Number of the escreen which is reserved for ECB. If you go to the escreen
 
105
   with this number you go always to the escreen with activated ECB. All
 
106
   other escreen-numbers are escreens with deactivated ECB!
 
107
 
 
108
 - User Option: winman-winring-name
 
109
   Name of the winring-window-configuration reserved for ECB. If you go to
 
110
   the window-configuration with this name you go always to the
 
111
   window-configuration with activated ECB. All other window-configuration
 
112
   are configurations with deactivated ECB!
 
113
 
 
114
 
 
115
File: ecb.info,  Node: ecb-mode-line,  Prev: ecb-winman,  Up: Customizable options
 
116
 
 
117
Group ecb-mode-line
 
118
-------------------
 
119
 
 
120
This group contains settings for the modelines of the ECB-tree-buffers:
 
121
 
 
122
 - User Option: mode-line-data
 
123
   Data shown in the modelines of the special ECB-buffers. Everey element of
 
124
   this list is a cons-cell where the car is used to define a buffer-name and
 
125
   the cdr to define the modeline-data for that buffer.  For details about
 
126
   how to defining a buffer-name see `ecb-mode-line-prefixes' - its
 
127
   completely the same.
 
128
 
 
129
   The cdr is the data for ths modeline and can either be the symbol
 
130
   `sel-dir' or `sel-source' whereas the former one displays the current
 
131
   selected directory as modeline-data and the latter one the current
 
132
   selected source-file (without path).
 
133
 
 
134
   In addition to these two predefined values for every special ECB-buffer a
 
135
   plain string (which is displayed) or a function can be specified which
 
136
   gets three args (name of the buffer, current selected directory and
 
137
   current selected source-file) and must return a string which will be
 
138
   displayed in the modeline (or nil if no data should be displayed). Such a
 
139
   function can add the text-property `help-echo' to the result-string. Then
 
140
   this help-string will be displayed when the user moves the mouse over this
 
141
   section of the modeline.
 
142
 
 
143
   If a special ECB-buffer should not display special data in its modeline
 
144
   then this buffer-name should either not being added to this option or
 
145
   added with "No data" (= nil as cdr).
 
146
 
 
147
   The whole modeline of the special ECB-buffer consists of the prefix of
 
148
   `ecb-mode-line-prefixes' and the data of `ecb-mode-line-data' - eventually
 
149
   prepended by the window-number, see `ecb-mode-line-display-window-number'.
 
150
 
 
151
 - User Option: mode-line-data-face
 
152
   Face used for the data in the mode-line. See `ecb-mode-line-data'. For
 
153
   XEmacs the face should inherit from the face `modeline' (see
 
154
   `set-face-parent')!
 
155
 
 
156
 - User Option: mode-line-display-window-number
 
157
   Display in the modeline of every special ECB-window the window-number.
 
158
   The left-top-most window in a frame has the window-number 0 and all other
 
159
   windows are numbered with increasing numbers in the sequence, functions
 
160
   like `other-window' or `next-window' would walk through the frame.
 
161
 
 
162
   This can be used to jump to windows by number with commands like:
 
163
 
 
164
        (defun my-switch-to-window-number (number)
 
165
          ``Switch to the nth window''
 
166
          (interactive ``P'')
 
167
          (if (integerp number)
 
168
              (select-window (nth number (window-list)))))
 
169
 
 
170
   Currently this feature is only available for GNU Emacs 21.X, because
 
171
   neither GNU Emacs < 21 nor XEmacs can evaluate dynamically forms in the
 
172
   mode-line.
 
173
 
 
174
 - User Option: mode-line-prefixes
 
175
   Prefixes shown in the modelines of the special ECB-buffers. The displayed
 
176
   prefix then looks like: "[ <PREFIX>[: ]]", means if a prefix is defined
 
177
   for an special ECB-buffer then a single space is prepended and if there is
 
178
   additional text to display (e.g. the current directory in the sources
 
179
   buffer, see `ecb-mode-line-data') then also the string ": " is appended.
 
180
 
 
181
   Everey element of this list is a cons-cell where the car is used to define
 
182
   a buffer-name and the cdr to define the modeline-prefix for that buffer.
 
183
 
 
184
   The buffer-name can either be defined as plain string or with a symbol
 
185
   which contains the buffer-name as value. The latter one is recommended to
 
186
   define a prefix for one of the builtin ECB-tree-buffers because then
 
187
   simply the related option-symbol can be used. To add a prefix for the
 
188
   builtin directories tree-buffer just set the symbol
 
189
   `ecb-directories-buffer-name' as car.
 
190
 
 
191
   The cdr is the prefix for a buffer and can either be a string which used
 
192
   as it is or a function-symbol which is called with three argument (the
 
193
   buffer-name, the current selected directory and the current selected
 
194
   source-file) and must return either nil (for no prefix) or a string which
 
195
   is then used a prefix. Such a function can add the text-property
 
196
   `help-echo' to the result-string. Then this help-string will be displayed
 
197
   when the user moves the mouse over this section of the modeline.
 
198
 
 
199
   If a special ECB-buffer should not have a prefix in its modeline then this
 
200
   buffer-name should either not being added to this option or added with "No
 
201
   prefix" (= nil as cdr).
 
202
 
 
203
 - User Option: mode-line-prefix-face
 
204
   Face used for the prefix in the mode-line. See `ecb-mode-line-prefixes'.
 
205
   For XEmacs the face should inherit from the face `modeline' (see
 
206
   `set-face-parent')!
 
207
 
 
208
 - User Option: mode-line-win-nr-face
 
209
   Face used for the window-number in the mode-line. See
 
210
   `ecb-mode-line-display-window-number'. For XEmacs the face should inherit
 
211
   from the face `modeline' (see `set-face-parent')!
 
212
 
 
213
 
 
214
File: ecb.info,  Node: Submitting problem report,  Next: Upgrading,  Prev: Customizing,  Up: Top
 
215
 
 
216
Submitting a problem report
 
217
***************************
 
218
 
 
219
If you run into problems with ECB you should first take a look into
 
220
 
 
221
 - *Note FAQ:: or
 
222
 
 
223
 - *Note Conflicts and bugs:: or
 
224
 
 
225
 - *Note Tips and tricks:: or
 
226
 
 
227
 - the appropriate section of this online-manual.
 
228
 
 
229
If your problem(s) still remain you can/should send a problem report to the
 
230
ECB mailing list <ecb-list@lists.sourceforge.net>. ECB offers you a command
 
231
which does all necessary for you to send a problem report. Just call
 
232
`ecb-submit-problem-report'! Please read the documentation of this command,
 
233
see *Note Interactive ECB commands::.
 
234
 
 
235
*IMPORTANT*: Cause of extra appearance of SPAM in the mailing-lists,
 
236
SourceForge has changed its policy: Now it is only possible to post to the
 
237
mailing-list for users who have subscribed this mailing-list. So please be
 
238
aware you will not be able to send comments, bug reports and improvement
 
239
suggestions before you have subscribed the ECB-mailing-list. See the section
 
240
"Mailing-list" at the ECB-website at <http://ecb.sourceforge.net> how to do
 
241
this.
 
242
 
 
243
If you think there are problems concerning parsing-results for certain
 
244
sources supported by semantic then you should call
 
245
`ecb-dump-semantic-toplevel' for the problematic source-buffer *BEFORE* you
 
246
call `ecb-submit-problem-report' because this "dump"-command generates for
 
247
the current-buffer a new buffer with name "*ecb-tag-dump*" which contains all
 
248
semantic-tags for this source. The contents of this "*ecb-tag-dump*" will
 
249
then autom. be added to the problem-report generated by
 
250
`ecb-submit-problem-report'!
 
251
 
 
252
This command creates a problem-report buffer for you. After that you get a
 
253
menu "Mail" (dependent on the mail-package used, the menu can have a
 
254
different name) with commands to send the problem report. But for this the
 
255
variable `mail-user-agent' must be configured right for your system. If you
 
256
can�t get working this mechanism you can simply copy the whole problem-report
 
257
buffer after filling it out and sending it with your standard mail-client to
 
258
<ecb-list@lists.sourceforge.net>!
 
259
 
 
260
Please read also the documentation of the option `ecb-debug-mode' and switch
 
261
on the debug mode of ECB (also available in the Help-menu of ECB!) before
 
262
submitting a problem-report!
 
263
 
 
264
 
 
265
File: ecb.info,  Node: Upgrading,  Next: Tips and tricks,  Prev: Submitting problem report,  Up: Top
 
266
 
 
267
Upgrading and downloading packages
 
268
**********************************
 
269
 
 
270
This chapter describes all aspects of upgrading to a newer version of ECB.
 
271
 
 
272
The first section describes how to download and install a new package from
 
273
the web, where "package" means either ECB itself or the required libraries
 
274
semantic, eieio and speedbar.
 
275
 
 
276
After installing a new ECB-version ECB checks if the values of the customized
 
277
ECB-options are still compatible. If not ECB does some smart things. This is
 
278
the topic of the second section.
 
279
 
 
280
* Menu:
 
281
 
 
282
* Downloading new versions::    How to download newer versions of packages
 
283
* Auto. option-upgrading::      ECB can auto. upgrade your options
 
284
 
 
285
 
 
286
File: ecb.info,  Node: Downloading new versions,  Next: Auto. option-upgrading,  Prev: Upgrading,  Up: Upgrading
 
287
 
 
288
Downloading new versions of ECB and/or required packages
 
289
========================================================
 
290
 
 
291
ECB offers the possibility to upgrade to newer versions direct from the
 
292
ECB-website. This can be done if the following requirements are satisfied:
 
293
 
 
294
1. A connection to the web is available
 
295
 
 
296
2. The tools "wget", "tar" and "gzip" are installed
 
297
 
 
298
   With Unix-systems these tools are in the standard-distribution. If you are
 
299
   running any Microsoft Windows system then you need cygwin(1) which offers
 
300
   these tools too. On every system these tools must reside in the `PATH'
 
301
   environment-variable!
 
302
 
 
303
   If you are behind a firewall and you have to use a proxy you maybe need
 
304
   the following wget-configuration in your file `~/.wgetrc':
 
305
 
 
306
      # Define your proxies (where 8080 and 8081 are examples
 
307
      # for the port-numbers)
 
308
      http_proxy = http://your.proxy.com:8080
 
309
      ftp_proxy  = http://your.ftpproxy.com:8081
 
310
      
 
311
      # If you do not want to use proxy at all, set this to off.
 
312
      use_proxy = on
 
313
 
 
314
If these requirements are satisfied you can download and install both ECB
 
315
itself and also the required versions of semantic, eieio and speedbar:
 
316
 
 
317
 * Download a new ECB-version with `ecb-download-ecb':
 
318
 
 
319
   A description for this command you will find in *Note Interactive ECB
 
320
   commands::. Check also the options of the customize-group 'ecb-download'
 
321
   (*note ecb-download::).
 
322
 
 
323
 * Download and install of required packages:
 
324
 
 
325
   ECB checks at load-time if the packages semantic, eieio and speedbar are
 
326
   at least installed and at start-time if the required versions of semantic,
 
327
   eieio and speedbar (see `README') are installed and loaded into Emacs. If
 
328
   not you will be asked if you want auto. download and install them. If you
 
329
   confirm this then ECB does the following:
 
330
 
 
331
   1. Checking which versions are available at the download-site of the
 
332
      required packages. With the option `ecb-download-package-version-type'
 
333
      you can specify which type of versions (only stable, stable and betas
 
334
      or stable, betas and alphas) you allow to download and install. This
 
335
      option offers also the choice of asking you for a certain version.
 
336
      Depending of this setting ECB either ask you which version it should
 
337
      download and install or chooses autom. the newest version available
 
338
      which is matching both its min-max-requirements and the setting in
 
339
      `ecb-download-package-version-type'.
 
340
 
 
341
      NOTE: Currently there are only beta-versions of speedbar available
 
342
      therefore this option has to be set to 1 (allow stable and beta
 
343
      versions). But the speedbar beta-versions are very stable!
 
344
 
 
345
   2. Downloading and installing the right version (see 1.) of the required
 
346
      packages. ECB downloads and installs the new package versions in
 
347
      subdirectories of `ecb-download-install-parent-dir'.
 
348
 
 
349
   If both of these actions succeed then you will get a message-buffer which
 
350
   tells you something like:
 
351
 
 
352
      -----------------------------------------------------------------
 
353
      Current state of the required packages semantic, eieio, speedbar:
 
354
      
 
355
      - semantic author-version must be [1.4, 1.4.9]:
 
356
        Installed in /usr/local/lib/site-lisp/semantic-1.4
 
357
      
 
358
      - eieio author-version must be [0.17, 0.17.9]:
 
359
        Correct version already loaded!
 
360
      
 
361
      - speedbar author-version must be [0.14beta1, 0.15.9]:
 
362
        Correct version already loaded!
 
363
      
 
364
      After adding the new directory to your `load-path' and then
 
365
      restarting Emacs the new package(s) can be activated.
 
366
      -----------------------------------------------------------------
 
367
 
 
368
   *Remark 1*: "P author-version must be [x y]" means, that ECB requires
 
369
   package P in a version-number >= x and <= y.
 
370
 
 
371
   *Remark 2*: By setting the option `ecb-version-check' to `nil' you can
 
372
   prevent ECB from checking correct versions of semantic, eieio and speedbar
 
373
   but it's strongly recommended not to do this!
 
374
 
 
375
---------- Footnotes ----------
 
376
 
 
377
(1) cygwin is available at <http://cygwin.com/>
 
378
 
 
379
 
 
380
File: ecb.info,  Node: Auto. option-upgrading,  Prev: Downloading new versions,  Up: Upgrading
 
381
 
 
382
Automatic upgrading of options
 
383
==============================
 
384
 
 
385
* Menu:
 
386
 
 
387
* User interface::              Options and commands you should know
 
388
* Background information::      Maybe some interesting informations
 
389
 
 
390
 
 
391
File: ecb.info,  Node: User interface,  Next: Background information,  Prev: Auto. option-upgrading,  Up: Auto. option-upgrading
 
392
 
 
393
User interface for option-upgrading
 
394
-----------------------------------
 
395
 
 
396
There are two interactive commands (*note Interactive ECB commands::):
 
397
 
 
398
 - `ecb-upgrade-options': Does all necessary beginning with a
 
399
   incompatibility-check for all options, upgrading/resetting incompatible
 
400
   options and ending with the display of all upgraded or reset options.
 
401
 
 
402
 - `ecb-display-upgraded-options': Displays a temp. buffer with all upgraded
 
403
   or reseted ECB-options with their old and new values.
 
404
 
 
405
If the option `ecb-auto-compatibility-check' has a non-nil value (which is
 
406
the default) then ECB does all this stuff automatically at startup. This is
 
407
very recommended!
 
408
 
 
409
If you are interested in some background information, read *Note Background
 
410
information::!
 
411
 
 
412
 
 
413
File: ecb.info,  Node: Background information,  Prev: User interface,  Up: Auto. option-upgrading
 
414
 
 
415
Background information
 
416
----------------------
 
417
 
 
418
Big packages like ECB will be enhanced and developed continuously so
 
419
sometimes a new version must be released. Such packages offer in general a
 
420
lot of customizable options so probably some of these options change the type
 
421
or are renamed because the old type and/or name of the option makes no sense
 
422
in the new release.
 
423
 
 
424
Especially options which have changed the type of their value are now a
 
425
problem for the user which want to upgrade to the latest ECB-version: If the
 
426
user has saved a certain value for option X in its file `.emacs' but the type
 
427
of this saved value doesn't match the new defined type in the defcustom-form
 
428
after an ECB-upgrade then there can occur serious problems like ECB can not
 
429
be started anymore or even Emacs can not be started without errors.
 
430
 
 
431
Until now there was only one way to fix these problems: The user must
 
432
manually edit his file `.emacs' and remove all entries for options which have
 
433
now another type. After this and after restarting Emacs the new
 
434
default-values of the type-changed options in the new ECB-release are active
 
435
and the user can go on using Emacs and ECB. But this approach to fix the
 
436
incompatible-option-problem has two serious drawbacks:
 
437
 
 
438
1. The user must manually edit the customize-section in his file `.emacs'.
 
439
   This should normally not be done and if then only by old-handed
 
440
   Emacs-users.
 
441
 
 
442
2. The customized value of the option X in the old-release (with the old
 
443
   type) is lost because after removing the related entry from the file
 
444
   `.emacs' the new default-value is active, so the user must re-customize
 
445
   the option X.
 
446
 
 
447
OK, this is one half of the option-upgrade-problem but a new ECB-release can
 
448
also rename a option from name X to name Y because the new name Y makes much
 
449
more sense and/or is more mnemonic. If only the name has changed but not the
 
450
type this is not a serious problem like above but also annoying because the
 
451
customized value of the old-option X takes no effect in the new release but
 
452
instead the default-value of the new-option Y is now active.  But
 
453
nevertheless this problem has the drawback number 2 (see above).
 
454
 
 
455
The last category of upgrade-problems is a renamed option which has also
 
456
changed its type.
 
457
 
 
458
ECB has a solution for all these problems:
 
459
 
 
460
 * It checks all customized values of all ECB-options if they are still
 
461
   type-compatible. If not then it tries to upgrade the old-value to the new
 
462
   value-type and if this is not possible then it resets the option to the
 
463
   new default value and store it via customize in the .emacs-file (or in any
 
464
   file which is used for customized options).
 
465
 
 
466
 * It offers a special constant `ecb-upgradable-option-alist' which allows
 
467
   the ECB-maintainers to define special transformings for renamed options so
 
468
   even the value of an old-option X can be savely transformed to the
 
469
   new-option Y and the old setting is not lost.
 
470
 
 
471
All these checks and transformings are done at beginning of activating ECB -
 
472
if the option `ecb-auto-compatibility-check' is not nil. If ECB has
 
473
recognized incompatible or renamed options it does its upgrading/reseting-job
 
474
so all ECB-options have correct types so ECB can start correct. After ECB is
 
475
started it displays a list of all upgraded or reseted option with their old
 
476
and new values.
 
477
 
 
478
 
 
479
File: ecb.info,  Node: Tips and tricks,  Next: Elisp programming,  Prev: Upgrading,  Up: Top
 
480
 
 
481
Tips and tricks
 
482
***************
 
483
 
 
484
This chapter contains some tips and tricks how to deal best with some
 
485
situations.
 
486
 
 
487
* Menu:
 
488
 
 
489
* Changing faces::              Changing faces in the ECB tree-buffers
 
490
* Small screens::               Working with small screens
 
491
* Big screens::                 Working with big screens
 
492
* Simulating speedbar::         Simulating speedbar without an extra frame
 
493
* Integrating speedbar::        Integrating speedbar in the ECB-frame
 
494
* Optimize scrolling::          Optimize scrolling in the edit-window
 
495
* Large directories::           Working with large directories
 
496
* Using eshell::                Optimal using of eshell in ECB
 
497
* Grepping directories::        Grepping directories with ECB
 
498
* Working with JDEE::           Working best with ECB and JDEE
 
499
* Compile-window on demand::    Displaying the compile-window on demand
 
500
* Non-semantic sources::        Parsing and displaying non-semantic sources
 
501
* Hide-show::                   Using hide-show from the methods-buffer-menu
 
502
* Window-managers and ECB::     Support of several Emacs-window-managers
 
503
* Tree-buffer styles::          Displaying the trees with different styles
 
504
* Using semanticdb::            Using semanticdb for going to external nodes
 
505
 
 
506
 
 
507
File: ecb.info,  Node: Changing faces,  Next: Small screens,  Prev: Tips and tricks,  Up: Tips and tricks
 
508
 
 
509
Changing faces in the ECB tree-buffers
 
510
======================================
 
511
 
 
512
There are two basic faces:
 
513
 
 
514
 * `ecb-default-general-face': Basic face for displaying an ECB-tree-buffer.
 
515
 
 
516
   It�s recommended to define the font-family, the font-size, the basic color
 
517
   etc. with this face.
 
518
 
 
519
   In GNU Emacs 21.X all faces (even the face `ecb-default-highlight-face')
 
520
   used in the ECB tree-buffers inherit from this face. Therefore the default
 
521
   attributes like font etc. of a face used in a tree-buffer can be very
 
522
   easily changed with face `ecb-default-general-face'.
 
523
 
 
524
   With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the
 
525
   options `ecb-directories-general-face', `ecb-sources-general-face',
 
526
   `ecb-methods-general-face' and `ecb-history-general-face' offer the choice
 
527
   to use the face `ecb-default-general-face' so also with XEmacs and GNU
 
528
   Emacs 20.X the basic face-settings can be easily changed just by
 
529
   customizing the face `ecb-default-general-face'.
 
530
 
 
531
 * `ecb-default-highlight-face': Basic face for highlighting the current node
 
532
   in an ECB-tree-buffer.
 
533
 
 
534
   In GNU Emacs 21.X all highlighting faces used in the ECB tree-buffers
 
535
   inherit from this face. Therefore the default attributes like font etc. of
 
536
   a highlighting face used in a tree-buffer can be very easily changed with
 
537
   face `ecb-default-highlight-face'.
 
538
 
 
539
   With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the
 
540
   options `ecb-directory-face', `ecb-source-face', `ecb-method-face' and
 
541
   `ecb-history-face' offer the choice to use the face
 
542
   `ecb-default-highlight-face' so also with XEmacs and GNU Emacs 20.X the
 
543
   basic face-settings can be easily changed just by customizing the face
 
544
   `ecb-default-highlight-face'.
 
545
 
 
546
 
 
547
With these faces you can change the basic attributes easily and fast for ALL
 
548
ECB-tree-buffers. But you are also able to display each ECB-tree-buffer with
 
549
different faces, see the different options for every tree-buffer mentioned
 
550
above.
 
551
 
 
552
*Please note* (only for XEmacs users): Cause of the lack of the
 
553
font-inheritance feature using ONE other font for the ECB-methods buffer can
 
554
NOT be achieved just by setting `ecb-methods-general-face' to
 
555
`ecb-default-general-face' and changing the font of this default face. In
 
556
addition you have to set the same font also for the face
 
557
`ecb-bucket-node-face' like in the following example:
 
558
 
 
559
   (defconst my-ecb-font
 
560
             "-outline-Courier-normal-normal-13-97-96-96-c-*-iso8859-1")
 
561
   (set-face-font 'ecb-default-general-face my-ecb-font)
 
562
   (set-face-font 'ecb-bucket-node-face my-ecb-font)
 
563
 
 
564
This code sets the new defined font `my-ecb-font' as font for all(1)
 
565
ECB-tree-buffers (incl. the methods buffer).
 
566
 
 
567
---------- Footnotes ----------
 
568
 
 
569
(1) Of course `ecb-directories-general-face', `ecb-sources-general-face',
 
570
`ecb-methods-general-face' and `ecb-history-general-face' must be set to
 
571
`ecb-default-general-face'!
 
572
 
 
573
 
9
574
File: ecb.info,  Node: Small screens,  Next: Big screens,  Prev: Changing faces,  Up: Tips and tricks
10
575
 
11
576
Working with small screens
156
721
edit-window(2).
157
722
 
158
723
*IMPORTANT*: ECB can only integrate speedbar-versions >= 0.14beta1! If you
159
 
use lower versions of speedbar `ecb-use-speedbar-for-directories' has no
160
 
effect.
 
724
use lower versions of speedbar `ecb-use-speedbar-instead-native-tree-buffer'
 
725
has no effect.
161
726
 
162
727
---------- Footnotes ----------
163
728
 
362
927
         (expand-file-name jde-ant-buildfile (tree-node-get-data node))))
363
928
          (jde-ant-build project-file "build")))
364
929
 
 
930
   Of course you can add entries to the option
 
931
   `ecb-methods-menu-user-extension' and `ecb-methods-menu-user-extension'
 
932
   too.
 
933
 
365
934
 
366
935
---------- Footnotes ----------
367
936
 
413
982
`ecb-toggle-compile-window' - ECB will reactivate it autom.  before next
414
983
compilation or help-buffer-display.!
415
984
 
416
 
 
417
 
File: ecb.info,  Node: Non-semantic sources,  Next: Hide-show,  Prev: Compile-window on demand,  Up: Tips and tricks
418
 
 
419
 
Parsing and displaying non-semantic sources
420
 
===========================================
421
 
 
422
 
ECB is mostly designed to display parsing information for files supported by
423
 
semantic. But beginning with version 1.94 it also supports other parsing
424
 
engines like imenu and etags, so also files not supported by semantic but by
425
 
imenu/etags can be displayed in the Method-buffer of ECB. See *Note
426
 
Definition of semantic- and non-semantic-sources:: for a description of
427
 
"semantic-sources" and "non-semantic-sources".
428
 
 
429
 
If support of non-semantic-sources is enabled then ECB will display the
430
 
contents of all sources which can be displayed by speedbar too.  This comes
431
 
from the fact that ECB uses speedbar-logic to parse sources with imenu or
432
 
etags.
433
 
 
434
 
In most cases imenu-parsing is preferable over etags-parsing because imenu
435
 
operates on Emacs-buffers and needs no external tool and therefore parsing
436
 
works also if current contents of a buffer are not saved to disk.
437
 
 
438
 
This section describes all important aspects about parsing and displaying
439
 
file-contents of file-types not supported by semantic but by imenu and/or
440
 
etags.
441
 
 
442
 
Enabling parsing and displaying of non-semantic-sources
443
 
-------------------------------------------------------
444
 
 
445
 
Enabling is simply done with the option `ecb-process-non-semantic-files'.
446
 
 
447
 
ECB offers an option `ecb-non-semantic-parsing-function' to specify on a
448
 
major-mode basis which parsing-method should be used: imenu or etags.
449
 
Normally there should be no need to change this option but read the
450
 
documentation of this option (*note ecb-non-semantic::) for further details.
451
 
 
452
 
IMPORTANT:
453
 
 
454
 
 * If imenu-parsing should be used then the option `speedbar-use-imenu-flag'
455
 
   must be set to not `nil'!
456
 
 
457
 
 * If some non-semantic-sources are not parsed (i.e. there is an empty
458
 
   Methods-buffer) and you think that they should then maybe they are neither
459
 
   supported by imenu nor by etags or you have to check the options
460
 
   `ecb-non-semantic-parsing-function' and
461
 
   `speedbar-dynamic-tags-function-list' and - especially for etags -
462
 
   `speedbar-fetch-etags-parse-list', `speedbar-fetch-etags-arguments' and
463
 
   `speedbar-fetch-etags-command'.
464
 
 
465
 
 * Even with support for semantic-, imenu- and etags-parsing there will
466
 
   remain some file-types rsp. `major-modes' which are not parse-able,
467
 
   neither by semantic, imenu nor etags. This is no problem because these
468
 
   files simply have an empty Methods-buffer. But nevertheless you will get a
469
 
   message "Sorry, no support for a file of that extension" which comes from
470
 
   the speedbar-library and can not switched off. Therefore if a `major-mode'
471
 
   is known as not parse-able by semantic, imenu or etags it can be added to
472
 
   the option `ecb-non-semantic-exclude-modes' and then it will be excluded
473
 
   from being tried to parsed and this (annoying) message will not occur.
474
 
 
475
 
Automatic rescanning/reparsing of non-semantic-sources
476
 
------------------------------------------------------
477
 
 
478
 
In contrast to semantic (see `global-semantic-auto-parse-mode') there is no
479
 
built-in mechanism for autom. reparsing non-semantic-sources and then
480
 
updating the contents of the Methods-buffer.
481
 
 
482
 
For non-semantic-sources you have always at least to call
483
 
`ecb-rebuild-methods-buffer' (bound to `C-c . r') or saving the source-file
484
 
(if `ecb-auto-update-methods-after-save' is true) to update the
485
 
Method-buffer(1).
486
 
 
487
 
Depending on the parsing-mechanism the following options have to be switched
488
 
on so ECB can rebuild the methods-buffer for non-semantic-sources:
489
 
 
490
 
 * imenu:
491
 
 
492
 
   The imenu-option `imenu-auto-rescan' must be enabled and
493
 
   `imenu-auto-rescan-maxout' has to be set big enough to auto-parse big
494
 
   files too! But this results not directly in an autom. updated
495
 
   Method-buffer. This is first done after calling the command
496
 
   `ecb-rebuild-methods-buffer' or saving the source-file (if
497
 
   `ecb-auto-update-methods-after-save' is true).
498
 
 
499
 
 * etags:
500
 
 
501
 
   Only if `ecb-auto-save-before-etags-methods-rebuild' is switched on the
502
 
   command `ecb-rebuild-methods-buffer' rebuilds the method-buffer with
503
 
   current source-contents. See description of this option for an explanation.
504
 
 
505
 
Tip: If you want to program your own real. automatic rescan/reparse/rebuild
506
 
mechanism for non-semantic-sources you can do:
507
 
 
508
 
Adding to `after-change-functions' a function F which either runs itself
509
 
`ecb-rebuild-methods-buffer-for-non-semantic' or which adds only another
510
 
function FF to an idle-timer and the function FF runs
511
 
`ecb-rebuild-methods-buffer-for-non-semantic'. The latter approach has the
512
 
advantage that the reparse/rebuild is not performed immediately after every
513
 
change but first after Emacs is idle for a senseful interval (e.g. 4 seconds)
514
 
after last change. Of course the function FF has to cancel its own idle-timer
515
 
at the end, so the next idle-timer is first started again after the next
516
 
change (i.e. by function F which is still contained in
517
 
`after-change-functions'.
518
 
 
519
 
Customizing the display of the tags
520
 
-----------------------------------
521
 
 
522
 
For non-semantic-sources ECB uses does no special organizing of tags in
523
 
groups and sub-tags but it completely uses the tag-hierarchy the imenu- and
524
 
etags-parsers of speedbar return. So the displayed tag hierarchy can only be
525
 
customized with some options speedbar offers for this:
526
 
 
527
 
`speedbar-tag-hierarchy-method', `speedbar-tag-group-name-minimum-length',
528
 
`speedbar-tag-split-minimum-length' and
529
 
`speedbar-tag-regroup-maximum-length'. See the speedbar documentation for
530
 
details about these options.
531
 
 
532
 
With the option `ecb-method-non-semantic-face' you can define the face used
533
 
for displaying the tags in the Method-buffer for non-semantic-sources.
534
 
 
535
 
`ecb-non-semantic-methods-initial-expand' can be useful too.
536
 
 
537
 
---------- Footnotes ----------
538
 
 
539
 
(1) Maybe future versions of ECB (> 1.94) will offer an autom. mechanism for
540
 
this.
541
 
 
542
 
 
543
 
File: ecb.info,  Node: Hide-show,  Next: Window-managers and ECB,  Prev: Non-semantic sources,  Up: Tips and tricks
544
 
 
545
 
Using hide-show from the methods-buffer-menu
546
 
============================================
547
 
 
548
 
The popup-menu of the Methods-buffer offer two entries for either hiding or
549
 
showing the block which is related to the selected tag (that tag for which
550
 
the popup-menu was opened):
551
 
 
552
 
 * "Jump to tag and hide block": Jumps to the tag and calls `hs-hide-block'
553
 
   from the hideshow-library which is shipped with (X)Emacs. After that the
554
 
   block is hidden, i.e. only the header-line of that tag (method, variable
555
 
   etc.) is visible, the rest is hidden behind the "...".
556
 
 
557
 
 * "Jump to tag and show block": Jumps to the tag and calls `hs-show-block'.
558
 
   This shows the related hidden block if the block was hidden via
559
 
   `hs-hide-block' or the menu-entry "Jump to tag and hide block" (s.a.).
560
 
 
561
 
For this feature the library `hideshow.el' is used which should normally
562
 
being included in the (X)Emacs-distribution. If this library is not loaded
563
 
into Emacs, ECB does this automatically before the first call to one of these
564
 
menu-entries.
565
 
 
566
 
IMPORTANT: If in some `major-mode' hiding and showing does not work as you
567
 
expect it to work then you must probably add an entry for this `major-mode'
568
 
to the hideshow-variable `hs-special-modes-alist'. See the documentation of
569
 
this variable for further details. One example of such a `major-mode' is
570
 
`jde-mode' of the Java Development Environment JDEE; just add an entry for it
571
 
like the already contained entries for `c++-mode' or `java-mode' and hiding
572
 
and showing will work for you with JDEE too.
573
 
 
574
 
 
575
 
File: ecb.info,  Node: Window-managers and ECB,  Next: Tree-buffer styles,  Prev: Hide-show,  Up: Tips and tricks
576
 
 
577
 
Support of several Emacs-window-managers
578
 
========================================
579
 
 
580
 
There are several window-managers available which offer an easy interface to
581
 
jump between different window-configurations within the same frame. A window
582
 
configuration is the layout of windows and associated buffers within a frame.
583
 
There is always at least one configuration, the current configuration. You
584
 
can create new configurations and cycle through the layouts in either
585
 
direction.  Window configurations are often named or numbered, and you can
586
 
jump to and delete named rsp. numbered configurations.
587
 
 
588
 
Without special support by ECB these window-managers would not work in
589
 
combination with ECB!
590
 
 
591
 
ECB currently supports the following managers:
592
 
 
593
 
 * winring.el: Written by Barry A. Warsaw <bwarsaw@python.org>, available at
594
 
   <http://www.python.org/emacs/>
595
 
 
596
 
 * escreen.el: Written by Noah Friedman <friedman@splode.com>, available at
597
 
   <http://www.splode.com/~friedman/software/emacs-lisp/>
598
 
 
599
 
*IMPORTANT*: With one of these window-managers installed and active you can
600
 
run applications like Gnus, VM or BBDB in the same frame as ECB! Just use
601
 
different window-configurations (winring.el) or escreens (escreen.el) for ECB
602
 
and the other applications. Especially with winring.el you can give every
603
 
configuration a descriptive name like "ECB" or "Gnus"; afterwards you can
604
 
jump to a window-configuration by name!
605
 
 
606
 
When you go back to the ECB-window-configuration (winring.el) or the
607
 
ECB-escreen (escreen.el) with any of the special window-manager-commands then
608
 
the state of ECB will be restored exactly as you have left it when going to
609
 
another window-configuration rsp.  escreen. This includes the whole splitting
610
 
state of the edit-area and the visibilty of the ecb-windows and of the
611
 
compile-window!
612
 
 
613
 
The rest of this section describes how to enable the special ECB-support for
614
 
these window-managers and how to use them.
615
 
 
616
 
Enabling of the support
617
 
-----------------------
618
 
 
619
 
Every support must be enabled explicitly:
620
 
 * winring: Call `ecb-winman-winring-enable-support'. This *MUST* be done
621
 
   *BEFORE* the first call to any winring-command, so also before calling
622
 
   `winring-initialize'!
623
 
 
624
 
 * escreen: Call `ecb-winman-escreen-enable-support'. This *MUST* be done
625
 
   *BEFORE* the first call to any escreen-command, so also before calling
626
 
   `escreen-install'!
627
 
 
628
 
If a window-manager-support should be enabled autom. after Emacs-start just
629
 
put the following into your `.emacs':
630
 
 
631
 
   (ecb-winman-winring-enable-support)
632
 
   (winring-initialize)
633
 
   
634
 
   ;; or - if you like escreen more
635
 
   
636
 
   (ecb-winman-escreen-enable-support)
637
 
   (escreen-install)
638
 
 
639
 
Usage of a window-manager in combination with ECB
640
 
-------------------------------------------------
641
 
 
642
 
After enabling the support of one of the supported window-managers just go on
643
 
as described in the commentary or introduction of the respective
644
 
library-file(s) of the window-manager. Here is a short description:
645
 
 
646
 
 * winring: First you have to define how to identify the
647
 
   ECB-window-configuration, i.e. the configuration with activated ECB. This
648
 
   done with the option `ecb-winman-winring-name'. There is always only one
649
 
   window-configurations with name `ecb-winman-winring-name'!
650
 
 
651
 
   Then run `winring-initialize'. If ECB is active then the resulting
652
 
   window-configuration is the ECB-window-configuration.  Otherwise you can
653
 
   create the ECB-window-configuration when you first time call
654
 
   `winring-new-configuration' with name equal to `ecb-winman-winring-name'.
655
 
   In general you can run all commands of the winring-library. If you jump to
656
 
   the ECB-window-configuration then ECB will be autom. activated and if you
657
 
   leave the ECB-window-configuration then ECB will autom. deactivated.
658
 
 
659
 
 * escreen: First you have to define how to identify the ECB-escreen i.e.
660
 
   that escreen with activated ECB. This done with the option
661
 
   `ecb-winman-escreen-number'. There is always only one escreen with number
662
 
   `ecb-winman-escreen-number'!
663
 
 
664
 
   Then run `escreen-install' (deactivates ECB if currently running). After
665
 
   that you can call `escreen-create-screen' and `escreen-goto-screen'(1).
666
 
   These commands autom. activate ECB if creating or selecting the escreen
667
 
   with number `ecb-escreen-number' (default = 1) and autom. deactivate ECB if
668
 
   leaving the ECB-escreen.
669
 
 
670
 
Disabling the support
671
 
---------------------
672
 
 
673
 
There is normally no need to do this but nevertheless it can be done by
674
 
`ecb-winman-escreen-disable-support' rsp.
675
 
`ecb-winman-winring-disable-support'.
676
 
 
677
 
---------- Footnotes ----------
678
 
 
679
 
(1) And of course all other `escreen-goto-*' commands!
680
 
 
681
 
 
682
 
File: ecb.info,  Node: Tree-buffer styles,  Next: Using semanticdb,  Prev: Window-managers and ECB,  Up: Tips and tricks
683
 
 
684
 
Displaying the trees of the ECB-windows with different styles
685
 
=============================================================
686
 
 
687
 
ECB offers three different styles for the tree-buffers in the ECB-windows.
688
 
Two of the styles are ascii-based and one style uses images for drawing the
689
 
tree-structure.
690
 
 
691
 
* Menu:
692
 
 
693
 
* Style basics::                Basic knowledge about the styles
694
 
* Ascii-based styles::          How to customize the ascii-styles
695
 
* Tree-buffers with images::    Which images are used for the tree
696
 
 
697
 
 
698
 
File: ecb.info,  Node: Style basics,  Next: Ascii-based styles,  Up: Tree-buffer styles
699
 
 
700
 
Basic knowledge about the styles
701
 
--------------------------------
702
 
 
703
 
There are nine image-names which define the control- and guide-symbols to
704
 
draw the tree. Here is the list of the allowed image-names and the related
705
 
corresponding ascii-symbols:
706
 
 
707
 
 - open ("[-]"): The control-symbol displayed for an opened tree-node which
708
 
   has several subnodes. Clicking onto this control closes the node.
709
 
 
710
 
 - close ("[+]"): The control-symbol displayed for a closed tree-node, i.e. an
711
 
   expandable node with subnodes but all subnodes are hidden. Clicking onto
712
 
   this control opened the node and displays its subnodes - if there are any.
713
 
   If it has no subnodes the empty-symbol will be displayed.
714
 
 
715
 
 - empty ("[x]"): The symbol displayed for an empty node. An empty node is a
716
 
   node which could have subnodes but has currently none.
717
 
 
718
 
 - leaf ("*"): The symbol displayed for a node which can not have any
719
 
   subnodes so it is a "leaf" in the tree.
720
 
 
721
 
 - guide (" |"): The symbol used for drawing vertical "guide-lines" for
722
 
   opened nodes.  See the example below.
723
 
 
724
 
 - no-guide ("  "): Sometimes invisible guide-lines are needed to draw the
725
 
   tree.
726
 
 
727
 
 - end-guide (" `"): The symbol used for the guide-line of the last subnode
728
 
   of an opened node.
729
 
 
730
 
 - handle ("-"): The symbol displayed before every subnode. Each handle is
731
 
   connected to a guide-line - either a normal guide or an end-guide.
732
 
 
733
 
 - no-handle (" "): An invisible handle.
734
 
 
735
 
A tree will be build-up with these elements like follows:
736
 
 
737
 
   [-] node-with-subnodes      (open)
738
 
    |-[+] not-empty-subnode1   (guide+handle+close)
739
 
    |-[X] empty-subnode        (guide+handle+empty)
740
 
    `-[-] not-empty-subnode2   (end-guide+handle+open)
741
 
       |-* leaf-1              (no-guide+no-handle+guide+handle+leaf)
742
 
       `-* leaf-2              (no-guide+no-handle+end-guide+handle+leaf)
743
 
 
744
 
 
745
 
File: ecb.info,  Node: Ascii-based styles,  Next: Tree-buffers with images,  Prev: Style basics,  Up: Tree-buffer styles
746
 
 
747
 
How to customize the ascii-styles
748
 
---------------------------------
749
 
 
750
 
The ECB-option `ecb-tree-buffer-style' offers two different styles completely
751
 
drawn with ascii-controls and -guides.
752
 
 
753
 
Ascii-style with guide-lines (value `ascii-guides')(1):
754
 
 
755
 
   [-] ECB
756
 
    |  [+] code-save
757
 
    `- [-] ecb-images
758
 
        |  [-] directories
759
 
        |   |  [-] height-15
760
 
        |   |   |  * close.xpm
761
 
        |   |   |  * empty.xpm
762
 
        |   |   |  * leaf.xpm
763
 
        |   |   `- * open.xpm
764
 
        |   |  [+] height-17
765
 
        |   |  [+] height-19
766
 
        |   `- [+] height-21
767
 
        |  [x] history
768
 
        |  [x] methods
769
 
        `- [x] sources
770
 
 
771
 
Ascii-style without guide-lines (value `ascii-no-guides') - this is the style
772
 
used by ECB <= 1.96:
773
 
 
774
 
   [-] ECB
775
 
       [+] code-save
776
 
       [-] ecb-images
777
 
           [-] directories
778
 
               [-] height-15
779
 
                   * close.xpm
780
 
                   * empty.xpm
781
 
                   * leaf.xpm
782
 
                   * open.xpm
783
 
               [+] height-17
784
 
               [+] height-19
785
 
               [+] height-21
786
 
           [x] history
787
 
           [x] methods
788
 
           [x] sources
789
 
 
790
 
The tree-layout of both ascii-styles can be affected with the options
791
 
`ecb-tree-indent' and `ecb-tree-expand-symbol-before' (the examples above
792
 
have set 4 for the former and true for the latter one).  For the guide-style
793
 
the face and color of the guide- and handle-symbols can be customized with
794
 
the option `ecb-tree-guide-line-face' (default is the equal-named face).
795
 
 
796
 
---------- Footnotes ----------
797
 
 
798
 
(1) For a better look&feel of such a tree-buffer ECB displays only the last
799
 
subnode of an opened node with a handle!
800
 
 
801
 
 
802
 
File: ecb.info,  Node: Tree-buffers with images,  Prev: Ascii-based styles,  Up: Tree-buffer styles
803
 
 
804
 
Which images are used for the tree
805
 
----------------------------------
806
 
 
807
 
Depending on the value of `ecb-tree-buffer-style' and the image-support of
808
 
(X)Emacs, the tree-buffer try to use images instead of strings to draw a
809
 
nice-looking tree. If images can and should be used then the option
810
 
`ecb-tree-image-icons-directories' tells ECB where to search for suitable
811
 
image-icons for each of the nine image-names (see above). An image is used
812
 
for displaying a control with name "XXX" if one of the directories of
813
 
`ecb-tree-image-icons-directories' contains an image-file with basename
814
 
"ecb-XXX" and an extension which is supported by (X)Emacs.  Currently
815
 
supported extensions are ".xpm", ".png", ".gif", ".jpeg", ."jpg" and ".xbm".
816
 
 
817
 
Example: To display the control with name "open" with a suitable image then
818
 
one of the directories of `ecb-tree-image-icons-directories' must contain a
819
 
file with name "ecb-open.xpm" or "ecb-open.png" etc. See the description of
820
 
this option to get all important details how and in which sequence ECB
821
 
searches the directories of `ecb-tree-image-icons-directories'.
822
 
 
823
 
ECB comes with predefined default-images usable for every tree-buffer and
824
 
special images for the Directories-tree-buffer. They are defined in several
825
 
different heights - so for the most senseful font-heights of a tree-buffer a
826
 
fitting image-size should be available. The shipped images reside either in
827
 
the subdirectory "ecb-images" of the ECB-installation or - if ECB is
828
 
installed as regular XEmacs-package - in the ECB-etc data-directory (the
829
 
directory returned by evaluating (locate-data-directory "ecb"). If you do not
830
 
want to change the images then you normally have nothing to do because the
831
 
default value of `ecb-tree-image-icons-directories' points already to the
832
 
correct image-directories.
833
 
 
834
 
A special note for XEmacs
835
 
.........................
836
 
 
837
 
At least XEmacs 21.14 (but probably previous versions too) has a bug in its
838
 
display-engine which prevents adjacent images to be displayed correctly. The
839
 
effect is, that in a row of two or more adjacent images (e.g.
840
 
end-guide+handle+open - see the tree-example above) always all images are
841
 
masked by the last one, means only the last one is visible.  If at least one
842
 
normal character (e.g. a space) is placed between two images then the images
843
 
are displayed correctly. Therefore ECB has implemented the following
844
 
work-around to get best possible results with XEmacs: open-, close-, empty-,
845
 
leaf-, guide-, end-guide- and no-guide-images are displayed with images and
846
 
the handle- and the no-handle-images are displayed with the corresponding
847
 
ascii-symbols (which is "-" rsp. " "). The face (the color) of the
848
 
handle-symbol is customizable via the option `ecb-tree-guide-line-face'.
849
 
 
850
 
This bug is already reported to the XEmacs-team. If your XEmacs has fixed
851
 
this bug then add the following to your `.emacs'-file (or whereever your
852
 
emacs-setup is located):
853
 
 
854
 
   (setq tree-buffer-enable-xemacs-image-bug-hack nil)
855
 
 
856
 
Then ECB uses images without any special work-around with XEmacs too.  Just
857
 
try it - if the tree-buffers look ugly then the XEmacs-bug is probably not
858
 
fixed correctly.
859
 
 
860
 
 
861
 
File: ecb.info,  Node: Using semanticdb,  Prev: Tree-buffer styles,  Up: Tips and tricks
862
 
 
863
 
Using semanticdb to jump to type-tags defined in other files
864
 
============================================================
865
 
 
866
 
In OO-languages like CLOS, eieio and C++ there can be type-tags in the
867
 
method-buffer which are somehow virtual because there is no definition in the
868
 
current source-file. But such a virtual type collects all its outside defined
869
 
members like methods in C++ which are defined in the `*.cc' file whereas the
870
 
class-definition is defined in the associated header-file. ECB uses
871
 
semanticdb to open the definition-file of such a tag and to jump to the
872
 
definition of this tag. Same for parent-tags in the methods-buffer. This
873
 
feature can only work correctly if semanticdb is well configured!
874
 
 
875
 
Here is a C++-example:
876
 
 
877
 
This class is defined in a file `ParentClass.h':
878
 
 
879
 
   class ParentClass
880
 
   {
881
 
   protected:
882
 
     int p;
883
 
   };
884
 
 
885
 
This class is defined in a file `ClassWithExternals.h'
886
 
 
887
 
   #include "ParentClass.h"
888
 
   
889
 
   class ClassWithExternals : public ParentClass
890
 
   {
891
 
   private:
892
 
     int i;
893
 
   
894
 
   public:
895
 
     ClassWithExternals();
896
 
     ~ClassWithExternals();
897
 
   };
898
 
 
899
 
Both the constructor and the desctructor of the class "ClassWithExternals"
900
 
are defined in a file `ClassWithExternals.cc':
901
 
 
902
 
   #include "test.h"
903
 
   
904
 
   ClassWithExternals::ClassWithExternals(int i,
905
 
                                          boolean b,
906
 
                                          char c)
907
 
   {
908
 
     return;
909
 
   }
910
 
   
911
 
   void
912
 
   ClassWithExternals::~ClassWithExternals()
913
 
   {
914
 
     return;
915
 
   }
916
 
 
917
 
ECB displays the contents of `ClassWithExternals.cc' in its methods-buffer
918
 
like follows:
919
 
 
920
 
   [-] [Includes]
921
 
    `- test.h
922
 
   [-] ClassWithExternals
923
 
    |  +ClassWithExternals (+i:int, +b:class boolean, +c:char):ClassWithExternals
924
 
    `- +~ClassWithExternals ():void
925
 
 
926
 
Both the constructor and the desctructor of the class "ClassWithExternals"
927
 
are grouped under their class-type. ECB now uses semanticdb to jump to the
928
 
definition of class "ClassWithExternals" when you click onto the type-node
929
 
"ClassWithExternals" in the methods-buffer.
930
 
 
931
 
The contents of `ClassWithExternals.h' are displayed like follows:
932
 
 
933
 
   [-] [Includes]
934
 
    `- ParentClass.h
935
 
   [-] ClassWithExternals:class
936
 
    |  [-] [Parents]
937
 
    |   `- ParentClass
938
 
    |  [-] [Variables]
939
 
    |   `- -i:int
940
 
    |  +ClassWithExternals ():ClassWithExternals
941
 
    |  +~ClassWithExternals ():void
942
 
    `- [+] [Misc]
943
 
 
944
 
ECB uses semanticdb to jump to the definition of the class "ParentClass" when
945
 
you click onto the node "ParentClass".
946
 
 
947
 
To enable this feature `global-semanticdb-minor-mode' must be enabled and
948
 
semanticdb must be correctly configured. This means mainly that the option
949
 
`semanticdb-project-roots' must be setup well. See the manual of semanticdb
950
 
for further informations about this.
951
 
 
952
 
 
953
 
File: ecb.info,  Node: Elisp programming,  Next: Conflicts and bugs,  Prev: Tips and tricks,  Up: Top
954
 
 
955
 
Entry points for Elisp programmers
956
 
**********************************
957
 
 
958
 
This chapter describes how ECB can be used/programmed/driven by an
959
 
Elisp-program. This contains:
960
 
 
961
 
* Menu:
962
 
 
963
 
* List of variables::           Which variables an Elisp-program can use
964
 
* List of hooks::               All available hooks
965
 
* tree-buffer::                 Some words to the tree-buffer-library
966
 
* Adviced functions::           How to deal with the adviced functions
967
 
* The layout-engine::           Programming new layouts and special windows
968
 
 
969
 
 
970
 
File: ecb.info,  Node: List of variables,  Next: List of hooks,  Prev: Elisp programming,  Up: Elisp programming
971
 
 
972
 
Variables for Elisp-programs
973
 
============================
974
 
 
975
 
Variables an Elisp-program can use beyond those ones mentioned in *Note The
976
 
layout-engine:::
977
 
 
978
 
 * `ecb-source-path-functions'
979
 
 
980
 
Look at the documentation of these variables to get a description.
981
 
 
982
 
 
983
 
File: ecb.info,  Node: List of hooks,  Next: tree-buffer,  Prev: List of variables,  Up: Elisp programming
984
 
 
985
 
Available hooks of ECB
986
 
======================
987
 
 
988
 
The following hooks are available:
989
 
 
990
 
 * `ecb-activate-before-new-frame-created-hook'
991
 
 
992
 
 * `ecb-activate-before-layout-draw-hook'
993
 
 
994
 
 * `ecb-activate-hook'
995
 
 
996
 
 * `ecb-before-activate-hook'
997
 
 
998
 
 * `ecb-before-deactivate-hook'
999
 
 
1000
 
 * `ecb-common-tree-buffer-after-create-hook'
1001
 
 
1002
 
 * `ecb-current-buffer-sync-hook'
1003
 
 
1004
 
 * `ecb-deactivate-hook'
1005
 
 
1006
 
 * `ecb-directories-buffer-after-create-hook'
1007
 
 
1008
 
 * `ecb-hide-ecb-windows-after-hook'
1009
 
 
1010
 
 * `ecb-hide-ecb-windows-before-hook'
1011
 
 
1012
 
 * `ecb-history-buffer-after-create-hook'
1013
 
 
1014
 
 * `ecb-methods-buffer-after-create-hook'
1015
 
 
1016
 
 * `ecb-redraw-layout-after-hook'
1017
 
 
1018
 
 * `ecb-redraw-layout-before-hook'
1019
 
 
1020
 
 * `ecb-show-ecb-windows-after-hook'
1021
 
 
1022
 
 * `ecb-show-ecb-windows-before-hook'
1023
 
 
1024
 
 * `ecb-sources-buffer-after-create-hook'
1025
 
 
1026
 
Look at the documentation of these hooks to get a detailed description.
1027
 
 
1028
 
 
1029
 
File: ecb.info,  Node: tree-buffer,  Next: Adviced functions,  Prev: List of hooks,  Up: Elisp programming
1030
 
 
1031
 
The library tree-buffer.el
1032
 
==========================
1033
 
 
1034
 
The library tree-buffer.el is ECB independent and can be used for other
1035
 
applications too. But such an application is not allowed to use any of the
1036
 
variables of tree-buffer.el especially not the variable *tree-buffers*!
1037
 
 
1038
 
`tree-buffers': Only for internal use. It contains all tree-buffers of
1039
 
current Emacs-instance, means *all* tree-buffers of *all* applications which
1040
 
uses currently tree-buffers. Every application must store its own collection
1041
 
of tree-buffers in an own variable! For example: ECB stores its tree-buffer
1042
 
set in `ecb-tree-buffers'!
1043
 
 
1044
 
An application may only use the methods tree-buffer.el provides but no
1045
 
internal variables!
1046
 
 
1047
 
 
1048
 
File: ecb.info,  Node: Adviced functions,  Next: The layout-engine,  Prev: tree-buffer,  Up: Elisp programming
1049
 
 
1050
 
How to deal with the adviced window-functions
1051
 
=============================================
1052
 
 
1053
 
ECB offers for packages which work during activated ECB three macros for easy
1054
 
temporally(1) using all original-functions, all adviced functions or only
1055
 
some adviced functions:
1056
 
 
1057
 
 - `ecb-with-original-functions'
1058
 
 
1059
 
 - `ecb-with-adviced-functions'
1060
 
 
1061
 
 - `ecb-with-some-adviced-functions'
1062
 
 
1063
 
For a detailed explanation of each macro read the documentation with
1064
 
`describe-function'!
1065
 
 
1066
 
---------- Footnotes ----------
1067
 
 
1068
 
(1) I.e. regardless of the settings in `ecb-advice-window-functions'!
1069
 
 
1070
 
 
1071
 
File: ecb.info,  Node: The layout-engine,  Prev: Adviced functions,  Up: Elisp programming
1072
 
 
1073
 
How to program new layouts and new special windows
1074
 
==================================================
1075
 
 
1076
 
There are two aspects concerning this topic:
1077
 
 
1078
 
1. Programming a new layout which contains several special ECB-windows like
1079
 
   directories, sources, methods, history or other special windows and
1080
 
   arranging them in a new outline.
1081
 
 
1082
 
2. Creating complete new special windows (e.g. a local-variable window for a
1083
 
   graphical debugger like JDEbug of JDEE), adding them to a layout and
1084
 
   synchronizing them with the current active edit-window.
1085
 
 
1086
 
The former one covers merely the layout-programming aspect which is explained
1087
 
in the first subsection of this chapter whereas the latter one covers all
1088
 
aspects of creating new special windows and what is necessary to synchronize
1089
 
it with the current active edit-window of ECB. This is explained in the
1090
 
second subsection which will refers to the first subsection.
1091
 
 
1092
 
* Menu:
1093
 
 
1094
 
* Programming a new layout::    How to program a new layout
1095
 
* Programming special windows:: Aspects of programming special windows
1096
 
* Possible layout-outlines::    The wide range of possible layouts
1097
 
* The layout-engine API::       The complete layout-engine API
1098