-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecb.el
2051 lines (1828 loc) · 82.3 KB
/
ecb.el
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; ecb.el --- a code browser for Emacs
;; Copyright (C) 2000 - 2005 Jesper Nordenberg,
;; Klaus Berndl,
;; Kevin A. Burton,
;; Free Software Foundation, Inc.
;; Author: Jesper Nordenberg <[email protected]>
;; Klaus Berndl <[email protected]>
;; Kevin A. Burton <[email protected]>
;; Maintainer: Klaus Berndl <[email protected]>
;; Keywords: browser, code, programming, tools
;; Created: 2000
;; This program is free software; you can redistribute it and/or modify it under
;; the terms of the GNU General Public License as published by the Free Software
;; Foundation; either version 2, or (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
;; details.
;; You should have received a copy of the GNU General Public License along with
;; GNU Emacs; see the file COPYING. If not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;; $Id: ecb.el,v 1.446 2009/05/10 16:53:19 berndl Exp $
;;; Commentary:
;;
;; ECB stands for "Emacs Code Browser". While Emacs already has good
;; *editing* support for many modes, its *browsing* support is somewhat
;; lacking. That's where ECB comes in: it displays a number of informational
;; windows that allow for easy source code navigation and overview.
;;
;; The informational windows can contain:
;;
;; - A directory tree,
;; - a list of source files in the current directory,
;; - a list of functions/classes/methods/... in the current file, (ECB uses
;; the Semantic Bovinator, or Imenu, or etags, for getting this list so all
;; languages supported by any of these tools are automatically supported by
;; ECB too)
;; - a history of recently visited files,
;; - the Speedbar and
;; - output from compilation (the "*compilation*" window) and other modes like
;; help, grep etc. or whatever a user defines to be displayed in this
;; window.
;;
;; As an added bonus, ECB makes sure to keep these informational windows visible,
;; even when you use C-x 1 and similar commands.
;;
;; It goes without saying that you can configure the layout, ie which
;; informational windows should be displayed where. ECB comes with a number of
;; ready-made window layouts to choose from.
;;
;; Here is an ascii-screenshot of what ECB offers you:
;;
;; ------------------------------------------------------------------
;; | | |
;; | Directories | |
;; | | |
;; |--------------| |
;; | | |
;; | Sources | |
;; | | |
;; |--------------| Edit-area |
;; | | (can be splitted in several edit-windows) |
;; | Methods/Vars | |
;; | | |
;; |--------------| |
;; | | |
;; | History | |
;; | | |
;; ------------------------------------------------------------------
;; | |
;; | Compilation-window (optional) |
;; | |
;; ------------------------------------------------------------------
;;
;;; Installation
;;
;; To use the Emacs code browser add the ECB files to your load path and add the
;; following line to your .emacs file:
;;
;; If you want autoloading ECB after first start:
;;
;; (require 'ecb-autoloads)
;;
;; or if you want loading the complete ECB:
;;
;; (require 'ecb)
;;
;; Optional: You can byte-compile ECB with `ecb-byte-compile' after the
;; ECB-package is loaded
;;; Requirements
;;
;; - Semantic, author-version between >= 1.4
;; (http://cedet.sourceforge.net/semantic.shtml).
;; - Eieio, author-version >= 0.17
;; (http://cedet.sourceforge.net/eieio.shtml).
;; - speedbar, author version >= 0.14beta1
;; (http://cedet.sourceforge.net/speedbar.shtml)
;; - Optional: If Java code is edited the ECB works best when the JDEE package
;; (http://sunsite.auc.dk/jde) is installed.
;;; Activation
;;
;; ECB is either activated and started by calling
;; M-x ecb-activate
;; or
;; via the menu "Tools --> Start Code Browser (ECB)"
;;
;; ECB can also be (de)activated/toggled by M-x ecb-minor-mode.
;;
;; After activating ECB you should call `ecb-show-help' to get a detailed
;; description of what ECB offers to you and how to use ECB.
;;; Availability
;;
;; The latest version of the ECB is available at http://ecb.sourceforge.net
;;; History
;;
;; For the ChangeLog of this file see the CVS-repository. For a complete
;; history of the ECB-package see the file NEWS.
;;; Code:
(eval-when-compile
(require 'silentcomp))
;; We need this libraries already here if we miss some requirements
(require 'ecb-upgrade)
(require 'ecb-util)
;; if we miss some of the requirements we report an error.
(defconst ecb-cedet-load-ok (featurep 'cedet))
(defconst ecb-compiled-in-semantic-version
(eval-when-compile (ignore-errors semantic-version))
"Semantic-version used for byte-compiling ECB. Either nil when no semantic
is loaded or the value of `semantic-version' at ECB-compilation time.")
(defconst ecb-compiled-in-cedet-version
(eval-when-compile (ignore-errors cedet-version))
"Cedet-version used for byte-compiling ECB. Either nil when no semantic
is loaded or the value of `cedet-version' at ECB-compilation time.")
(when (not ecb-cedet-load-ok)
(if (ecb-noninteractive)
(ecb-error "ECB is missing CEDET - check your CEDET-installation/setup!")
(ecb-check-requirements)))
;; If we are here we can load ECB because at least we have installed and
;; loaded all required packages. The correct version will be checked
;; at start- or byte-compile-time
(message "ECB %s uses CEDET %s (contains semantic %s, eieio %s, speedbar %s)."
ecb-version
(or (and (boundp 'cedet-version)
cedet-version)
"<unknown version>")
(or (and (boundp 'semantic-version)
semantic-version)
"<unknown version>")
(or (and (boundp 'eieio-version)
eieio-version)
"<unknown version>")
(or (and (boundp 'speedbar-version)
speedbar-version)
"<unknown version>"))
;; rest of ecb loads
(require 'tree-buffer)
(require 'ecb-file-browser)
(require 'ecb-method-browser)
(require 'ecb-jde)
(require 'ecb-layout)
(require 'ecb-create-layout)
(require 'ecb-mode-line)
(require 'ecb-help)
(require 'ecb-navigate)
(require 'ecb-eshell)
(require 'ecb-compilation)
(require 'ecb-cycle)
(require 'ecb-face)
(require 'ecb-tod)
(require 'ecb-speedbar)
(require 'ecb-autogen)
(require 'ecb-winman-support)
(require 'ecb-compatibility)
;; add-ons
(require 'ecb-analyse)
(require 'ecb-symboldef)
;; various loads
(require 'assoc)
(eval-when-compile
;; to avoid compiler grips
(require 'cl))
;; XEmacs
(silentcomp-defun redraw-modeline)
(silentcomp-defvar modeline-map)
(silentcomp-defvar progress-feedback-use-echo-area)
;; Emacs
(silentcomp-defun force-mode-line-update)
(silentcomp-defun font-lock-add-keywords)
(silentcomp-defvar current-menubar)
(silentcomp-defun find-menu-item)
(silentcomp-defun add-submenu)
(silentcomp-defun delete-menu-item)
(silentcomp-defun Info-goto-node)
(silentcomp-defun ecb-speedbar-deactivate)
(silentcomp-defvar ecb-speedbar-buffer-name)
;;====================================================
;; Variables
;;====================================================
(defvar ecb-major-mode-selected-source nil
"Major-mode of currently selected source.")
(defvar ecb-item-in-tree-buffer-selected nil
"Only true if any item in any tree-buffer has been selected in recent
command.")
(defun ecb-initialize-all-internals (&optional no-caches)
(ecb-tree-buffers-init)
(setq ecb-major-mode-selected-source nil
ecb-item-in-tree-buffer-selected nil)
(ecb-file-browser-initialize no-caches)
(ecb-method-browser-initialize no-caches))
;; Klaus Berndl <[email protected]>: FRAME-LOCAL
(defvar ecb-minor-mode nil
"Do not set this variable directly. Use `ecb-activate' and
`ecb-deactivate' or `ecb-minor-mode'.!")
(defvar ecb-activated-window-configuration nil
"Window configuration used after the ECB is activated.")
;;====================================================
;; Customization
;;====================================================
(defgroup ecb nil
"Emacs code browser."
:group 'tools
:prefix "ecb-")
(defgroup ecb-general nil
"General settings for the Emacs code browser."
:group 'ecb
:prefix "ecb-")
(defgroup ecb-most-important nil
"The most important settings of ECB you should know."
:group 'ecb
:prefix "ecb-")
(defcustom ecb-use-recursive-edit nil
"*Tell ECB to use a recursive edit.
If set then it can easily be deactivated by \(keyboard-escape-quit)."
:group 'ecb-general
:type 'boolean)
(defcustom ecb-auto-activate nil
"*Automatically startup ECB when Emacs starts up.
This should only be true if you always want to run `ecb-activate'."
:group 'ecb-general
:group 'ecb-most-important
:type 'boolean)
(defcustom ecb-activation-selects-ecb-frame-if-already-active 'ask
"*Trying to activate an already activated ECB selects the ECB-frame.
If t then the ECB-frame is selected, if nil then it is not. If 'ask then ECB
asks if the ECB-frame should be selected if the current-frame is not the
`ecb-frame'."
:group 'ecb-general
:type '(radio (const :tag "Select the ECB-frame" :value t)
(const :tag "Ask if the ECB-frame should be selected" :value ask)
(const :tag "Do not select the ECB-frame" :value nil)))
(defcustom ecb-clear-caches-before-activate nil
"*Clear all ECB internal caches before startup.
If t then ECB clears all its internal caches before starting up. Caches are
used for files- and subdirs \(see `ecb-cache-directory-contents' and
`ecb-cache-directory-contents-not') for semantic-tags and for the
history-filter.
This caches are completely empty at load-time of the ECB-library!
Default is nil, because is makes sense not to clear these caches at start-time
because ECB is often deacticated temporally especially in combination with
window-managers like escreen.el. In these situations the internal state of ECB
should be preserved for next activation."
:group 'ecb-general
:type 'boolean)
(defcustom ecb-stealthy-tasks-delay 1
"*Time Emacs must be idle before ECB runs its stealthy tasks.
Currently ECB performes the following stealthy tasks:
Prescann directories for emptyness: Prescann directories and display them as
empty or not-empty in the directories-buffer. See the documentation of the
option `ecb-prescan-directories-for-emptyness' for a description.
File is read only: Check if sourcefile-items of the directories- or
sources-buffer are read-only or not. See documentation of the option
`ecb-sources-perform-read-only-check'.
Version-control-state: Checks the version-control-state of files in
directories which are managed by a VC-backend. See the option
`ecb-vc-enable-support'.
Here the interval is defined ECB has to be idle before starting with these
stealthy tasks. It can be a floating-point value in seconds. The value can
also be changed during running ECB."
:group 'ecb-general
:group 'ecb-most-important
:type '(number :tag "Idle time before running stealthy tasks"
:value 1)
:initialize 'custom-initialize-default
:set (function (lambda (sym val)
(set sym val)
(ecb-activate-ecb-autocontrol-function
val 'ecb-stealthy-updates))))
(defcustom ecb-minor-mode-text " ECB"
"*String to display in the mode line when ECB minor mode is active.
\(When the string is not empty, make sure that it has a leading space.)
Because for ECB it is quite obvious if it is active or not when the
ECB-windows are visible this text is only display in the modeline if the
ECB-windows are hidden."
:group 'ecb-general
:type 'string)
(defcustom ecb-auto-compatibility-check t
"*Check at ECB-startup if all ECB-options have correct values.
If not nil then all ECB-options are checked if their current value have the
correct type. It the type is incorrect the option is either auto. upgraded to
the new type or reset to the default-value of current ECB if no upgrade is
possible. This feature can also upgrade options which are renamed in current
ECB and try to transform the old-value to the new named option. After startup
all upgraded or reset options are displayed with their old \(before
upgrade/reset) and new values. See also the commands `ecb-upgrade-options' and
`ecb-display-upgraded-options'. If this option is off then the user can
perform the check and reset manually with `ecb-upgrade-options'."
:group 'ecb-general
:type 'boolean)
(defcustom ecb-version-check t
"*Checks at start-time if the requirements are fulfilled.
It checks if the required versio of CEDET is installed and loaded into Emacs.
It is strongly recommended to set this option to not nil!"
:group 'ecb-general
:type 'boolean)
(defcustom ecb-debug-mode nil
"*If not nil ECB displays debug-information in the Messages-buffer.
This is done for some critical situations concerning semantic-tags and their
overlays \(or extends for XEmacs). Normally you should not need this switched
on! But if you get errors like \"destroyed extend\" for XEmacs or
\"wrong-argument-type\" concerning overlays for GNU Emacs then you should
switch on this option and submitting a bug-report to the ecb-mailing-list
\(`ecb-submit-problem-report') after getting the error again!"
:group 'ecb-general
:type 'boolean)
(defcustom ecb-run-ediff-in-ecb-frame t
"*Run ediff-sessions in the same frame as ECB is running.
If not nil then ECB ensures that ediff runs in the same frame as ECB and ECB
restores exactly the \"before-ediff\"-window-layout after quiting ediff. If
nil then ediff decides in which frame it will run - depending on the current
window-layout \(e.g. if the ecb-windows are currently hidden) this can be the
ecb-frame but this can also be a newly created frame or any other frame."
:group 'ecb-general
:type 'boolean)
(defcustom ecb-activate-before-layout-draw-hook nil
"*Hook run at the end of activating ECB by `ecb-activate'.
These hooks run after all the internal setup process but directly before\(!)
drawing the layout specified in `ecb-layout' \(means before dividing the frame
into several windows). A senseful using of this hook can be maximizing the
Emacs-frame for example, because this should be done before the layout is
drawn because ECB computes the size of the ECB-windows with the current frame
size! If you need a hook-option for the real end of the activating process
\(i.e. after the layout-drawing) look at `ecb-activate-hook'.
IMPORTANT: The difference between this hook and
`ecb-redraw-layout-before-hook' is that the latter one is evaluated always
before the layout is redrawn \(for example after calling `ecb-redraw-layout')
whereas the former one \(this hook) is only evaluated exactly once during the
activation-process of ECB. So during the activation process there is the
following sequence of hooks:
1. 'ecb-activate-before-layout-draw-hook' \(this one)
2. `ecb-redraw-layout-before-hook'
3. <Drawing the layout>
4. `ecb-redraw-layout-after-hook'
5. `ecb-activate-hook'"
:group 'ecb-general
:type 'hook)
(defcustom ecb-before-activate-hook nil
"*Hook run at the beginning of activating ECB by `ecb-activate'.
These hooks run before any other tasks of the activating process are
performed. If any of these hooks returns nil then ECB will not be activated!
This can be used to check some conditions and then only start ECB if all
conditions are true. For example a function could be added which returns only
nil if Gnus is running. Then calling `ecb-activate' or `ecb-minor-mode' will
only start ECB if Gnus is not already running."
:group 'ecb-general
:type 'hook)
(defcustom ecb-activate-hook nil
"*Hook run at the end of activating ECB by `ecb-activate'.
These hooks run at the real end of the activating process, means after the
layout has been drawn!. If you need hooks which are run direct before the
layout-drawing look at `ecb-activate-before-layout-draw-hook'."
:group 'ecb-general
:type 'hook)
(defcustom ecb-deactivate-hook nil
"*Hook run at the end of deactivating ECB by `ecb-deactivate'.
These hooks run before the ecb-layout is cleared!"
:group 'ecb-general
:type 'hook)
(defcustom ecb-before-deactivate-hook nil
"*Hook run at the beginning of deactivating ECB by `ecb-deactivate'.
These hooks run before any other tasks of the deactivating process are
performed. If any of these hooks returns nil then ECB will not be deactivated!
See also `ecb-before-activate-hook'."
:group 'ecb-general
:type 'hook)
;;====================================================
;; Internals
;;====================================================
(defun ecb-kill-buffer-hook ()
"Function added to the `kill-buffer-hook' during ECB activation.
It does several tasks:
- Depending on the value in `ecb-kill-buffer-clears-history' the corresponding
entry in the history-buffer is removed.
- Clearing the method buffer if a file-buffer has been killed.
- The entry of the removed file-buffer is removed from `ecb-tag-tree-cache'."
(let* ((curr-buf (current-buffer))
(buffer-file (ecb-fix-filename (ecb-buffer-file-name curr-buf))))
;; this prevents automatically from killing one of the ecb-buffers because
;; these ones are never releated to file!
(when buffer-file
;; 1. clearing the history if necessary
(ecb-history-kill-buffer-clear curr-buf)
;; 2. clearing the method buffer if a file-buffer is killed
(ecb-rebuild-methods-buffer-with-tagcache nil nil t)
;; 3. removing the file-buffer from `ecb-tag-tree-cache'. Must be done
;; after 2. because otherwise a new element in the cache would be
;; created again by `ecb-rebuild-methods-buffer-with-tagcache'.
(ecb-clear-tag-tree-cache (buffer-name curr-buf)))
(when (member curr-buf (ecb-get-current-visible-ecb-buffers))
(ecb-error "Killing an special ECB-buffer is not possible!"))))
(defun ecb-window-sync (&optional only-basic-windows)
"Synchronizes all special ECB-buffers with current buffer.
Depending on the contents of current buffer this command performs different
synchronizing tasks but only if ECB is active and point stays in an
edit-window.
- If current buffer is a file-buffer \(or an indirect-buffer with a
file-buffer as base-buffer) then all special ECB-tree-buffers are
synchronized with current buffer.
- If current buffer is a dired-buffer then the directory- and
the sources-tree-buffer are synchronized if visible
In addition to this the hooks in `ecb-basic-buffer-sync-hook' run.
If optional argument only-basic-windows is not nil then only the basic
tree-buffer directories, sources, methods and history are synchronized.
Otherwise all registered special ecb-buffers."
(interactive "P")
(when (and ecb-minor-mode
(not ecb-windows-hidden)
(ecb-point-in-edit-window-number))
(ecb-basic-buffer-sync t)
;; look in the sync-register and call all sync-function registered with a
;; buffer-name when buffer is contained in the list of buffers returned by
;; ecb-get-current-visible-ecb-buffers.
(unless only-basic-windows
(let ((visible-ecb-windows (ecb-get-current-visible-ecb-buffers)))
(dolist (elem ecb-autocontrol/sync-fcn-register)
(when (and (cdr elem)
(member (get-buffer (symbol-value (cdr elem)))
visible-ecb-windows))
(funcall (car elem) t)))))
))
(defun ecb-customize ()
"Open a customize-buffer for all customize-groups of ECB."
(interactive)
(ecb-select-edit-window)
(customize-group "ecb"))
(defun ecb-customize-most-important ()
"Open a customize-buffer for the most important options of ECB."
(interactive)
(ecb-select-edit-window)
(customize-group "ecb-most-important"))
;;====================================================
;; ECB minor mode: Create buffers & menus & maps
;;====================================================
(defun ecb-menu-item (item)
"Build an XEmacs compatible menu item from vector ITEM.
That is remove the unsupported :help stuff."
(if ecb-running-xemacs
(let ((n (length item))
(i 0)
slot l)
(while (< i n)
(setq slot (aref item i))
(if (and (keywordp slot)
(eq slot :help))
(setq i (1+ i))
(setq l (cons slot l)))
(setq i (1+ i)))
(apply #'vector (nreverse l)))
item))
(defvar ecb-menu-name "ECB")
(defvar ecb-menu-bar
(list
ecb-menu-name
(ecb-menu-item
[ "Select ECB frame"
ecb-select-ecb-frame
:active (and ecb-minor-mode
(not (equal (selected-frame) ecb-frame)))
:help "Select the ECB-frame."
])
(ecb-menu-item
[ "Synchronize ECB windows"
(ecb-window-sync)
:active (and (equal (selected-frame) ecb-frame)
(ecb-point-in-edit-window-number))
:help "Synchronize the ECB windows with the current edit-window."
])
(ecb-menu-item
[ "Update directories buffer"
ecb-update-directories-buffer
:active (equal (selected-frame) ecb-frame)
:help "Updates the directories buffer with current disk-state"
])
(ecb-menu-item
[ "Add all buffers to history"
ecb-add-all-buffers-to-history
:active (and (equal (selected-frame) ecb-frame)
(ecb-window-live-p ecb-history-buffer-name))
:help "Add all current file-buffers to history"
])
"-"
(ecb-menu-item
[ "Rebuild methods buffer"
ecb-rebuild-methods-buffer
:active (equal (selected-frame) ecb-frame)
:help "Rebuild the methods buffer completely"
])
(ecb-menu-item
[ "Expand methods buffer"
ecb-expand-methods-nodes
:active (equal (selected-frame) ecb-frame)
:help "Expand all nodes of a certain indent-level"
])
(ecb-menu-item
[ "Toggle auto. expanding of the method buffer"
ecb-toggle-auto-expand-tag-tree
:active (equal (selected-frame) ecb-frame)
:help "Toggle auto. expanding of the method buffer"
])
"-"
(ecb-menu-item
[ "Change layout"
ecb-change-layout
:active (equal (selected-frame) ecb-frame)
:help "Change the layout."
])
(ecb-menu-item
[ "Redraw layout"
ecb-redraw-layout
:active (equal (selected-frame) ecb-frame)
:help "Redraw the current layout."
])
(ecb-menu-item
[ "Toggle layout"
ecb-toggle-layout
:active (and (equal (selected-frame) ecb-frame)
(> (length ecb-toggle-layout-sequence) 1))
:help "Toggle between several layouts"
])
(ecb-menu-item
[ "Toggle visibility of ECB windows"
ecb-toggle-ecb-windows
:active (equal (selected-frame) ecb-frame)
:help "Toggle the visibility of all ECB windows."
])
(list
"Layout administration"
(ecb-menu-item
[ "Store current window-sizes"
ecb-store-window-sizes
:active (equal (selected-frame) ecb-frame)
:help "Store current sizes of the ecb-windows in current layout."
])
(ecb-menu-item
[ "Restore sizes of the ecb-windows"
ecb-restore-window-sizes
:active (equal (selected-frame) ecb-frame)
:help "Restore the sizes of the ecb-windows in current layout."
])
(ecb-menu-item
[ "Restore default-sizes of the ecb-windows"
ecb-restore-default-window-sizes
:active (equal (selected-frame) ecb-frame)
:help "Restore the default-sizes of the ecb-windows in current layout."
])
"-"
(ecb-menu-item
[ "Create new layout"
ecb-create-new-layout
:active (equal (selected-frame) ecb-frame)
:help "Create a new ECB-layout."
])
(ecb-menu-item
[ "Delete new layout"
ecb-delete-new-layout
:active (equal (selected-frame) ecb-frame)
:help "Delete an user-created ECB-layout."
])
"-"
(ecb-menu-item
[ "Show help for a layout"
ecb-show-layout-help
:active t
:help "Show the documentation for a layout."
]))
"-"
(ecb-menu-item
[ "Toggle compile window"
ecb-toggle-compile-window
:active (equal (selected-frame) ecb-frame)
:help "Toggle visibility of compile window."
])
(ecb-menu-item
[ "Toggle enlarged compile window"
ecb-toggle-compile-window-height
:active (and (equal (selected-frame) ecb-frame)
ecb-compile-window
(ecb-compile-window-live-p))
:help "Toggle enlarged compile window."
])
"-"
(list
"Navigate"
(ecb-menu-item
["Previous \(back)"
ecb-nav-goto-previous
:active t
:help "Go to the previous navigation point"
])
(ecb-menu-item
["Next \(forward)"
ecb-nav-goto-next
:active t
:help "Go to the next navigation point"
]))
(list
"Goto window"
(ecb-menu-item
["Last selected edit-window"
ecb-goto-window-edit-last
:active t
:help "Go to the last selected edit-window"
])
(ecb-menu-item
["Edit-window 1"
ecb-goto-window-edit1
:active t
:help "Go to the first edit-window"
])
(ecb-menu-item
["Edit-window 2"
ecb-goto-window-edit2
:active (ecb-edit-window-splitted)
:help "Go to the second edit-window \(if splitted\)"
])
(ecb-menu-item
["Directories"
ecb-goto-window-directories
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-directories-buffer-name)
:help "Go to the directories window"
])
(ecb-menu-item
["Sources"
ecb-goto-window-sources
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-sources-buffer-name)
:help "Go to the sources window"
])
(ecb-menu-item
["Methods and Variables"
ecb-goto-window-methods
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-methods-buffer-name)
:help "Go to the methods/variables window"
])
(ecb-menu-item
["History"
ecb-goto-window-history
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-history-buffer-name)
:help "Go to the history window"
])
(ecb-menu-item
["Analyse"
ecb-goto-window-analyse
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-analyse-buffer-name)
:help "Go to the analyse window"
])
(ecb-menu-item
["Speedbar"
ecb-goto-window-speedbar
:active (and ecb-use-speedbar-instead-native-tree-buffer
(ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-speedbar-buffer-name))
:help "Go to the integrated speedbar window"
])
(ecb-menu-item
["Compilation"
ecb-goto-window-compilation
:active (equal 'visible (ecb-compile-window-state))
:help "Go to the history window"
])
)
(list
"Display window maximized"
(ecb-menu-item
["Directories"
ecb-maximize-window-directories
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-directories-buffer-name)
:help "Maximize the directories window - even if currently not visible"
])
(ecb-menu-item
["Sources"
ecb-maximize-window-sources
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-sources-buffer-name)
:help "Maximize the sources window - even if currently not visible"
])
(ecb-menu-item
["Methods and Variables"
ecb-maximize-window-methods
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-methods-buffer-name)
:help "Maximize the methods/variables window - even if currently not visible"
])
(ecb-menu-item
["History"
ecb-maximize-window-history
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-history-buffer-name)
:help "Maximize the history window - even if currently not visible"
])
(ecb-menu-item
["Analyse"
ecb-maximize-window-analyse
:active (ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-analyse-buffer-name)
:help "Maximize the analyse window - even if currently not visible"
])
(ecb-menu-item
["Speedbar"
ecb-maximize-window-speedbar
:active (and ecb-use-speedbar-instead-native-tree-buffer
(ecb-buffer-is-ecb-buffer-of-current-layout-p ecb-speedbar-buffer-name))
:help "Maximize the integrated speedbar window - even if not visible"
])
)
"-"
(list
"Preferences"
(ecb-menu-item
["Most important..."
(customize-group "ecb-most-important")
:active t
:help "Customize the most important options"
])
(ecb-menu-item
["All..."
(ecb-customize)
:active t
:help "Display all available option-groups..."
])
"-"
(ecb-menu-item
["General..."
(customize-group "ecb-general")
:active t
:help "Customize general ECB options"
])
(ecb-menu-item
["Directories..."
(customize-group "ecb-directories")
:active t
:help "Customize ECB directories"
])
(ecb-menu-item
["Sources..."
(customize-group "ecb-sources")
:active t
:help "Customize ECB sources"
])
(ecb-menu-item
["Methods..."
(customize-group "ecb-methods")
:active t
:help "Customize ECB method display"
])
(ecb-menu-item
["History..."
(customize-group "ecb-history")
:active t
:help "Customize ECB history"
])
(ecb-menu-item
["Analyse..."
(customize-group "ecb-analyse")
:active t
:help "Customize ECB analyse ingeractor"
])
(ecb-menu-item
["Version control..."
(customize-group "ecb-version-control")
:active t
:help "Customize the version-control-support"
])
(ecb-menu-item
["Layout..."
(customize-group "ecb-layout")
:active t
:help "Customize ECB layout"
])
(ecb-menu-item
["Tree-buffer style and handling..."
(customize-group "ecb-tree-buffer")
:active t
:help "Customize the tree-buffers of ECB"
])
(ecb-menu-item
["Face options..."
(customize-group "ecb-face-options")
:active t
:help "Customize ECB faces"
])
(ecb-menu-item
["Help options..."
(customize-group "ecb-help")
:active t
:help "Customize options for the online help of ECB"
])
(ecb-menu-item
["ECB/eshell options..."
(customize-group "ecb-eshell")
:active t
:help "Customize options for the eshell integration of ECB"
])
(ecb-menu-item
["Supporting non-semantic-sources..."
(customize-group "ecb-non-semantic")
:active t
:help "Customize options for parsing non-semantic-sources"
])
(ecb-menu-item
["Supporting window-managers..."
(customize-group "ecb-winman-support")
:active t
:help "Customize options for the window-manager-support"
])
)
(list
"Upgrade ECB"
(ecb-menu-item
[ "Upgrade ECB-options to current ECB-version"
ecb-upgrade-options
:active (equal (selected-frame) ecb-frame)
:help "Try to upgrade ECB-options to current ECB-version if necessary."
])
)
(list
"Help"
(ecb-menu-item
[ "Show Online Help"
ecb-show-help
:active t
:help "Show the online help of ECB."
])
(ecb-menu-item
[ "ECB NEWS"
(ecb-display-news-for-upgrade t)
:active t
:help "Displays the NEWS-file of ECB."
])
(ecb-menu-item
[ "List of most important options"
(let ((ecb-show-help-format 'info))
(ecb-show-help)
(Info-goto-node "Most important options"))
:active t
:help "Displays a a list of options which you should know."
])
(ecb-menu-item
[ "List of all options"
(let ((ecb-show-help-format 'info))
(ecb-show-help)
(Info-goto-node "Option Index"))
:active t
:help "Displays an index of all user-options in the online-help."
])
(ecb-menu-item
[ "List of all commands"
(let ((ecb-show-help-format 'info))
(ecb-show-help)
(Info-goto-node "Command Index"))
:active t
:help "Displays an index of all commands in the online-help."
])
(ecb-menu-item
[ "FAQ"
(let ((ecb-show-help-format 'info))
(ecb-show-help)
(Info-goto-node "FAQ"))
:active t
:help "Show the FAQ of ECB."
])
(ecb-menu-item
[ "Conflicts with other packages"
(let ((ecb-show-help-format 'info))
(ecb-show-help)
(Info-goto-node "Conflicts and bugs"))
:active t
:help "What to do for conflicts with other packages."
])
(ecb-menu-item
[ "Submit problem report"
ecb-submit-problem-report
:active t
:help "Submit a problem report to the ECB mailing list."
])
(ecb-menu-item
[ "ECB Debug mode"
(setq ecb-debug-mode (not ecb-debug-mode))
:active t
:style toggle
:selected ecb-debug-mode
:help "Print debug-informations about parsing files in the message buffer."
])
(ecb-menu-item
[ "ECB Layout Debug mode"
(setq ecb-layout-debug-mode (not ecb-layout-debug-mode))
:active t
:style toggle
:selected ecb-layout-debug-mode
:help "Print debug-informations about window-operations in the message buffer."
])
"-"
(ecb-menu-item