Skip to content
Browse files

Added Malabar mode for Java and a new ECB install to work with the bu…

…ilt-in CEDET in Emacs 23.2+
  • Loading branch information...
1 parent c506890 commit 5a53f8ae657b5b6c079471e48b817fceda9a690b Patrick Aikens committed Mar 15, 2012
Showing with 20,040 additions and 35 deletions.
  1. +1 −1 site-lisp/config/development.el
  2. +4 −34 site-lisp/config/java.el
  3. +259 −0 site-lisp/ecb-snap/Makefile
  4. +3,131 −0 site-lisp/ecb-snap/NEWS
  5. +210 −0 site-lisp/ecb-snap/README
  6. +288 −0 site-lisp/ecb-snap/RELEASE_NOTES
  7. +281 −0 site-lisp/ecb-snap/ecb-advice-test.el
  8. +714 −0 site-lisp/ecb-snap/ecb-analyse.el
  9. +160 −0 site-lisp/ecb-snap/ecb-autogen.el
  10. +72 −0 site-lisp/ecb-snap/ecb-autoloads.el
  11. +368 −0 site-lisp/ecb-snap/ecb-cedet-wrapper.el
  12. +2,178 −0 site-lisp/ecb-snap/ecb-common-browser.el
  13. +369 −0 site-lisp/ecb-snap/ecb-compatibility.el
  14. +312 −0 site-lisp/ecb-snap/ecb-compilation.el
  15. +862 −0 site-lisp/ecb-snap/ecb-create-layout.el
  16. +137 −0 site-lisp/ecb-snap/ecb-cycle.el
  17. +394 −0 site-lisp/ecb-snap/ecb-eshell.el
  18. +560 −0 site-lisp/ecb-snap/ecb-examples.el
  19. +768 −0 site-lisp/ecb-snap/ecb-face.el
  20. +4,868 −0 site-lisp/ecb-snap/ecb-file-browser.el
  21. +458 −0 site-lisp/ecb-snap/ecb-help.el
  22. +48 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-close.xpm
  23. +41 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-empty.xpm
  24. +15 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-end-guide.xpm
  25. +15 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-guide.xpm
  26. +16 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-handle.xpm
  27. +34 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-leaf.xpm
  28. +14 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-no-guide.xpm
  29. +15 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-no-handle.xpm
  30. +50 −0 site-lisp/ecb-snap/ecb-images/default/height-10/ecb-open.xpm
  31. +51 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-close.xpm
  32. +277 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-empty.xpm
  33. +277 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-end-guide.xpm
  34. +277 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-guide.xpm
  35. +19 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-handle.xpm
  36. +277 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-leaf.xpm
  37. +277 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-no-guide.xpm
  38. +18 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-no-handle.xpm
  39. +53 −0 site-lisp/ecb-snap/ecb-images/default/height-14/ecb-open.xpm
  40. +53 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-close.xpm
  41. +278 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-empty.xpm
  42. +278 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-end-guide.xpm
  43. +278 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-guide.xpm
  44. +21 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-handle.xpm
  45. +278 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-leaf.xpm
  46. +278 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-no-guide.xpm
  47. +20 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-no-handle.xpm
  48. +55 −0 site-lisp/ecb-snap/ecb-images/default/height-15/ecb-open.xpm
  49. +54 −0 site-lisp/ecb-snap/ecb-images/default/height-16/ecb-close.xpm
  50. +279 −0 site-lisp/ecb-snap/ecb-images/default/height-16/ecb-empty.xpm
Sorry, we could not display the entire diff because it was too big.
View
2 site-lisp/config/development.el
@@ -1,5 +1,5 @@
;(add-local-load-path "cedet-1.0")
-(add-local-load-path "ecb-2.40")
+(add-local-load-path "ecb-snap")
(add-local-load-path "gtags")
;; Load CEDET
View
38 site-lisp/config/java.el
@@ -1,39 +1,9 @@
(add-local-load-path "elib-1.0")
-(add-local-load-path "jdee-2.4.0.1/lisp")
+(add-local-load-path "malabar/lisp")
-;(setq defer-loading-jde t)
-;(if defer-loading-jde
-; (progn
-; (autoload 'jde-mode "jde" "JDE mode." t)
-; (add-to-list 'auto-mode-alist '("\\.java$" . jde-mode)))
-; (require 'jde))
-
-;(eval-after-load "jde"
-; '(progn
-; (defun my-jde-mode-hook ()
-; (c-add-style
-; "my-java"
-; '("java"
-; (c-basic-offset . 4)
-; (c-hanging-braces-alist . (
-; (substatement-open after)
-; ))
-; ))
-; (c-set-style "my-java")
-; ; (setq c-auto-newline t)
-; (setq c-comment-continuation-stars "* ")
-; (define-key c-mode-base-map "\C-m" 'newline-and-indent)
-; (define-key c-mode-base-map (kbd "RET") 'reindent-then-newline-and-indent)
-; )
-
-; (setq jde-jdk-registry '(
-; ("1.5.0_22" . "c:/program files/java/1.5.0_22")
-; ("1.6.0_13" . "c:/program files/java/1.6.0_13")
-; ("default" . "$JAVA_HOME")
-; )
-; )
-; (setq jde-jdk '("default"))
-; (add-hook 'jde-mode-hook 'my-jde-mode-hook)))
+(require 'malabar-mode)
+(setq malabar-groovy-lib-dir (concat emacs-local-site-lisp "malabar/lib"))
+(add-to-list 'auto-mode-alist '("\\.java\\'" . malabar-mode))
(setq-mode-local java-mode
semanticdb-find-default-throttle
View
259 site-lisp/ecb-snap/Makefile
@@ -0,0 +1,259 @@
+# This Makefile byte-compiles the ECB lisp files and generates online-help.
+
+# Copyright (C) 2000 - 2010 Jesper Nordenberg,
+# Klaus Berndl,
+# Free Software Foundation, Inc.
+
+# Author: Jesper Nordenberg <mayhem@home.se>
+# Klaus Berndl <klaus.berndl@sdm.de>
+# Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
+# Keywords: browser, code, programming, tools
+# Created: 2001
+
+# 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: Makefile,v 1.119 2010/02/22 16:33:42 berndl Exp $
+
+
+# ========================================================================
+# User configurable section
+
+# ------------------------------------------------------------------------
+# Byte-compiling ECB:
+# ------------------------------------------------------------------------
+
+# Define here the correct path to your Emacs or XEmacs binary. Ensure you
+# have set this variable to 'xemacs' if you want byte-compile with XEmacs!
+EMACS=emacs
+
+# In the following path-settings of this section use always FORWARD-SLASHES
+# as directory-separator even with MS Windows systems.
+
+# -------- Compiling ECB with the cedet-library ----------------------
+
+# cedet >= 1.0pre6 (contains a.o. semantic >= 2.0, eieio >= 0.18 and
+# speedbar >= 0.15).
+#
+# + If you use Emacs >= 23.2 and you want to use the integrated CEDET:
+# Set this to empty (CEDET=)
+#
+# + If you use Emacs < 23.2 or if you want to use the author version of CEDET:
+# Set this to the full path of your CEDET-installation.
+
+#CEDET=
+CEDET=c:/Programme/emacs-23.1/site-lisp/package-development/cedet
+
+# You can set here more load-paths to arbitrary packages if you want. But
+# this is really not necessary!
+LOADPATH=
+
+# Two ways to build ECB:
+# - Call "make" to byte-compile the ECB. You can savely ignore the messages.
+# - Or call
+#
+# make [EMACS="path/to/emacs"] [CEDET="path/to/cedet" or empty]
+#
+# if you want to set either different load-paths or Emacs-binary and
+# you do not want edit the Makefile. Do not forget quoting the arguments
+# if they contain spaces!
+#
+# If there are any warning messages during byte-compilation (normally there
+# are not any) you can savely ignore them!
+
+
+# ------------------------------------------------------------------------
+# Generating different online-help formats
+# ------------------------------------------------------------------------
+
+# If you want to generate all formats of online-help from the texi-source
+# you must set here the FULL paths to the required tools. The Makefile
+# tests if the tools are available on these locations, so if a tool x is
+# not available let the related setting X empty! NOTE: For generating the
+# PDF-format you will need an installed TeX and Ghostscript!
+MAKEINFO=/usr/bin/makeinfo
+TEXI2DVI=/C/Programme/texmf/miktex/bin/texi2dvi
+# You need either the dvipdfm-tool
+#DVIPDFM=/C/Programme/texmf/miktex/bin/dvipdfm
+DVIPDFM=
+# or the tools dvips and ps2pdf. If dvipdfm is available the Makefile uses
+# this one!
+DVIPS=/C/Programme/texmf/miktex/bin/dvips
+PS2PDF=/C/home/bin/ps2pdf
+
+# To generate the online-formats just call "make online-help" for info- and
+# HTML-format and "make pdf" for PDF-format.
+
+# ------------------------------------------------------------------------
+# Installing the info online-help in the Top-directory of (X)Emacs-info
+# ------------------------------------------------------------------------
+
+# Set here the path of the info subdirectory of your (X)Emacs installation
+# which contains the dir file.
+EMACSINFOPATH=/C/Programme/emacs-22.3/info
+
+# If you want to install the info-format of the online-help in the
+# Top-directory of the info-directory of (X)Emacs (see above EMACSINFOPATH)
+# then you must specify the full path of the tool install-info.
+INSTALLINFO=/usr/bin/install-info
+
+# To install the online-help just call "make install-help"
+
+# end of user configurable section
+# ========================================================================
+
+
+# ========================================================================
+# !!!!!!!!!!!!!!!!!!!!! Do not change anything below !!!!!!!!!!!!!!!!!!!!!
+# ========================================================================
+
+
+# $Id: Makefile,v 1.119 2010/02/22 16:33:42 berndl Exp $
+
+# For the ECB-maintainers: Change the version-number here and not
+# elsewhere!
+ecb_VERSION=2.41
+
+include ecb-makedef.mk
+
+ecb: $(ecb_LISP_EL)
+ @echo "Byte-compiling ECB with LOADPATH=${LOADPATH} ..."
+ @$(RM) $(ecb_LISP_ELC) ecb-compile-script
+ @echo "(add-to-list 'load-path nil)" > ecb-compile-script
+ @if test ! -z "${CEDET}"; then\
+ echo "(load-file \"$(CEDET)/common/cedet.el\")" >> ecb-compile-script; \
+ else \
+ echo "(semantic-mode 1)" >> ecb-compile-script; \
+ echo "(require 'semantic/bovine/el)" >> ecb-compile-script; \
+ fi
+ @if test ! -z "${LOADPATH}"; then\
+ for loadpath in ${LOADPATH}; do \
+ echo "(add-to-list 'load-path \"$$loadpath\")" >> ecb-compile-script; \
+ done; \
+ fi
+ @echo "(require 'ecb)" >> ecb-compile-script
+ @echo "(setq debug-on-error t)" >> ecb-compile-script
+ $(EBATCH) -l ecb-compile-script --eval '(ecb-byte-compile t)'
+ @$(RM) ecb-compile-script
+
+all: ecb online-help
+
+online-help: $(ecb_TEXI)
+ @if test -x "$(MAKEINFO)"; then\
+ $(RM) -R $(ecb_INFO_DIR) $(ecb_HTML_DIR); \
+ $(MKDIR) $(ecb_INFO_DIR) $(ecb_HTML_DIR); \
+ echo Generating info-format...; \
+ $(MAKEINFO) --fill-column=78 $<; \
+ $(MV) *.info* $(ecb_INFO_DIR); \
+ echo Generating html-format...; \
+ $(MAKEINFO) --html --output=$(ecb_HTML_DIR) $<; \
+ for file in $(ecb_HTML_DIR)/*.html; do\
+ $(MV) $$file tmpfile; \
+ sed "s/index\\.html/$(ecb_HTML)/g" tmpfile > $$file; \
+ $(RM) tmpfile; \
+ done; \
+ $(MV) $(ecb_HTML_DIR)/index.html $(ecb_HTML_DIR)/$(ecb_HTML); \
+ else \
+ echo No info- and html-format generating because the tool; \
+ echo - makeinfo in $(MAKEINFO); \
+ echo is not available!; \
+ fi
+
+pdf: $(ecb_TEXI)
+ @if test -x "$(TEXI2DVI)" -a -x "$(DVIPDFM)"; then\
+ $(RM) $(ecb_DVI) $(ecb_PDF); \
+ echo Generating pdf-format with dvipdfm ...; \
+ $(TEXI2DVI) --clean $<; \
+ $(DVIPDFM) $(ecb_DVI); \
+ $(RM) $(ecb_DVI); \
+ elif test -x "$(TEXI2DVI)" -a -x "$(DVIPS)" -a -x "$(PS2PDF)"; then\
+ $(RM) $(ecb_DVI) $(ecb_PS) $(ecb_PDF); \
+ echo Generating pdf-format with dvips and ps2pdf ...; \
+ $(TEXI2DVI) --quiet --clean $<; \
+ $(DVIPS) -Pcmz -q $(ecb_DVI) -o $(ecb_PS); \
+ $(PS2PDF) $(ecb_PS); \
+ $(RM) $(ecb_DVI) $(ecb_PS); \
+ else \
+ echo No pdf-format generating because at least one of the tools; \
+ echo - texi2dvi in $(TEXI2DVI); \
+ echo - dvips in $(DVIPS); \
+ echo - ps2pdf in $(PS2PDF); \
+ echo is not available!; \
+ fi
+
+
+install-help: $(ecb_INFO_DIR)/$(ecb_INFO)
+ @if test -x "$(INSTALLINFO)" -a -f "$(EMACSINFOPATH)/dir"; then\
+ echo Installing the Online-help in $(EMACSINFOPATH)...; \
+ $(CP) $(ecb_INFO_DIR)/*info* $(EMACSINFOPATH); \
+ $(INSTALLINFO) $< $(EMACSINFOPATH)/dir; \
+ else \
+ echo Can not install the online-help because either; \
+ echo - the tool $(INSTALLINFO) or; \
+ echo - the file $(EMACSINFOPATH)/dir; \
+ echo is not available!; \
+ fi
+
+
+clean:
+ @$(RM) $(ecb_LISP_ELC) ecb-compile-script
+
+# The targets below are only for maintaining the ECB-package.
+
+$(ecb_INFO_DIR)/$(ecb_INFO): online-help
+
+# updates RELEASE_NOTES, README, NEWS, ecb.texi and ecb.el to the
+# version-number of $(ecb_VERSION).
+prepversion:
+ @$(MV) RELEASE_NOTES RELEASE_NOTES.tmp
+ @sed "1s/version.*/version $(ecb_VERSION)/" RELEASE_NOTES.tmp > RELEASE_NOTES
+ @$(RM) RELEASE_NOTES.tmp
+ @$(MV) README README.tmp
+ @sed "1s/version.*/version $(ecb_VERSION)/" README.tmp > README
+ @$(RM) README.tmp
+ @$(MV) NEWS NEWS.tmp
+ @sed "1s/version.*/version $(ecb_VERSION)/" NEWS.tmp > NEWS
+ @$(RM) NEWS.tmp
+ @$(MV) ecb-upgrade.el ecb-upgrade.el.tmp
+ @sed "s/^(defconst ecb-version.*/(defconst ecb-version \"$(ecb_VERSION)\"/" ecb-upgrade.el.tmp > ecb-upgrade.el
+ @$(RM) ecb-upgrade.el.tmp
+ @(echo "/@macro ecbver"; \
+ echo "+"; \
+ echo "c"; \
+ echo "$(ecb_VERSION)"; \
+ echo "."; \
+ echo "w"; \
+ echo "q") | ed -s $(ecb_TEXI) 1> /dev/null
+
+
+autoloads:
+ @$(RM) $(ecb_AUTOLOADS) $(ecb_AUTOLOADS)c
+ $(EBATCH) -l ecb-autogen -f ecb-update-autoloads
+
+
+# builds the distribution file $(ecb_VERSION).tar.gz
+distrib: $(ecb_INFO_DIR)/$(ecb_INFO) prepversion autoloads ecb
+ @$(RM) ecb-$(ecb_VERSION).tar.gz
+ @$(RM) -R ecb-$(ecb_VERSION)
+ @$(MKDIR) ecb-$(ecb_VERSION)
+ @$(CP) $(ecb_DISTRIB_FILES) ecb-$(ecb_VERSION)
+ @$(CP) -r $(ecb_INFO_DIR) ecb-$(ecb_VERSION)
+ @$(CP) -r $(ecb_HTML_DIR) ecb-$(ecb_VERSION)
+ @$(CP) -r $(ecb_IMAGE_DIR) ecb-$(ecb_VERSION)
+ @find ecb-$(ecb_VERSION)/$(ecb_IMAGE_DIR) -name CVS -print | xargs rm -Rf
+ @find ecb-$(ecb_VERSION)/$(ecb_IMAGE_DIR) -name *~ -print | xargs $(RM)
+ @find ecb-$(ecb_VERSION)/$(ecb_IMAGE_DIR) -name *.png -print | xargs $(RM)
+ @tar -cvzf ecb-$(ecb_VERSION).tar.gz ecb-$(ecb_VERSION)
+ @$(RM) -R ecb-$(ecb_VERSION)
+
+# End of Makefile
View
3,131 site-lisp/ecb-snap/NEWS
3,131 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
210 site-lisp/ecb-snap/README
@@ -0,0 +1,210 @@
+README for the Emacs Code Browser (ECB) version 2.40.1
+
+
+About
+-----
+
+This package contains a code browser for several programming-languages for
+(X)Emacs. For instructions on how to use the browser read the online-help
+either with the shipped info-manual (see "Usage" below) or direct from the
+ECB-Homepage at http://ecb.sourceforge.net.
+
+The latest version can be found at: http://ecb.sourceforge.net
+
+------------
+Requirements
+------------
+
+The short story:
+
+With Emacs >= 23.2 there is nothing to do. With XEmacs or Emacs < 23.2 you
+have to install the CEDET-suite by hand.
+
+The long story:
+
+1. Emacs-version: ECB works only with (X)Emacs >= 21! If you have an older
+ one, please upgrade.
+
+2. CEDET-suite: If Emacs >= 23.2 is used then CEDET is already integrated
+ into Emacs and there is nothing to do.
+
+ For users of any XEmacs-version, any Emacs-version < 23.2 or the latest
+ author CEDET version: Get it from http://cedet.sourceforge.net, read
+ the setup-instructions in http://cedet.sourceforge.net/setup.shtml and
+ read also the shipped file `INSTALL'.
+
+ *Please note*: If ECB detects an author version of CEDET (as available
+ at http://cedet.sourceforge.net) then ECB will ALWAYS try to use that
+ one even if you use Emacs >= 23.2! This is for users who want to use
+ latest Emacs >= 23.2 but still prefer using the latest author version of
+ CEDET instead of the Emacs-integrated one.
+
+ So if you want to use the Emacs-integrated CEDET-suite of Emacs >= 23.2
+ you have to ensure that no author-version of CEDET is in the `load-path'!
+ This means that the library cedet.el of the author-version MUST NOT be
+ loaded into Emacs (as described in the file INSTALL of CEDET)! This is a
+ valid check: (locate-library "semantic-ctxt") must return nil!
+
+3. Only for XEmacs-users: If you use XEmacs you must have installed the
+ package c-support (contains hideshow.el). If you want to read the
+ online-help of ECB in HTML-format you must have the library browse-url
+ (part of the mail-lib XEmacs package) installed; this package is also
+ needed for submitting problem-reports to the ECB-maintainers!
+
+4. Optional for Java-coding: ECB works very well with the JDEE package (
+ http://jdee.sourceforge.net) but JDEE is not required by ECB.
+
+
+Do not install ECB before you have successfully installed the requirements!
+
+
+------------
+Installation
+------------
+
+*IMPORTANT*: ECB is no longer runnable as XEmacs-package via the
+package-manager of XEmacs. This is because CEDET is not available as
+XEmacs-package. Therefore ECB can also not be run as XEmacs-package. If CEDET
+will later become a XEmacs-package then probably ECB will come back as
+XEmacs-package. But in the meanwhile you have to install ECB "by hand".
+
+ 1. Fulfill all requirements ECB needs (s.a. Requirements)
+
+ ECB performs two autom checks:
+
+ - At load-time: It checks if the cedet-suite is at least installed so
+ ECB can be loaded. If not it reports an error.
+
+ - At start-time: It checks if the correct versions of cedet and
+ semantic are installed and gives you proper feedback.
+
+ So if you are not sure if you have installed the required packages at
+ all or if you have installed the correct versions of these packages then
+ do not worry about this, just go on with the following installation
+ steps: If ECB is missing something it will give you proper feedback and
+ support not later than at load-time or start-time!
+
+ 2. Download and unpack the ECB archive (probably you have already done this
+ :-)
+
+ 3. Add the new ECB-directory to your `load-path' variable.
+
+ You *MUST* add the ECB-install-directory to the `load-path' either by
+ changing the `load-path' variable directly in your `.emacs' or
+ `site-lisp/site-start.el' or by working with a file `subdirs.el'(1).
+
+ So for example the needed entry for your `.emacs'-file could be:
+
+ (add-to-list 'load-path
+ "/path/to/your/ecb/installation/directory")
+
+ *ATTENTION*: ECB is NOT properly installed if it's directory is not
+ added to `load-path' and for example just loaded by
+
+ (load-file "/path/to/ecb/ecb.el")
+
+ Do not do this! It will not work!
+
+ 4. Load ECB by adding code to your `.emacs':
+
+ If you want to load the complete ECB at (X)Emacs-loadtime (Advantage:
+ All ECB-options available after loading ECB. Disadvantage: Increasing
+ loadtime(2)):
+
+ (require 'ecb)
+
+ If you want to load the ECB first after starting it by `ecb-activate'
+ (Advantage: Fast loading(3). Disadvantage: ECB- and semantic-options
+ first available after starting ECB):
+
+ (require 'ecb-autoloads)
+
+ This loads all available autoloads of ECB, e.g. `ecb-activate',
+ `ecb-minor-mode', `ecb-byte-compile' and `ecb-show-help'.
+
+ Regardless which method you prefer: In both cases the used statement
+ must be placed *after* the statement of step 3!
+
+ Only for users of a manually installed author version of the CEDET-suite
+ (not that one integrated into Emacs >= 23.2): Instructions for loading
+ CEDET into Emacs must be placed somewhere before the statements needed for
+ loading ECB (s.a.)!
+
+ 5. Restart (X)Emacs.
+
+ECB is now ready for use and can be activated by calling `M-x ecb-activate'
+or `ecb-minor-mode'. Now you can either starting using ECB or you can do
+these optional installation steps:
+
+ 6. Reading the online help with `ecb-show-help'
+
+ Maybe you are interested to read the online-help of ECB before first
+ start.
+
+ 7. Bytecompiling ECB with `ecb-byte-compile'
+
+ This byte compiles ECB. You can safely ignore all messages if there are
+ any. (You can also bytecompile ECB from the command-line either by using
+ the `Makefile' or by using the batch-file `make.bat'; just read the
+ comments in that file you choose.)
+
+ 8. Installing the Info-help of ECB
+
+ The ECB distribution contains a subdirectory `info-help' which contains
+ the online-help of ECB in Info-format. You can install this online help
+ so it's available in the Top-directory of Info. There are two ways to do
+ this:
+
+ - Use "install-info" (recommended):
+
+ 1. Copy the files of the subdirectory `info-help' into the
+ info-directory of Emacs
+
+ 2. Install the file `info-help/ecb.info' with the command
+ "install-info" (if available on your system) in the `dir'-file.
+
+ The supplied `Makefile' offers a target `install-help' which does
+ both of these steps. You have just to call `make install-help' with
+ the correct EMACSINFOPATH set (see the comment in `Makefile'). Here
+ is an example:
+
+ make EMACSINFOPATH=/path/to/emacs/info install-help
+
+ - Manually Installation:
+
+ Copy the files of the subdirectory `info-help' into the
+ info-directory of Emacs and modify the file `dir' manually.
+
+ But it doesn't matter if you do not execute this step (8.) because the
+ online help of ECB is always available though, see `ecb-show-help'.
+
+
+-----
+Usage
+-----
+
+Call "M-x ecb-activate" to activated ECB.
+
+Call "M-x ecb-customize-most-important" to get a list of the most important
+options of ECB. These are options you should at least know that they exist.
+
+Call "M-x ecb-show-help" to get a detailed online-help for ECB. If you are
+using ECB the first time you should read the online help accurately!
+
+--------
+Contacts
+--------
+
+Send comments, bug reports and improvement suggestions to:
+
+ecb-list@lists.sourceforge.net
+
+*IMPORTANT*: Cause of extra appearance of SPAM in the mailing-lists,
+SourceForge has changed its policy: Now it is only possible to post to the
+mailing-list for users who have subscribed this mailing-list.
+
+So please be aware you will not be able to send comments, bug reports and
+improvement suggestions before you have subscribed the ECB-mailing-list. See
+the section "Mailing-list" at the ECB-website at http://ecb.sourceforge.net
+how to do this.
+
View
288 site-lisp/ecb-snap/RELEASE_NOTES
@@ -0,0 +1,288 @@
+This file contains some important release-notes for ECB version 2.40.1
+
+General:
+--------
+
+Please read also the sections "Known conflicts and bugs" and "Tips and Tricks"
+in the online help ('ecb-show-help'). The former one is a small list of known
+conflicts and for each conflict a proper and easy solution! Please read also
+carefully the upgrade informations below!
+
+
+Installing ECB first time:
+--------------------------
+
+No special notes beyond the contents of README.
+
+
+Upgrading from any version:
+---------------------------
+
+If you are upgrading from version newer then 2.27 (ie. ecb-version > 2.27)
+then you can skip the rest of this release notes.
+
+
+Upgrading from any version < 2.27:
+----------------------------------
+
+The option `ecb-auto-expand-tag-tree-collapse-other' has changed its type. ECB
+autom. upgrades your old setting to the new option-type.
+
+
+Upgrading from any version < 2.26:
+----------------------------------
+
+Some regexp-options has been changed to regexp-list-options:
+`ecb-excluded-directories-regexp' --> `ecb-excluded-directories-regexps'
+`ecb-source-file-regexps' --> `ecb-source-file-regexps'
+`ecb-exclude-parents-regexp' --> `ecb-exclude-parents-regexps'
+
+All these options now accept (and require) a list of regexps instead of
+exactly one big regexp. ECB autom. upgrades your old settings to the new
+option-types rsp. also -names (if the option has been renamed).
+
+
+Upgrading from versions < 2.25:
+-------------------------------
+
+`ecb-sort-history-items' has been renamed to `ecb-history-sort-method'. ECB
+autom. upgrades your old setting to the new option-name and -type.!
+
+
+Upgrading from versions < 2.23:
+-------------------------------
+
+The option `ecb-show-tags' has changed its type. ECB autom. upgrades your old
+setting to the new option-type.!
+
+
+Upgrading from versions < 2.20:
+-------------------------------
+
+All user-defined extensions written for and added to one of the options
+`ecb-directories-menu-user-extension', `ecb-sources-menu-user-extension',
+`ecb-methods-menu-user-extension' or `ecb-history-menu-user-extension' MUST be
+rewritten and redefined via the new macro `tree-buffer-defpopup-command'!
+
+The option `ecb-primary-mouse-jump-destination' has been renamed to
+`ecb-mouse-click-destination' and has also changed its default value to
+'last-point.
+
+The option `ecb-split-edit-window' has been renamed in
+`ecb-split-edit-window-after-start'. In addition the value t is not allowed
+anymore for this option - use 'before-activation instead. In a further
+addition this option has a new default value 'before-deactivation. See the
+docstring of this option to get all details.
+
+The Option `ecb-other-window-jump-behavior' has been renamed to
+`ecb-other-window-behavior'.
+
+ECB autom. upgrades your old settings to the new option types/names!
+
+
+Upgrading from versions < 2.11:
+-------------------------------
+
+The type of the option `ecb-post-process-semantic-taglist' has been changed.
+ECB autom. upgrades the old-value of that option to the new type! There is
+nothing to do for you.
+
+
+Upgrading from versions < 2.01:
+-------------------------------
+
+The following options have changed their name:
+
+- ecb-auto-expand-token-tree -> ecb-auto-expand-tag-tree
+- ecb-font-lock-tokens -> ecb-font-lock-tags
+- ecb-token-jump-sets-mark -> ecb-tag-jump-sets-mark
+- ecb-token-display-function -> ecb-tag-display-function
+- ecb-type-token-display -> ecb-type-tag-display
+- ecb-post-process-semantic-tokenlist -> ecb-post-process-semantic-taglist
+- ecb-show-only-positioned-tokens -> ecb-show-only-positioned-tags
+- ecb-show-tokens -> ecb-show-tags
+- ecb-highlight-token-with-point -> ecb-highlight-tag-with-point
+- ecb-highlight-token-with-point-delay -> ecb-highlight-tag-with-point-delay
+- ecb-token-visit-post-actions -> ecb-tag-visit-post-actions
+- ecb-token-header-face -> ecb-tag-header-face
+
+ECB autom. upgrades all old-values of these options to the new options! There
+is nothing to do for you.
+
+The type of the options `ecb-directories-menu-user-extension',
+`ecb-sources-menu-user-extension', `ecb-methods-menu-user-extension' and
+`ecb-history-menu-user-extension' has been changed - now sub-menus are
+allowed. The new default values of these options contains now entries, mostly
+concerning "version control". ECB autom. upgrades the old-values to the new
+option-type by appending the new defaults to your old values. So no old
+personal menu-entries are lost, but cause of the new default maybe you have
+some entries twice. Feel free to delete via customize what you want from the
+new settings.
+
+The old option `ecb-tree-use-image-icons' has been replaced by
+`ecb-tree-buffer-style'.
+
+
+Upgrading from versions < 1.96:
+-------------------------------
+
+The options `ecb-mode-line-data' and `ecb-mode-line-prefixes' have changed
+their type. ECB will autom. upgrade the old values of these options as best as
+possible to the new types!
+
+The option `ecb-layout-switch-to-compilation-window' has been removed. This
+mimic is now done automatically.
+
+The name of the command `ecb-toggle-enlarged-compilation-window' has been
+changed to `ecb-toggle-compile-window-height' (The old name is still available
+as alias but is deprecated). The keybinding [C-. /] remains.
+
+The command `ecb-eshell-goto-eshell' has been removed. Now just use `eshell'
+to work with the eshell. The old binding [C-. e] now simply runs `eshell'.
+
+The command `ecb-eshell-enlarge' has been removed. Now just use the standard
+ECB-command `ecb-toggle-compile-window-height' for this.
+
+
+Upgrading from a version < 1.95.1:
+----------------------------------
+
+If there are byte-compiled(!) user-defined layouts - either created
+interactively by `ecb-create-new-layout' or programmed with the macro
+`ecb-layout-define' - then the file where these user-defined layouts are saved
+(see option `ecb-create-layout-file') must be re-byte-compiled with latest ECB
+version >= 1.95.1! If the user-defined layouts are not byte-compiled then
+there is nothing to do.
+
+Some default key-bindings have changed; the new bindings are:
+
+ C-c . g1: `ecb-goto-window-edit1' (was C-c . 1)
+ C-c . g2: `ecb-goto-window-edit2' (was C-c . 2)
+ C-c . gd: `ecb-goto-window-directories' (was C-c . d)
+ C-c . gs: `ecb-goto-window-sources' (was C-c . s)
+ C-c . gm: `ecb-goto-window-methods' (was C-c . m)
+ C-c . gh: `ecb-goto-window-history' (was C-c . h)
+ C-c . gb: `ecb-goto-window-speedbar' (was C-c . bw)
+ C-c . gc: `ecb-goto-window-compilation' (was C-c . c)
+
+
+Upgrading from version < 1.95:
+------------------------------
+
+Some default key-bindings have changed; the new bindings are:
+
+ C-c . r: `ecb-rebuild-methods-buffer' (was not bound before)
+ C-c . lc: `ecb-change-layout' (was C-c . l)
+ C-c . lr: `ecb-redraw-layout' (was C-c . r)
+ C-c . lt: `ecb-toggle-layout' (was C-c . t)
+ C-c . lw: `ecb-toggle-ecb-windows' (was C-c . w)
+
+ECB now requires speedbar. ECB needs a version >= 0.14beta1.
+
+For XEmacs now the package c-support (contains hideshow.el) has to be
+installed.
+
+
+Upgrading from versions < 1.92:
+--------------------------------
+
+The type of the option `ecb-truncate-lines' has changed.
+ECB autom. upgrades the old value of this option to its new type!
+
+
+Upgrading from version 1.80:
+----------------------------
+
+The type or name of the following options has changed:
+
+- ecb-layout-nr: New name is ecb-layout-name
+- ecb-toggle-layout-sequence: New type
+- ecb-major-modes-activate: New type
+- ecb-layout-window-sizes: New type
+- ecb-show-sources-in-directories-buffer: New type
+- ecb-cache-directory-contents: New type
+- ecb-source-file-regexps: New type
+- ecb-show-ecb-windows-hook: New name is ecb-show-ecb-windows-before-hook
+- ecb-hide-ecb-windows-hook: New name is ecb-hide-ecb-windows-before-hook
+
+ECB autom. upgrades the values of these options to theirs new names/types!
+
+
+Upgrading from version < 1.80:
+------------------------------
+
+The type of the following options has changed:
+
+- 'ecb-token-display-function'
+- 'ecb-window-sync'
+
+ECB has a new feature 'ecb-auto-compatibility-check' which enables a check for
+incompatible or renamed ECB-options at ECB startup. These options are then
+autom. upgraded to the new type or reset to the default-values of current
+ECB-version if no upgrade is possible. All upgraded or reset options are
+displayed to the user with their old and new values!
+
+ECB now requires Semantic version 1.4 and eieio version 0.17! Any previous
+beta version is not supported anymore!
+
+
+Upgrading from any version < 1.60:
+----------------------------------
+
+- The options `ecb-show-node-name-in-minibuffer',
+ `ecb-show-complete-file-name-in-minibuffer' and
+ `ecb-show-file-info-in-minibuffer' are gone and have been replaced by one
+ single new option `ecb-show-node-info-in-minibuffer' where you can define
+ separately for every tree-buffer when and which node info should be
+ displayed in the minibuffer
+
+
+Upgrading from versions < 1.52:
+-------------------------------
+
++ ECB now requires eieio >= 0.16 (see also README)
+
++ The option ecb-prefix-key has been removed. Now all customization of
+ key-bindings is done via the new option ecb-key-map.
+
++ ecb-layout-window-sizes is now an association list. If you have customized
+ this variable or used the ecb-store-window-sizes function, there will be an
+ error when drawing the ECB layout. Reset ecb-layout-window-sizes to it's
+ default value (nil) and store your window sizes using ecb-store-window-sizes.
+
++ A new customization variable ecb-show-tokens controls the behavior of the
+ methods buffer. Read the documentation for more information.
+
+
+Upgrading from versions < 1.20:
+-------------------------------
+
++ Now mouse-1 and mouse-2 for opening source-files and jumping to
+ methods/variables is not longer the default key-binding. Please take a look
+ at the new options 'ecb-primary-secondary-mouse-buttons' and
+ 'ecb-primary-mouse-jump-destination'.
+
++ Now it is no longer necessary to bind in the ECB-hooks (ecb-activate-hook
+ and ecb-deactivate-hook) some standard-Emacs-keys for window-handling to the
+ ECB replacements for the related standard-functions to get proper
+ window-handling within the edit-window(s) of ECB.
+
+ Example: With ECB < 1.20 it was necessary to bind [C-x o] to
+ 'ecb-other-window' in 'ecb-activate-hook' (and also "unbinding" it back to
+ the standard other-window in the 'ecb-deactivate-hook') to get a more
+ ECB-suitable other-window behavior. Same for other window-keys.
+
+ This way will work also in ECB 1.20 but it is NOT the recommended way
+ because the new option 'ecb-advice-window-functions' makes this much easier
+ and better. Please read the documentation of this option exactly!
+
++ Default-value of `ecb-other-window-jump-behavior' is now 'all.
+
++ Interactively calling 'ecb-update-methods-buffer' is not longer necessary as
+ work-around for the bug, that sometimes the error "Wrong type argument,
+ integer-or-marker-p nil" is displayed after clicking onto a method/variable
+ in the ECB-method-buffer. This bug is fixed!
+
++ For a complete list of changes and new features for versions > 1.20 see the
+ NEWS file.
+
View
281 site-lisp/ecb-snap/ecb-advice-test.el
@@ -0,0 +1,281 @@
+;;; ecb-advice-test.el --- test-lib for the advice backbone of ECB
+
+;; Copyright (C) 2000 - 2009 Klaus Berndl,
+;; Free Software Foundation, Inc.
+
+;; Author: Klaus Berndl <klaus.berndl@sdm.de>
+;; Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
+;; Keywords: browser, code, programming, tools
+;; Created: 2009
+
+;; 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-advice-test.el,v 1.3 2009/07/06 07:45:33 berndl Exp $
+
+;;; Commentary:
+;;
+;; Contains a test-suite for the advice-backbone of ECB.
+;;
+;; This file is part of the ECB package which can be found at:
+;; http://ecb.sourceforge.net
+
+;;; Usage
+;;
+;; 1. Load this library into Emacs
+;; 2. Call M-x ecb-test-with-original-advice-set
+;; 3. Compare the Output in the message-buffer with the expected output at the
+;; end of this file
+;; 4. If there are differences then send this output to
+;; the ecb-mailing-list (see Info-manual)
+
+(eval-when-compile
+ (require 'silentcomp))
+
+(require 'ecb-util)
+(require 'ecb-common-browser)
+
+(defecb-advice-set ecb-advice-test-set
+ "An advice-set only for testing the advice-mechanism of ECB")
+
+(defun ecb-advice-test-defun-1 ()
+ (message "I'm the ORIGINAL function ecb-advice-test-defun-1"))
+
+(defecb-advice ecb-advice-test-defun-1 around ecb-advice-test-set
+ "An advice"
+ (message "I'm the AROUND advice of ecb-advice-test-defun-1"))
+
+(defun ecb-advice-test-defun-2 ()
+ (message "I'm the ORIGINAL function ecb-advice-test-defun-2"))
+
+(defecb-advice ecb-advice-test-defun-2 before ecb-advice-test-set
+ "An advice"
+ (message "I'm the BEFORE advice of ecb-advice-test-defun-2"))
+
+(defecb-advice ecb-advice-test-defun-2 after ecb-advice-test-set
+ "An advice"
+ (message "I'm the AFTER advice of ecb-advice-test-defun-2"))
+
+(defun ecb-advice-test-defun-3 ()
+ (message "I'm the ORIGINAL function ecb-advice-test-defun-3"))
+
+(defecb-advice ecb-advice-test-defun-3 around ecb-always-disabled-advices
+ "An always disabled advice"
+ (message "I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3"))
+
+(defecb-advice ecb-advice-test-defun-3 after ecb-always-disabled-advices
+ "An always disabled advice"
+ (message "I'm the AFTER advice of (the always disabled) ecb-advice-test-defun-3"))
+
+(defun ecb-advice-test-defun-4 ()
+ (message "I'm the ORIGINAL function ecb-advice-test-defun-4"))
+
+(defecb-advice ecb-advice-test-defun-4 around ecb-always-disabled-advices
+ "An always disabled advice"
+ (message "I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-4"))
+
+(defun ecb-test-with-original-advice-set ()
+ (interactive)
+ (let ((ecb-advices-debug-error t))
+ (unwind-protect
+ (progn
+ (message "!!! BEGIN ecb-test-with-original-advice-set !!!!")
+ (ecb-enable-advices 'ecb-advice-test-set)
+ (ecb-disable-advices 'ecb-always-disabled-advices)
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (ecb-with-original-adviced-function-set 'ecb-advice-test-set
+ (ecb-advice-test-defun-1)
+ (message "LOC-0.1 ecb-test-with-original-advice-set")
+ (ecb-with-ecb-advice 'ecb-advice-test-defun-3 'around
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (ecb-with-ecb-advice 'ecb-advice-test-defun-3 'around
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (ecb-with-ecb-advice 'ecb-advice-test-defun-3 'after
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (ecb-with-ecb-advice 'ecb-advice-test-defun-4 'around
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4))
+ (message "LOC-0.2 ecb-test-with-original-advice-set")
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4))
+ (message "LOC-0.3 ecb-test-with-original-advice-set")
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4))
+ (message "LOC-0.4 ecb-test-with-original-advice-set")
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4))
+ (ecb-advice-test-defun-2)
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (message "LOC-1 ecb-test-with-original-advice-set")
+ (ecb-with-original-adviced-function-set 'ecb-advice-test-set
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2))
+ (message "LOC-2 ecb-test-with-original-advice-set")
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (message "LOC-3 ecb-test-with-original-advice-set")
+ (ecb-with-original-adviced-function-set 'ecb-advice-test-set
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (message "LOC-4 ecb-test-with-original-advice-set")
+ (ecb-with-original-adviced-function-set 'ecb-advice-test-set
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)))
+ (message "LOC-5 ecb-test-with-original-advice-set")
+ )
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (message "LOC-6 ecb-test-with-original-advice-set"))
+ (ecb-disable-advices 'ecb-advice-test-set)
+ (ecb-advice-test-defun-1)
+ (ecb-advice-test-defun-2)
+ (ecb-advice-test-defun-3)
+ (ecb-advice-test-defun-4)
+ (message "!!! END ecb-test-with-original-advice-set !!!!"))))
+
+
+;; expected output:
+
+;; !!! BEGIN ecb-test-with-original-advice-set !!!!
+;; ECB 2.33: debug enabling the advice-set: ecb-advice-test-set
+;; ECB 2.33: debug enabling of 'after' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug enabling of 'before' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug enabling of 'around' advice ecb-advice-test-defun-1
+;; ECB 2.33: debug disabling the advice-set: ecb-always-disabled-advices
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-4
+;; ECB 2.33: debug disabling of 'after' advice ecb-advice-test-defun-3
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-3
+;; ECB 2.33: debug disabling of 'around' advice count-windows
+;; ECB 2.33: debug disabling of 'around' advice one-window-p
+;; ECB 2.33: debug disabling of 'around' advice walk-windows
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-1
+;; I'm the AROUND advice of ecb-advice-test-defun-1
+;; ECB 2.33: debug calling of 'before' advice ecb-advice-test-defun-2
+;; I'm the BEFORE advice of ecb-advice-test-defun-2
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; ECB 2.33: debug calling of 'after' advice ecb-advice-test-defun-2
+;; I'm the AFTER advice of ecb-advice-test-defun-2
+;; I'm the ORIGINAL function ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - ENTRY
+;; ECB 2.33: debug disabling the advice-set: ecb-advice-test-set
+;; ECB 2.33: debug disabling of 'after' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug disabling of 'before' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; LOC-0.1 ecb-test-with-original-advice-set
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-3 - ENTRY
+;; ECB 2.33: debug enabling of 'around' advice ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-3 - ENTRY
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug with always disabled ecb-advice: after ecb-advice-test-defun-3 - ENTRY
+;; ECB 2.33: debug enabling of 'after' advice ecb-advice-test-defun-3
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; ECB 2.33: debug calling of 'after' advice ecb-advice-test-defun-3
+;; I'm the AFTER advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-4 - ENTRY
+;; ECB 2.33: debug enabling of 'around' advice ecb-advice-test-defun-4
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; ECB 2.33: debug calling of 'after' advice ecb-advice-test-defun-3
+;; I'm the AFTER advice of (the always disabled) ecb-advice-test-defun-3
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-4
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-4
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-4
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-4 - EXIT
+;; LOC-0.2 ecb-test-with-original-advice-set
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; ECB 2.33: debug calling of 'after' advice ecb-advice-test-defun-3
+;; I'm the AFTER advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug disabling of 'after' advice ecb-advice-test-defun-3
+;; ECB 2.33: debug with always disabled ecb-advice: after ecb-advice-test-defun-3 - EXIT
+;; LOC-0.3 ecb-test-with-original-advice-set
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-3 - EXIT
+;; LOC-0.4 ecb-test-with-original-advice-set
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-3
+;; I'm the AROUND advice of (the always disabled) ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-3
+;; ECB 2.33: debug with always disabled ecb-advice: around ecb-advice-test-defun-3 - EXIT
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; I'm the ORIGINAL function ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; LOC-1 ecb-test-with-original-advice-set
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - ENTRY
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - EXIT
+;; LOC-2 ecb-test-with-original-advice-set
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; LOC-3 ecb-test-with-original-advice-set
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - ENTRY
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; LOC-4 ecb-test-with-original-advice-set
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - ENTRY
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - EXIT
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - EXIT
+;; LOC-5 ecb-test-with-original-advice-set
+;; ECB 2.33: debug enabling the advice-set: ecb-advice-test-set
+;; ECB 2.33: debug enabling of 'after' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug enabling of 'before' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug enabling of 'around' advice ecb-advice-test-defun-1
+;; ECB 2.33: debug with original advice-set: ecb-advice-test-set - EXIT
+;; ECB 2.33: debug calling of 'around' advice ecb-advice-test-defun-1
+;; I'm the AROUND advice of ecb-advice-test-defun-1
+;; ECB 2.33: debug calling of 'before' advice ecb-advice-test-defun-2
+;; I'm the BEFORE advice of ecb-advice-test-defun-2
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; ECB 2.33: debug calling of 'after' advice ecb-advice-test-defun-2
+;; I'm the AFTER advice of ecb-advice-test-defun-2
+;; LOC-6 ecb-test-with-original-advice-set
+;; ECB 2.33: debug disabling the advice-set: ecb-advice-test-set
+;; ECB 2.33: debug disabling of 'after' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug disabling of 'before' advice ecb-advice-test-defun-2
+;; ECB 2.33: debug disabling of 'around' advice ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-1
+;; I'm the ORIGINAL function ecb-advice-test-defun-2
+;; I'm the ORIGINAL function ecb-advice-test-defun-3
+;; I'm the ORIGINAL function ecb-advice-test-defun-4
+;; !!! END ecb-test-with-original-advice-set !!!!
+
+(silentcomp-provide 'ecb-advice-test)
+
+;;; ecb-advice-test.el ends here
+
View
714 site-lisp/ecb-snap/ecb-analyse.el
@@ -0,0 +1,714 @@
+;;; ecb-analyse.el --- ECB analysis display window
+
+;;; Copyright (C) 2004 - 2005 Klaus Berndl
+
+;; Author: Klaus Berndl <klaus.berndl@sdm.de>
+;; Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
+;; Keywords: browser, code, programming, analyse
+;; Created: 2004
+
+;; 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-analyse.el,v 1.28 2010/02/23 16:08:55 berndl Exp $
+
+
+;;; Commentary:
+;;
+;; Displays the analysing informations of semantic-analyze in a special
+;; tree-buffer.
+;;
+
+;;; Code:
+
+(require 'ecb-layout)
+(require 'ecb-common-browser)
+(require 'ecb-method-browser)
+(require 'ecb-cedet-wrapper)
+
+(eval-when-compile
+ (require 'silentcomp))
+
+(eval-when-compile
+ ;; to avoid compiler grips
+ (require 'cl))
+
+
+(defgroup ecb-analyse nil
+ "Settings for the analyse-buffer in the Emacs code browser."
+ :group 'ecb
+ :prefix "ecb-")
+
+
+(defcustom ecb-analyse-buffer-name " *ECB Analyse*"
+ "*Name of the ECB analyse buffer.
+Because it is not a normal buffer for editing you should enclose the name with
+stars, e.g. \"*ECB Analyse*\".
+
+If it is necessary for you you can get emacs-lisp access to the buffer-object of
+the ECB-analyse-buffer by this name, e.g. by a call of `set-buffer'.
+
+Changes for this option at runtime will take affect only after deactivating and
+then activating ECB again!"
+ :group 'ecb-analyse
+ :type 'string)
+
+(defcustom ecb-analyse-buffer-after-create-hook nil
+ "*Local hook running after the creation of the analyse-buffer.
+Every function of this hook is called once without arguments direct after
+creating the analyse-buffer of ECB and it's local key-map. So for example a
+function could be added which performs calls of `local-set-key' to define new
+key-bindings only for the analyse-buffer of ECB."
+ :group 'ecb-analyse
+ :type 'hook)
+
+(defcustom ecb-analyse-show-node-info '(if-too-long . name)
+ "*When to display which node-info in the analyse-buffer.
+Define which node info should displayed after moving the mouse over a node
+\(or after a shift click onto the node) in the analyse-buffer.
+
+You can define \"when\" a node-info should be displayed:
+See `ecb-directories-show-node-info' for the possible choices.
+
+You can define what info should be displayed:
+- name: The full name of the node
+- full-info: All infos available to a node.
+
+Do NOT set this option directly via setq but use always customize!"
+ :group 'ecb-analyse
+ :type '(cons (choice :tag "When"
+ (const :tag "Always" :value always)
+ (const :tag "If too long" :value if-too-long)
+ (const :tag "After shift click" :value shift-click)
+ (const :tag "Never" :value never))
+ (choice :tag "What"
+ (const :tag "Node-name" :value name)
+ (const :tag "Full info" :value full-info))))
+
+
+(defcustom ecb-analyse-collapsed-buckets nil
+ "*Buckets collapsed when displaying the current semantic analysis.
+The semantic analyse-modul offers several categories of analysis which are
+called buckets here. These are for example:
+
+Context: The current context, which is the current function/method, variable,
+class etc. \(what exactly depends on the programming language) point is in.
+This means not the current function/method/variable/class-name point stand on
+but the current surrounding context. Example: If point stays somewhere within
+a defun-definition in emacs-lisp or within a java-method then this defun rsp.
+method is the context. In object oriented languages this can be the full
+hierachy, i.e. not only the current method, but the current method, the class
+of this method, the superclass of this class and so on!
+
+Local Variables: All accessible and bound local variables visible at current
+point.
+
+Prefix: The currently parsed prefix, which is mostly the current identifier
+point stands on.
+
+Assignee: See the semantic manual
+
+Function: Current function-name point stands on.
+
+Argument #: When point is located within a function-call then this is the
+number of the argument point stands on.
+
+Completions: All possible completions for current prefix \(see above). This is
+probably the most helpful bucket.
+
+If one of these categories/buckets are not needed per default then add the
+bucket-name \(s.a.) to this option and ECB will per default collapse this
+bucket. So most needed buckets are better visible in the analyse-buffer."
+ :group 'ecb-analyse
+ :type '(repeat (choice :tag "Bucket" :menu-tag "Bucket"
+ (const :tag "Context" :value "Context")
+ (const :tag "Arguments" :value "Arguments")
+ (const :tag "Local Variables" :value "Local Variables")
+ (const :tag "Prefix" :value "Prefix")
+ (const :tag "Assignee" :value "Assignee")
+ (const :tag "Function" :value "Function")
+ (const :tag "Argument #" :value "Argument #")
+ (const :tag "Completions" :value "Completions")
+ (string :tag "Other bucketname"))))
+
+(defcustom ecb-analyse-fontified-buckets '("Context" "Function")
+ "*Buckets whose elements should be fontified as in the methods-buffer.
+If the name of a category/bucket is contained in this option then
+all elements of this bucket will be displayed as in the
+methods-buffer - at least if an element is a semantic-tag. This
+means if `ecb-font-lock-tags' is not nil and the font-lock
+feature is loaded into Emacs these elements will be fontified and
+also displayed with an appropriate icon if possible. The default
+value does this only for the Context-bucket because for most of
+the other buckets this makes not really much sense.
+
+For available buckets see `ecb-analyse-collapsed-buckets'.
+
+For the faces used to display a bucket-node itself or bucket-elements not
+fontified see the options `ecb-analyse-bucket-node-face' rsp.
+`ecb-analyse-bucket-element-face'."
+ :group 'ecb-analyse
+ :type '(repeat (choice :tag "Bucket" :menu-tag "Bucket"
+ (const :tag "Context" :value "Context")
+ (const :tag "Arguments" :value "Arguments")
+ (const :tag "Local Variables" :value "Local Variables")
+ (const :tag "Prefix" :value "Prefix")
+ (const :tag "Assignee" :value "Assignee")
+ (const :tag "Function" :value "Function")
+ (const :tag "Argument #" :value "Argument #")
+ (const :tag "Completions" :value "Completions")
+ (string :tag "Other bucketname"))))
+
+(defcustom ecb-analyse-gen-tag-info-fn nil
+ "*Which info should be displayed for a tag of the analyse-buffer.
+If nil then the default information about a tag will be displayed. If a
+function then this function gets as argument the tag for which tag-information
+should be displayed. This function has to return a string which will be then
+display as tag-info. This string has to be fully formatted \(e.g. must already
+include line-breaks if the tag-info should be displayed in several lines).
+
+See `ecb-analyse-show-tag-info-fn' how the tag-info is displayed."
+ :group 'ecb-analyse
+ :type '(radio (const :tag "Default info" :value nil)
+ (function :tag "")))
+
+(defcustom ecb-analyse-show-tag-info-fn 'message
+ "*How to display the tag-info for a tag of the analyse-buffer.
+The value of this option is a function which will be called with the
+info-string generated for the current tag of the analyse-buffer. This function
+must do all things necessary for displaying this info. When this function is
+called the window stored in `ecb-last-edit-window-with-point' is the selected
+window!
+
+ECB offers two builtin ways: Display the info in the echo-area \(via the
+function `message') or in a temp-buffer in the edit-area \(via the function
+`ecb-analyse-show-tag-info-in-temp-buffer'). Default is echo-area-display.
+
+See also `ecb-analyse-gen-tag-info-fn'."
+ :group 'ecb-analyse
+ :type '(radio (const :tag "Display in the echo-area" :value message)
+ (const :tag "Display in a temp-buffer"
+ :value ecb-analyse-show-tag-info-in-temp-buffer)
+ (function :tag "Info display-function")))
+
+(defcustom ecb-analyse-buffer-sync 'basic
+ "*Synchronize the analyse buffer automatically with current edit buffer.
+
+If 'always then the synchronization takes place always a buffer changes in the
+edit window, if nil then never. If a list of major-modes then only if the
+`major-mode' of the new buffer belongs NOT to this list.
+
+Normally it's not necessary to exclude some major-modes because with
+not-semantic supported major-modes simply nothing happens. But maybe it can be
+helpful for certain situations...
+
+If the special value 'basic is set then ECB uses the setting of the option
+`ecb-basic-buffer-sync'.
+
+IMPORTANT NOTE: Every time the synchronization is done the hook
+`ecb-analyse-buffer-sync-hook' is evaluated."
+ :group 'ecb-analyse
+ :type '(radio :tag "Synchronize ECBs analyse buffer"
+ (const :tag "use basic value" :value basic)
+ (const :tag "Always" :value always)
+ (const :tag "Never" nil)
+ (repeat :tag "Not with these modes"
+ (symbol :tag "mode"))))
+
+(defcustom ecb-analyse-buffer-sync-delay 2
+ "*Time Emacs must be idle before the analyse-buffer is synchronized.
+Synchronizing is done with the current source displayed in the edit window. If
+nil then there is no delay, means synchronization takes place immediately.
+
+CAUTION: With analysing a value not too small is strongly recommended because
+it can be very annoying if more or less after each typing the current context
+is analysed. If set to nil then *each* keyboard hit refreshes the
+analyse-buffer which will make ECB quite unusable!
+
+If the special value 'basic is set then ECB uses the setting of the option
+`ecb-basic-buffer-sync-delay'"
+ :group 'ecb-analyse
+ :type '(radio (const :tag "Use basic value" :value basic)
+ (const :tag "No synchronizing delay" :value nil)
+ (number :tag "Idle time before synchronizing" :value 2))
+ :set (function (lambda (symbol value)
+ (set symbol value)
+ (if (and (boundp 'ecb-minor-mode)
+ ecb-minor-mode)
+ (ecb-activate-ecb-autocontrol-function
+ value 'ecb-analyse-buffer-sync))))
+ :initialize 'custom-initialize-default)
+
+(defcustom ecb-analyse-buffer-sync-hook nil
+ "Hook run at the end of `ecb-analyse-buffer-sync'.
+See documentation of `ecb-analyse-buffer-sync' for conditions when
+synchronization takes place and so in turn these hooks are evaluated.
+
+Preconditions for such a hook:
+- Current buffer is the buffer of the currently selected
+ edit-window.
+- The analyse-buffer is displayed in a visible window of the
+ ecb-frame \(so no check for visibilty of the analyse-buffer in
+ the ecb-frame is necessary in a hook function)
+
+Postcondition for such a hook:
+Point must stay in the same edit-window as before evaluating the hook.
+
+Important note: If the option `ecb-analyse-buffer-sync' is not
+nil the function `ecb-analyse-buffer-sync' is running either
+every time Emacs is idle or even after every command \(see
+`ecb-analyse-buffer-sync-delay'). So if the anaylse-buffer is
+displayed in a window of the ecb-frame \(see preconditions above)
+these hooks can be really called very often! Therefore each
+function of this hook should/must check in an efficient way at
+beginning if its task have to be really performed and then do
+them only if really necessary! Otherwise performance of Emacs
+could slow down dramatically!"
+ :group 'ecb-analyse
+ :type 'hook)
+
+(defconst ecb-analyse-nodedata-tag-with-pos 0)
+(defconst ecb-analyse-nodedata-tag-without-pos 1)
+(defconst ecb-analyse-nodedata-no-tag 2)
+
+(defconst ecb-analyse-nodetype-bucket 0)
+(defconst ecb-analyse-nodetype-context 1)
+(defconst ecb-analyse-nodetype-arguments 2)
+(defconst ecb-analyse-nodetype-completions 3)
+(defconst ecb-analyse-nodetype-localvars 4)
+(defconst ecb-analyse-nodetype-prefix 5)
+(defconst ecb-analyse-nodetype-assignee 6)
+(defconst ecb-analyse-nodetype-function 7)
+(defconst ecb-analyse-nodetype-function-arg 8)
+
+(defecb-autocontrol/sync-function ecb-analyse-buffer-sync
+ ecb-analyse-buffer-name ecb-analyse-buffer-sync t
+ "Synchronize the analyse buffer with the current buffer and point.
+This means in fact display the current analysis for current point."
+ ;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: make interruptable. Necessary
+ ;; e.g. when typing: "(e" then scanning all elisp stuff beginning with e is
+ ;; really annoying....
+ (let ((analysis nil)
+ (scope nil)
+ (completions nil)
+ (cnt nil)
+ (mode-local-active-mode nil)
+ )
+ ;; Try and get some sort of analysis
+ (condition-case nil
+ (progn
+ (setq mode-local-active-mode major-mode)
+ (save-excursion
+ ;; Get the current scope
+ (setq scope (semantic-calculate-scope (point)))
+ ;; Get the analysis
+ (setq analysis (ecb--semantic-analyze-current-context (point)))
+ (setq cnt (ecb--semantic-find-tag-by-overlay))
+ (when analysis
+ (setq completions (ecb--semantic-analyze-possible-completions analysis)))))
+ (error nil))
+ (ecb-exec-in-window ecb-analyse-buffer-name
+ ;; we must remove the old nodes
+ (tree-buffer-set-root (tree-node-new-root))
+ (when cnt
+ (ecb-analyse-add-nodes "Context" "Context"
+ cnt ecb-analyse-nodetype-context))
+ ;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: maybe we should adopt this
+ ;; for ecb-analyse..
+ ;; (when analysis
+ ;; ;; If this analyzer happens to point at a complete symbol, then
+ ;; ;; see if we can dig up some documentation for it.
+ ;; (semantic-ia-sb-show-doc analysis))
+
+ ;; Show local variables
+ (when scope
+ (ecb-analyse-show-scope scope))
+
+ (when analysis
+ ;; Let different classes draw more buttons.
+ (ecb-analyse-more-nodes analysis)
+ (when completions
+ (ecb-analyse-add-nodes "Completions" "Completions" completions
+ ecb-analyse-nodetype-completions)))
+ (tree-buffer-update)))
+ (run-hooks 'ecb-analyse-buffer-sync-hook))
+
+(defun ecb-analyse-show-scope (scope)
+ "Show SCOPE information."
+ (let ((localvars (when scope
+ (oref scope localvar))))
+ (when localvars
+ (ecb-analyse-add-nodes "Local Variables" "Local Variables" localvars
+ ecb-analyse-nodetype-localvars))))
+
+(defmethod ecb-analyse-more-nodes ((context semantic-analyze-context))
+ "Show a set of ecb-nodes specific to CONTEXT."
+ (let ((prefix (oref context prefix)))
+ (when prefix
+ (ecb-analyse-add-nodes "Prefix" "Prefix" prefix ecb-analyse-nodetype-prefix))))
+
+(defmethod ecb-analyse-more-nodes ((context semantic-analyze-context-assignment))
+ "Show a set of ecb-nodes specific to CONTEXT."
+ (call-next-method)
+ (let ((assignee (oref context assignee)))
+ (when assignee
+ (ecb-analyse-add-nodes "Assignee" "Assignee" assignee
+ ecb-analyse-nodetype-assignee))))
+
+(defmethod ecb-analyse-more-nodes ((context semantic-analyze-context-functionarg))
+ "Show a set of ecb-nodes specific to CONTEXT."
+ (call-next-method)
+ (let ((func (oref context function)))
+ (when func
+ (ecb-analyse-add-nodes "Function" "Function" func ecb-analyse-nodetype-function)
+ ;; An index for the argument the prefix is in:
+ (let ((arg (oref context argument)))
+ (when arg
+ (ecb-analyse-add-nodes "Argument #"
+ (format "Argument # %d" (oref context index))
+ arg
+ ecb-analyse-nodetype-function-arg))))))
+
+;; Each category of nodes gets its own nodetype, so we can offer different
+;; popup-menus for different categories (e.g. completions have other senseful
+;; popup-menu-entries than the rest. The date of a node will always be a cons
+;; where the car is the analyse-elem and the cdr is a const if it is a
+;; semantic-tag (positionless or with position) or not.
+
+(defun ecb-analyse-add-nodes (bucket bucket-name list nodetype)
+ "Create ecb-nodes from LIST. BUCKET is one of the categories/buckets
+mentioned in `ecb-analyse-collapsed-buckets'. BUCKET-NAME is the name a bucket
+should be displayed with. LIST is a list of tags for this bucket. NODETYPE is
+an integer which will be added as type to the nodes created for the elements
+of LIST."
+ (when list
+ (with-current-buffer ecb-analyse-buffer-name
+ (let* ((bucket-name-formatted
+ (ecb-merge-face-into-text (ecb-format-bucket-name bucket-name)
+ ecb-analyse-bucket-node-face))
+ (bucket-node (tree-node-new bucket-name-formatted
+ ecb-analyse-nodetype-bucket
+ (list 'ecb-bucket-node
+ ecb-analyse-nodetype-bucket)
+ nil
+ (tree-buffer-get-root))))
+ (setf (tree-node->expanded bucket-node)
+ (not (member bucket ecb-analyse-collapsed-buckets)))
+ (ecb-exit-on-input 'ecb-analyse
+ (dolist (elem list)
+ (ecb-throw-on-input 'ecb-analyse-tree-buffer-build)
+ (let* ((fontify-tags (member bucket ecb-analyse-fontified-buckets))
+ (string-1 (typecase elem
+ (string elem)
+ (ecb--semantic-tag
+ (if fontify-tags
+ (ecb-displayed-tag-name elem)
+ (ecb--semantic-format-tag-uml-concise-prototype elem)))
+ (otherwise "foo")))
+ (string (concat string-1)))
+ (unless fontify-tags
+ (ecb-merge-face-into-text string ecb-analyse-bucket-element-face))
+ (if (ecb--semantic-tag-p elem)
+ (tree-node-new string nodetype
+ (list elem
+ (if (ecb--semantic-tag-with-position-p elem)
+ ecb-analyse-nodedata-tag-with-pos
+ ecb-analyse-nodedata-tag-without-pos)
+ nodetype)
+ t bucket-node nil)
+ (tree-node-new string nodetype
+ (list elem ecb-analyse-nodedata-no-tag nodetype)
+ t bucket-node nil)))))))))
+
+(defun ecb-analyse-compare-node-data (left right)
+ "Return not nil when LEFT and RIGHT are identical node-datas."
+ (and (equal (nth 2 left) (nth 2 right))
+ (ecb-compare-methods-buffer-node-data (car left) (car right))))
+
+(tree-buffer-defpopup-command ecb-analyse-jump-to-tag
+ "Jump to the definition of current tag of the analyse-buffer.
+If first arg of the REST-ARG-LIST is not nil then it must be a window and then
+ECB jumps to that window. If nil then `ecb-last-edit-window-with-point' is
+used as window."
+ (let ((window (nth 0 rest-arg-list)))
+ (when node
+ (let* ((data (tree-node->data node))
+ (tag (nth 0 data)))
+ ;; if we have a positioned tag we jump to it
+ (when (and tag (= (nth 1 data) ecb-analyse-nodedata-tag-with-pos))
+ ;; We must highlight the tag
+ (tree-buffer-highlight-node-by-data/name data)
+ ;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: what about tags without
+ ;; buffer but onlxy with start- and end-pos?!
+ (ecb-display-tag (ecb-source-make (ecb-buffer-file-name
+ (ecb-semantic-tag-buffer tag))
+ (ecb-semantic-tag-buffer tag))
+ tag
+ (or window (ecb-get-edit-window nil))
+ t nil))))))
+
+(tree-buffer-defpopup-command ecb-analyse-complete/insert
+ "Complete/insert at current point the selected completion/localvar."
+ ;; We must highlight the tag
+ (let* ((data (tree-node->data node))
+ (tag (nth 0 data))
+ (type (tree-node->type node)))
+ (when (or (= type ecb-analyse-nodetype-completions)
+ (= type ecb-analyse-nodetype-localvars))
+ (tree-buffer-highlight-node-by-data/name data)
+ (ecb-display-source ecb-path-selected-source nil)
+ (let* ((a (ecb--semantic-analyze-current-context (point)))
+ (bounds (if a (oref a bounds)))
+ (movepoint nil))
+ (if (null bounds)
+ (insert (ecb--semantic-tag-name tag))
+ (save-excursion
+ (if (and (<= (point) (cdr bounds)) (>= (point) (car bounds)))
+ (setq movepoint t))
+ (goto-char (car bounds))
+ (delete-region (car bounds) (cdr bounds))
+ (insert (ecb--semantic-tag-name tag))
+ (if movepoint (setq movepoint (point))))
+ (if movepoint
+ (goto-char movepoint)))))))
+
+(defecb-tree-buffer-callback ecb-analyse-node-clicked ecb-analyse-buffer-name select nil
+ "Handles clicking onto any of the nodes in the analyse-buffer of ECB."
+ (if shift-mode
+ (ecb-mouse-over-analyse-node node nil nil 'force))
+ (let* ((data (tree-node->data node))
+ (tag (nth 0 data))
+ (type (tree-node->type node)))
+ ;; we handle hiding the ecb-windows for ourself
+ (setq no-meta-hiding t)
+ (cond
+ ((= type ecb-analyse-nodetype-bucket)
+ (tree-node-toggle-expanded node)
+ (tree-buffer-update node))
+ ((= type ecb-analyse-nodetype-completions)
+ (ecb-analyse-complete/insert node))
+ ((= type ecb-analyse-nodetype-localvars)
+ (ecb-analyse-complete/insert node))
+ (t
+ (ecb-analyse-jump-to-tag node (ecb-get-edit-window
+ ;; `ecb-analyse-jump-to-tag' expects all
+ ;; args beyond NODE as one list.
+ `(,(ecb-combine-ecb-button/edit-win-nr
+ ecb-button edit-window-nr))))
+ (when (and tag (= (nth 1 data) ecb-analyse-nodedata-tag-with-pos))
+ (when meta-mode
+ (ecb-run-with-idle-timer 0.001 nil 'ecb-hide-ecb-windows)))))))
+
+(defecb-window-dedicator-to-ecb-buffer ecb-set-analyse-buffer ecb-analyse-buffer-name t
+ "Display the analyse buffer in current window and make window dedicated."
+ (ecb-activate-ecb-autocontrol-function ecb-analyse-buffer-sync-delay
+ 'ecb-analyse-buffer-sync)
+ (switch-to-buffer ecb-analyse-buffer-name))
+
+(defun ecb-maximize-window-analyse ()
+ "Maximize the ECB-analyse-window.
+I.e. delete all other ECB-windows, so only one ECB-window and the
+edit-window\(s) are visible \(and maybe a compile-window). Works also if the
+ECB-analyse-window is not visible in current layout."
+ (interactive)
+ (ecb-maximize-ecb-buffer ecb-analyse-buffer-name t))
+
+(defun ecb-goto-window-analyse ()
+ "Make the ECB-analyse window the current window."
+ (interactive)
+ (ecb-goto-ecb-window ecb-analyse-buffer-name))
+
+(defun ecb-analyse-show-tag-info-in-temp-buffer (info-string)
+ "Display INFO-STRING in a temp-buffer in the edit-area."
+ (with-output-to-temp-buffer "*Tag Information*"
+ (with-current-buffer "*Tag Information*"
+ (insert info-string)))
+ ;; Make it small
+ (shrink-window-if-larger-than-buffer
+ (get-buffer-window "*Tag Information*")))
+
+;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: we could use the function
+;; `semantic-documentation-for-tag' here to display more infos?!
+
+(defun ecb-analyse-gen-tag-info (tag)
+ "Return the info-string for TAG."
+ (or (and (functionp ecb-analyse-gen-tag-info-fn)
+ (or (funcall ecb-analyse-gen-tag-info-fn tag)
+ (format "No info generated by `%s'." ecb-analyse-gen-tag-info-fn)))
+ (concat (ecb-displayed-tag-name tag)
+ "\n"
+ (let ((typetag
+ (condition-case nil
+ (save-excursion
+ (ecb--semantic-analyze-tag-type tag))
+ (error nil))))
+ (if typetag
+ (ecb-displayed-tag-name typetag)
+ ;; No type found by the analyzer The below used
+ ;; to try and select the buffer from the last
+ ;; analysis, but since we are already in the
+ ;; correct buffer, I don't think that is needed.
+ (when (fboundp 'semantic-lex-keyword-p)
+ (let ((type (ecb--semantic-tag-type tag)))
+ (typecase type
+ (ecb--semantic-tag
+ (setq type (ecb--semantic-tag-name type)))
+ (list
+ (setq type (car type))))
+ (if (semantic-lex-keyword-p type)
+ (setq typetag
+ (semantic-lex-keyword-get type 'summary))))
+ (if typetag
+ typetag))
+ )))))
+
+
+(tree-buffer-defpopup-command ecb-analyse-show-tag-info
+ "Display as much information as possible about current tag.
+Show the information in a shrunk split-buffer and expand out as many details
+as possible."
+ (let* ((data (tree-node->data node))
+ (tag (car data)))
+ (when (ecb--semantic-tag-p tag)
+ (save-selected-window
+ (select-window ecb-last-edit-window-with-point)
+ (funcall ecb-analyse-show-tag-info-fn (ecb-analyse-gen-tag-info tag))))))
+
+(defun ecb-mouse-over-analyse-node (node &optional window no-message click-force)
+ "Displays help text if mouse moves over a node in the analyse buffer or if
+CLICK-FORCE is not nil and always with regards to the settings in
+`ecb-analyse-show-node-info'. NODE is the node for which help text should be
+displayed, WINDOW is the related window, NO-MESSAGE defines if the help-text
+should be printed here."
+ (let ((str (when (or click-force
+ (ecb-show-minibuffer-info node window
+ (car
+ ecb-analyse-show-node-info)))
+ (if (equal (cdr ecb-analyse-show-node-info) 'full-info)
+ (ecb-analyse-gen-tag-info (car (tree-node->data node)))
+ (tree-node->name node)))))
+ (prog1 str
+ (unless no-message
+ (ecb-nolog-message str)))))
+
+(defun ecb-analyse-node-mouse-highlighted-p (node)
+ "Return not nil when NODE has a positioned tag as data or belongs to the
+completions. This means that this node should be highlighted when mouse is
+moved over it."
+ (or (equal ecb-analyse-nodedata-tag-with-pos
+ (nth 1 (tree-node->data node)))
+ (member (tree-node->type node)
+ (list ecb-analyse-nodetype-completions
+ ecb-analyse-nodetype-localvars))))
+
+(defun ecb-analyse-create-menu (node)
+ "Return a popup-menu suitable for NODE."
+ (let* ((data (tree-node->data node))
+ (tag-p (not (equal (nth 1 data) ecb-analyse-nodedata-no-tag)))
+ (tag-with-pos-p (equal (nth 1 data) ecb-analyse-nodedata-tag-with-pos))
+ (nodetype (nth 2 data)))
+ (delq nil (list (if (member nodetype (list
+ ecb-analyse-nodetype-completions
+ ecb-analyse-nodetype-localvars))
+ '(ecb-analyse-complete/insert "Complete/insert"))
+ (if tag-p
+ '(ecb-analyse-show-tag-info "Show tag info"))
+ (if tag-with-pos-p
+ '(ecb-analyse-jump-to-tag "Jump to tag"))))))
+
+(defun ecb-analyse-menu-creator (tree-buffer-name node)
+ "Creates the popup-menus for the analyse-buffer."
+ (setq ecb-layout-prevent-handle-ecb-window-selection t)
+ (let ((nodetype (tree-node->type node)))
+ (unless (equal nodetype ecb-analyse-nodetype-bucket)
+ (mapcar (function (lambda (type)
+ (cons type (ecb-analyse-create-menu node))))
+ `(,ecb-analyse-nodetype-context
+ ,ecb-analyse-nodetype-arguments
+ ,ecb-analyse-nodetype-completions
+ ,ecb-analyse-nodetype-localvars
+ ,ecb-analyse-nodetype-prefix
+ ,ecb-analyse-nodetype-assignee
+ ,ecb-analyse-nodetype-function
+ ,ecb-analyse-nodetype-function-arg)))))
+
+
+(defun ecb-analyse-gen-menu-title-creator ()
+ "Returns a menu-title-create-function for the nodetypes of the
+analyse-buffer."
+ (mapcar (function (lambda (nodetype)
+ (cons nodetype
+ (function (lambda (node)
+ (tree-node->name node))))))
+ `(,ecb-analyse-nodetype-context
+ ,ecb-analyse-nodetype-arguments
+ ,ecb-analyse-nodetype-completions
+ ,ecb-analyse-nodetype-localvars
+ ,ecb-analyse-nodetype-prefix
+ ,ecb-analyse-nodetype-assignee
+ ,ecb-analyse-nodetype-function
+ ,ecb-analyse-nodetype-function-arg)))
+
+
+(defecb-tree-buffer-creator ecb-create-analyse-tree-buffer ecb-analyse-buffer-name
+ "Create the tree-buffer for analyse-display."
+ (tree-buffer-create
+ ecb-analyse-buffer-name
+ :frame ecb-frame
+ :mouse-action-trigger ecb-tree-mouse-action-trigger
+ :is-click-valid-fn 'ecb-interpret-mouse-click
+ :node-selected-fn 'ecb-tree-buffer-node-select-callback
+ :node-expanded-fn 'ecb-tree-buffer-node-expand-callback
+ :node-collapsed-fn 'ecb-tree-buffer-node-collapsed-callback
+ :node-mouse-over-fn 'ecb-mouse-over-analyse-node
+ :mouse-highlight-fn 'ecb-analyse-node-mouse-highlighted-p
+ :node-data-equal-fn 'ecb-analyse-compare-node-data
+ :maybe-empty-node-types nil
+ :leaf-node-types nil
+ :menu-creator 'ecb-analyse-menu-creator
+ :menu-titles (ecb-analyse-gen-menu-title-creator)
+ :modeline-menu-creator 'ecb-common-tree-buffer-modeline-menu-creator
+ :sticky-parent-p ecb-tree-make-parent-node-sticky
+ :sticky-indent-string ecb-tree-stickynode-indent-string
+ :sticky-parent-fn nil
+ :trunc-lines (ecb-member-of-symbol/value-list ecb-analyse-buffer-name
+ ecb-tree-truncate-lines)
+ :read-only t
+ :tree-indent ecb-tree-indent
+ :incr-search-p nil ;; ecb-tree-incremental-search
+ :incr-search-additional-pattern nil ;; ecb-methods-incr-searchpattern-node-prefix
+ :arrow-navigation ecb-tree-navigation-by-arrow
+ :hor-scroll-step ecb-tree-easy-hor-scroll
+ :default-images-dir (car ecb-tree-image-icons-directories)
+ :additional-images-dir (ecb-member-of-symbol/value-list ecb-analyse-buffer-name
+ (cdr ecb-tree-image-icons-directories)
+ 'car 'cdr)
+ :image-file-prefix "ecb-"
+ :tree-style ecb-tree-buffer-style
+ :ascii-guide-face ecb-tree-guide-line-face
+ :type-facer nil
+ :expand-symbol-before-p ecb-tree-expand-symbol-before
+ :highlight-node-face ecb-analyse-face
+ :general-face ecb-analyse-general-face
+ :after-create-hook (append
+ (list (function (lambda ()
+ (ecb-common-after-tree-buffer-create-actions))))
+ ecb-common-tree-buffer-after-create-hook
+ ecb-analyse-buffer-after-create-hook)
+ :after-update-hook nil))
+
+
+
+(silentcomp-provide 'ecb-analyse)
+
+;;; ecb-anaylse.el ends here
View
160 site-lisp/ecb-snap/ecb-autogen.el
@@ -0,0 +1,160 @@
+;;; ecb-autogen.el --- Auto load statement generator
+
+;; Copyright (C) 2000 - 2005 Jesper Nordenberg,
+;; Klaus Berndl,
+;; Kevin A. Burton,
+;; Free Software Foundation, Inc.
+
+;; Author: Jesper Nordenberg <mayhem@home.se>
+;; Klaus Berndl <klaus.berndl@sdm.de>
+;; Kevin A. Burton <burton@openprivacy.org>
+;; Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
+;; Keywords: browser, code, programming, tools
+;; Created: 2003
+
+;; 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-autogen.el,v 1.15 2010/02/23 16:08:56 berndl Exp $
+
+;;; Commentary:
+;;
+;; Automatically generate autoloads for ECB
+;;
+;; This code is based onto semantic-autogen.el, the autoload generator of
+;; semantic.
+;;
+
+;;; History
+;;
+;; For the ChangeLog of this file see the CVS-repository. For a complete
+;; history of the ECB-package see the file NEWS.
+
+;;; Code
+;;
+
+(require 'autoload)
+
+(require 'ecb-util)
+
+(eval-when-compile
+ (require 'silentcomp))
+
+
+(when (ecb-noninteractive)
+ ;; If the user is doing this non-interactively, we need to set up
+ ;; these conveniences.
+ (add-to-list 'load-path nil)
+ (set (if (boundp 'find-file-hook)
+ 'find-file-hook
+ 'find-file-hooks) nil)
+ (setq find-file-suppress-same-file-warnings t)
+ )
+
+
+(defconst ecb-autogen-header
+ "Auto-generated ecb autoloads"
+ "Header of the auto-generated autoloads file.")
+
+(defconst ecb-autogen-file "ecb-autoloads.el"
+ "Name of the auto-generated autoloads file.")
+
+(defconst ecb-autoload-feature "ecb-autoloads"
+ "Feature-name of the autoloads")
+
+(defvar ecb-autogen-subdirs nil
+ "Sub-directories to scan for autoloads.")
+
+(defun ecb-autogen-update-header ()
+ "Update header of the auto-generated autoloads file.
+Run as `write-contents-hooks'."
+ (when (ecb-string= generated-autoload-file (buffer-file-name))
+ (let ((tag (format ";;; %s ---" (file-name-nondirectory
+ (buffer-file-name)))))
+ (message "Updating header...")
+ (goto-char (point-min))
+ (cond
+ ;; Replace existing header line
+ ((re-search-forward (concat "^" (regexp-quote tag)) nil t)
+ (beginning-of-line)
+ (kill-line 1)
+ )
+ ;; Insert header before first ^L encountered (XEmacs)
+ ((re-search-forward "^ " nil t)
+ (beginning-of-line)
+ ))
+ (insert tag " " ecb-autogen-header)
+ (newline)
+ (message "Updating header...done")
+ nil ;; Say not already written.
+ )))
+
+;; We code this so clumsy to silence the bytecompiler of GNU Emacs >= 21.4 not
+;; to complain about obsoleteness of `write-contents-hooks'.
+(defun ecb-batch-update-autoloads ()
+ (let ((old-val (symbol-value (if (boundp 'write-contents-functions)
+ 'write-contents-functions
+ 'write-contents-hooks))))
+ (unwind-protect
+ (progn
+ (set (if (boundp 'write-contents-functions)
+ 'write-contents-functions
+ 'write-contents-hooks)
+ '(ecb-autogen-update-header))
+ (batch-update-autoloads))
+ (set (if (boundp 'write-contents-functions)
+ 'write-contents-functions
+ 'write-contents-hooks)
+ old-val))))
+
+(defun ecb-update-autoloads ()
+ "Update ecb autoloads from sources.
+Autoloads file name is defined in variable `ecb-autogen-file'. If ECB is
+installed as regular XEmacs-package then this function reports an error and
+does nothing."
+ (interactive)
+ (if ecb-regular-xemacs-package-p
+ (ecb-error "Updating autoloads not possible for regular XEmacs-packages!")
+ (if (file-exists-p (expand-file-name ecb-autogen-file))
+ (delete-file (expand-file-name ecb-autogen-file)))
+ (when (not ecb-running-xemacs)
+ ;; generate a new one but do this not for XEmacs because XEmacs must(!)
+ ;; handle this itself
+ (with-temp-file (expand-file-name ecb-autogen-file)
+ (insert " ")))
+ (let* ((default-directory (file-name-directory (locate-library "ecb")))
+ (generated-autoload-file (expand-file-name ecb-autogen-file))
+ ;; needed for XEmacs to ensure that always a feature 'ecb-autoloads
+ ;; is provided and not a feature like 'ecb-1.91.2-autoloads (XEmacs
+ ;; uses the installation-directory of ECB as feature prefix if
+ ;; autoload-package-name is not provided.
+ (autoload-package-name "ecb")
+ (subdirs (mapcar 'expand-file-name ecb-autogen-subdirs))
+ (command-line-args-left (cons default-directory subdirs))
+ )
+ (ecb-batch-update-autoloads))
+ ;; XEmacs adds autom. the provide statement but for GNU Emacs we must do
+ ;; this:
+ (when (not ecb-running-xemacs)
+ (with-current-buffer (find-file-noselect (expand-file-name ecb-autogen-file))
+ (goto-char (point-min))
+ (when (not (re-search-forward (format "^(provide '%s)"
+ ecb-autoload-feature) nil t))
+ (goto-char (point-max))
+ (insert (format "\n(provide '%s)\n" ecb-autoload-feature))
+ (save-buffer)
+ (kill-buffer (current-buffer)))))))
+
+(silentcomp-provide 'ecb-autogen)
+
+;;; ecb-autogen.el ends here
View
72 site-lisp/ecb-snap/ecb-autoloads.el
@@ -0,0 +1,72 @@
+
+;;;### (autoloads (ecb-byte-compile ecb-minor-mode ecb-activate)
+;;;;;; "ecb" "ecb.el" (18951 1663))
+;;; Generated autoloads from ecb.el
+
+(autoload (quote ecb-activate) "ecb" "\
+Activates ECB and creates the special buffers for the choosen layout.
+For the layout see `ecb-layout-name'. This function raises always the
+ECB-frame if called from another frame. This is the same as calling
+`ecb-minor-mode' with a positive argument.
+
+\(fn)" t nil)
+
+(autoload (quote ecb-minor-mode) "ecb" "\
+Toggle ECB minor mode.
+With prefix argument ARG, turn on if positive, otherwise off. Return non-nil
+if the minor mode is enabled.
+
+\\{ecb-mode-map}
+
+\(fn &optional ARG)" t nil)
+
+(autoload (quote ecb-byte-compile) "ecb" "\
+Byte-compiles the ECB package.
+This is done for all lisp-files of ECB if FORCE-ALL is not nil or for each
+lisp-file FILE.el which is either newer than FILE.elc or if FILE.elc doesn't
+exist.
+
+\(fn &optional FORCE-ALL)" t nil)
+
+;;;***
+
+;;;### (autoloads (ecb-show-help) "ecb-help" "ecb-help.el" (18949
+;;;;;; 40966))
+;;; Generated autoloads from ecb-help.el
+
+(autoload (quote ecb-show-help) "ecb-help" "\
+Shows the online help of ECB in Info or HTML-format.
+The format depends on the setting in `ecb-show-help-format'. If called with
+prefix argument, i.e. if FORMAT is not nil then the user is prompted to choose
+the format of the help (Info or Html).
+
+If an error about not finding the needed help-file occurs please take a look
+at the options `ecb-help-info-start-file' and `ecb-help-html-start-file'!
+
+Note: If you got ECB as a standard XEmacs-package maybe the
+HTML-online-documentation is not included.
+
+\(fn &optional FORMAT)" t nil)
+
+;;;***
+
+;;;### (autoloads nil "ecb-util" "ecb-util.el" (18957 34841))
+;;; Generated autoloads from ecb-util.el
+
+(defconst ecb-running-xemacs (featurep (quote xemacs)))
+
+;;;***
+
+;;;### (autoloads nil nil ("ecb-advice-test.el" "ecb-analyse.el"
+;;;;;; "ecb-autogen.el" "ecb-cedet-wrapper.el" "ecb-common-browser.el"
+;;;;;; "ecb-compatibility.el" "ecb-compilation.el" "ecb-create-layout.el"
+;;;;;; "ecb-cycle.el" "ecb-eshell.el" "ecb-examples.el" "ecb-face.el"
+;;;;;; "ecb-file-browser.el" "ecb-jde.el" "ecb-layout-defs.el" "ecb-layout.el"
+;;;;;; "ecb-method-browser.el" "ecb-mode-line.el" "ecb-navigate.el"
+;;;;;; "ecb-speedbar.el" "ecb-symboldef.el" "ecb-tod.el" "ecb-upgrade.el"
+;;;;;; "ecb-winman-support.el" "silentcomp.el" "tree-buffer.el")
+;;;;;; (18958 49293 356000))
+
+;;;***
+
+(provide 'ecb-autoloads)
View
368 site-lisp/ecb-snap/ecb-cedet-wrapper.el
@@ -0,0 +1,368 @@
+;;; ecb-cedet-wrapper.el -- define wrappers for all cedet funcs/vars
+
+;; Copyright (C) 2000 - 2009 Klaus Berndl,
+;; Free Software Foundation, Inc.
+
+;; Author: Klaus Berndl <klaus.berndl@sdm.de>
+;; Maintainer: Klaus Berndl <klaus.berndl@sdm.de>
+;; Keywords: browser, code, programming, tools
+;; Created: 2009
+
+;; 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-cedet-wrapper.el,v 1.7 2010/02/21 13:10:12 berndl Exp $
+
+;;; Commentary:
+
+;; This file contains wrappers for every cedet-function and -variable used
+;; by ECB independent which cedet version is used. So the ECB-code is
+;; independent from the fact, if cedet offers backward-compatibility or
+;; not. This library offers for each used variable V of cedet a getter-function
+;; named "ecb--V" and for each function F an alias named "ecb--F". V and F
+;; follow the naming conventiones of cedet 1.0 but the resulting functions
+;; always point to the correct variable or function of cedet independent
+;; which cedet version is loaded. ECB only uses the functions exported from
+;; ecb-cedet-wrapper.el!
+;;
+;; In addition this file defines all requirements ECB needs of CEDET.
+
+
+(eval-when-compile
+ (require 'silentcomp))
+
+(eval-when-compile
+ ;; to avoid compiler grips
+ (require 'cl))
+
+(require 'ecb-util)
+
+(defconst ecb-cedet-old-sourcetree-structure-detected-p
+ (locate-library "semantic-ctxt")
+ "Not nil if old cedet sourcetree-structure is detected.")
+
+;; Additonal cedet libraries needed by ecb must be added here!!
+;; TODO: Klaus Berndl <klaus.berndl@sdm.de>: We have to pay attention if there
+;; are changes when Eric marriages the two styles for his CVS-repository
+(defconst ecb-cedet-lib-registry '((cedet . cedet)
+ (semantic . semantic)
+ (semantic-ctxt . semantic/ctxt)
+ (semantic-analyze . semantic/analyze)
+ (semanticdb . semantic/db)
+ (semanticdb-find . semantic/db-find)
+ (semanticdb-mode . semantic/db-mode)
+ (semantic-el . semantic/bovine/el)
+ (eieio . eieio)
+ (speedbar . speedbar))
+ "Maps the old library-structure of cedet to the equivalent libs
+of Emacs >= 23.2. The value is an assoc list where the car is the
+lib-symbol of an old-style cedet-library and the cdr is the
+corresponding lib-symbol of the new style library \(as with the
+cedet-suite integrated into Emacs >= 23.2).
+
+ALL CEDET-LIBRARIES NEEDED BY ECB MUST BE REGISTERED HERE!")
+
+(defconst ecb-cedet-required-version-min '(1 0 2 6)
+ "Minimum version of cedet needed by ECB.
+The meaning is as follows:
+1. Major-version
+2. Minor-version
+3. 0 = alpha, 1 = beta, 2 = pre, 3 = nothing \(e.g. \"1.4\"), 4 = . \(e.g. \"1.4.3\"
+4. Subversion after the alpha, beta, pre or .")
+
+(defconst ecb-cedet-required-version-max '(1 0 4 9)
+ "Maximum version of CEDET currently accepted by ECB.
+See `ecb-required-cedet-version-min' for an explanation.")
+
+(defun ecb-cedet-missing-libs ()
+ "Return a list of names of missing cedet-libs.
+If no cedet libs are missing nil is returned."
+ (let ((missing-libs-list nil)
+ (lib nil))
+ (dolist (l-elem ecb-cedet-lib-registry)
+ (setq lib (symbol-name (if ecb-cedet-old-sourcetree-structure-detected-p
+ (car l-elem)
+ (cdr l-elem))))
+ (when (not (locate-library lib))
+ (push lib missing-libs-list)))
+ missing-libs-list))
+
+(defun ecb-cedet-require (old-style-lib)
+ "Loads a cedet-library CVS-LIB into Emacs.
+OLD-STYLE-LIB is the symbol-name of the cedet-library as in the cvs-version of
+cedet in feb 2010 \(ie. there is a lib semantic-ctxt instead of semantic/ctxt).
+All cedet libaryies needed by ECB must be loaded with this function! Do not
+use `require' for looading a cedet-library into Emacs!"
+ (require (if ecb-cedet-old-sourcetree-structure-detected-p
+ old-style-lib
+ (cdr (assoc old-style-lib ecb-cedet-lib-registry)))))
+
+;; With old style CEDET-load-mechanism cedet.el must be loaded "by
+;; hand" to setup load-path correctly for cedet.
+;; + Old-style CEDET-loader: The following require for 'cedet fails if
+;; cedet.el is either not loaded or cedet/common is not contained in the
+;; load-path. For these cases we encapsulate it with ignore-errors.
+;; + New-style CEDET-loader (as in Emacs >= 23.2): cedet.el is not needed to
+;; setup the load-path but it contains the costant `cedet-version' which is
+;; needed by ECB.
+(ignore-errors (ecb-cedet-require 'cedet))
+
+(defconst ecb-cedet-missing-libraries
+ (ecb-cedet-missing-libs)
+ "List of library-names of CEDET missed by ECB.
+Nil if all libs needed by ECB are found.")
+
+(unless ecb-cedet-missing-libraries
+ (ecb-cedet-require 'semantic)
+ (ecb-cedet-require 'semantic-ctxt)
+ (ecb-cedet-require 'semantic-analyze)
+ (ecb-cedet-require 'semanticdb)
+ (ecb-cedet-require 'semanticdb-find)
+ (ecb-cedet-require 'semanticdb-mode)
+ (ecb-cedet-require 'eieio))
+
+(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.")
+
+(defun ecb-check-semantic-load ()
+ "Checks if cedet is correctly loaded if semantic 2.X is used and if the same
+semantic-version has been used for byte-compiling ECB and loading into Emacs.
+If ECB detects a problem it is reported and then an error is thrown."
+ (when (boundp 'semantic-version)
+ (let ((err-msg
+ (cond ;; Different semantic-version used for byte-compiling ECB and
+ ;; loading into Emacs.
+ ((not (string= semantic-version ecb-compiled-in-semantic-version))
+ (concat "ECB has been byte-compiled with another semantic-version than currently\n"
+ "loaded into Emacs:\n"
+ (format " + Semantic used for byte-compiling ECB: %s\n"
+ ecb-compiled-in-semantic-version)
+ (format " + Semantic currently loaded into Emacs: %s\n"
+ semantic-version)
+ "Please ensure that ECB is byte-compiled with the same semantic-version as you\n"
+ "you load into your Emacs. Check if you have byte-compiled ECB with the cedet-\n"
+ "suite but loaded old semantic 1.X into Emacs or vice versa.\n\n"
+ "In general it is recommended to start ECB first-time not byte-compiled\n"
+ "and then call the command `ecb-byte-compile'. This ensures you byte-compile ECB\n"
+ "with the same library-versions \(semantic etc.) as you load into Emacs.\n"
+ "If you use the Makefile check the variables CEDET before compiling!\n"
+ ))
+ (t ""))))
+ (unless (= 0 (length err-msg))
+ (with-output-to-temp-buffer "*ECB semantic-load problems*"
+ (princ "Currently ECB can not be activated cause of the following reason:\n\n")
+ (princ err-msg)
+ (princ "\n\nPlease fix the reported problem and restart Emacs\n"))
+ (ecb-error "Please fix the reported problem and restart Emacs!")))))
+
+(defun ecb-check-cedet-load ()
+ "Checks if cedet is correctly loaded if semantic 2.X is used and if the same
+semantic-version has been used for byte-compiling ECB and loading into Emacs.
+If ECB detects a problem it is reported and then an error is thrown."
+ (when (boundp 'cedet-version)
+ (let ((err-msg
+ (cond ;; cedet was not compiled into ECB
+ ((null ecb-compiled-in-cedet-version)
+ (concat (format "Currently CEDET %s is loaded but ECB has been byte-compiled without\n"
+ cedet-version)
+ "any CEDET. Please either use ECB un-byte-compiled \(remove all *.elc\n"
+ "files from the ECB-directory) or byte-compile ECB correctly with CEDET!\n"
+ "In the later case it is recommended to start ECB first-time not byte-compiled\n"
+ "and then call the command `ecb-byte-compile'. This ensures you byte-compile ECB\n"
+ "with the same CEDET-library-version as you load into Emacs.\n"
+ "If you use the Makefile check the variable CEDET before compiling!\n"
+ ))
+ ;; Different cedet-version used for byte-compiling ECB and
+ ;; loading into Emacs.
+ ((not (string= cedet-version ecb-compiled-in-cedet-version))
+ (concat "ECB has been byte-compiled with another cedet-version than currently\n"
+ "loaded into Emacs:\n"
+ (format " + CECET used for byte-compiling ECB: %s\n"
+ ecb-compiled-in-cedet-version)
+ (format " + CEDET currently loaded into Emacs: %s\n"
+ cedet-version)
+ "Please ensure that ECB is byte-compiled with the same cedet-version as you\n"
+ "you load into your Emacs.\n\n"
+ "In general it is recommended to start ECB first-time not byte-compiled\n"
+ "and then call the command `ecb-byte-compile'. This ensures you byte-compile ECB\n"
+ "with the same CEDET-library-version as you load into Emacs.\n"
+ "If you use the Makefile check the variable CEDET before compiling!\n"))
+ (t ""))))
+ (unless (= 0 (length err-msg))
+ (with-output-to-temp-buffer "*ECB cedet-load problems*"
+ (princ "Currently ECB can not be activated cause of the following reason:\n\n")
+ (princ err-msg)
+ (princ "\n\nPlease fix the reported problem and restart Emacs\n"))
+ (ecb-error "Please fix the reported problem and restart Emacs!")))))
+
+(defconst ecb-semantic-2-loaded (ignore-errors
+ (string-match "^2" semantic-version)))
+
+;; -- getter functions for all variables of cedet currently used by ECB ---
+
+(defsubst ecb--semantic-symbol->name-assoc-list ()
+ "Return the value of `semantic-symbol->name-assoc-list'."
+ (symbol-value 'semantic-symbol->name-assoc-list))
+
+(defsubst ecb--semantic-symbol->name-assoc-list-for-type-parts ()
+ "Return the value of `semantic-symbol->name-assoc-list-for-type-parts'."
+ (symbol-value 'semantic-symbol->name-assoc-list-for-type-parts))
+
+(defsubst ecb--semantic-format-tag-functions ()
+ "Return value of `semantic-format-tag-functions'."
+ (symbol-value 'semantic-format-tag-functions))
+
+(defsubst ecb--semantic-orphaned-member-metaparent-type ()
+ "Return the value of `semantic-orphaned-member-metaparent-type'."
+ (symbol-value 'semantic-orphaned-member-metaparent-type))
+
+(defsubst ecb--semantic-uml-colon-string ()
+ "Return the value of `semantic-uml-colon-string'."
+ (symbol-value 'semantic-uml-colon-string))
+
+(defsubst ecb--semantic-format-face-alist ()
+ "Return the value of `semantic-format-face-alist'."
+ (symbol-value 'semantic-format-face-alist))
+
+(defsubst ecb--semantic-after-toplevel-cache-change-hook ()
+ "Return the hook-symbol `semantic-after-toplevel-cache-change-hook'."
+ 'semantic-after-toplevel-cache-change-hook)
+
+(defsubst ecb--semantic-after-partial-cache-change-hook ()
+ "Return the hook-symbol `semantic-after-partial-cache-change-hook'."
+ 'semantic-after-partial-cache-change-hook)
+
+(defsubst ecb--semantic--before-fetch-tags-hook ()
+ "Return the hook-symbol `semantic--before-fetch-tags-hook'."
+ 'semantic--before-fetch-tags-hook)
+
+(defsubst ecb--ezimage-use-images ()
+ (if (boundp 'ezimage-use-images)
+ ezimage-use-images))
+
+(defsubst ecb--semantic-format-use-images-flag ()
+ (if (boundp 'semantic-format-use-images-flag)
+ semantic-format-use-images-flag))
+
+;; -- an alias for all functions of cedet currently used by ECB ---
+
+;; (delq nil (mapcar (function (lambda (f)
+;; (if (not (fboundp f))
+;; f)))
+;; ecb--cedet-function-list))
+
+(defconst ecb--cedet-function-list
+ '(
+ semantic--format-colorize-text
+ semantic--tag-get-property
+ semantic--tag-overlay-cdr
+ semantic--tag-put-property
+ semantic--tag-set-overlay
+ semantic-active-p
+ semantic-adopt-external-members
+ semantic-analyze-current-context
+ semantic-analyze-find-tag
+ semantic-analyze-possible-completions
+ semantic-analyze-tag-type
+ semantic-brute-find-first-tag-by-name
+ semantic-bucketize
+ semantic-c-template-string
+ semantic-calculate-scope
+ semantic-clear-toplevel-cache
+ semantic-current-tag
+ semantic-current-tag-parent
+ semantic-dependency-tag-file
+ semantic-documentation-for-tag
+ semantic-equivalent-tag-p
+ semantic-fetch-available-tags
+ semantic-fetch-tags
+ semantic-find-tag-by-overlay
+ semantic-find-tags-by-class
+ semantic-find-tags-by-name
+ semantic-flatten-tags-table
+ semantic-get-local-arguments
+ semantic-go-to-tag
+ semantic-lex-token-start
+ semantic-overlay-live-p
+ semantic-overlay-p
+ semantic-something-to-tag-table
+ semantic-tag
+ semantic-tag-abstract-p
+ semantic-tag-bounds
+ semantic-tag-buffer
+ semantic-tag-calculate-parent
+ semantic-tag-children-compatibility
+ semantic-tag-class
+ semantic-tag-components
+ semantic-tag-components-with-overlays
+ semantic-tag-end
+ semantic-tag-faux-p
+ semantic-tag-function-arguments
+ semantic-tag-function-constructor-p
+ semantic-tag-function-destructor-p
+ semantic-tag-function-parent
+ semantic-tag-get-attribute
+ semantic-tag-name
+ semantic-tag-named-parent
+ semantic-tag-new-variable
+ semantic-tag-overlay
+ semantic-tag-p
+ semantic-tag-protection
+ semantic-tag-prototype-p
+ semantic-tag-start
+ semantic-tag-static-p
+ semantic-tag-type
+ semantic-tag-type-interfaces
+ semantic-tag-type-members
+ semantic-tag-type-superclasses
+ semantic-tag-with-position-p
+ semanticdb-brute-deep-find-tags-by-name
+ semanticdb-deep-find-tags-by-name
+ semanticdb-find-result-length
+ semanticdb-find-result-nth
+ semanticdb-find-tags-by-name
+ semanticdb-full-filename
+ semanticdb-minor-mode-p
+ semanticdb-strip-find-results
+ )
+)
+
+(defconst ecb--semantic-format-function-list
+ '(
+ semantic-format-tag-abbreviate
+ semantic-format-tag-concise-prototype
+ semantic-format-tag-name
+ semantic-format-tag-prin1
+ semantic-format-tag-prototype
+ semantic-format-tag-summarize
+ semantic-format-tag-uml-abbreviate
+ semantic-format-tag-uml-concise-prototype
+ semantic-format-tag-uml-prototype