Next: Compile-window on demand, Previous: Grepping directories, Up: Common use-cases [Contents][Index]

### 10.11 Working best with ECB and JDEE

ECB is completely language independent, i.e. it works with any language supported by semantic (e.g. C, C++, Java, Elisp etc.).

But there are some special integrations for the great Java-Development-Environment JDEE:

- Displaying contents of class under point

  With the command `ecb-jde-display-class-at-point` you can display the contents of the class which contains the definition of the “thing” at point (which can be a method, variable etc.).

- Creating new source-files

  The popup-menus in the directories- and the sources-buffer offer a command “Create Source” which allows easy creating new java-sources by calling the command `jde-gen-class-buffer`.

- Adding user-extensions to the popup-menus

  The options `ecb-directories-menu-user-extension` and `ecb-sources-menu-user-extension` 42 allow adding often used JDEE-commands to the popup-menus of the directories- or sources-buffer. One example is to add building the project of current directory. Here is a function which could be added to `ecb-directories-menu-user-extension`:

      (defun ecb-dir-popup-jde-build (node)
        "Build project in directory."
        (let ((project-file
      	 (expand-file-name jde-ant-buildfile (tree-node-get-data node))))
          (jde-ant-build project-file "build")))

  Of course you can add entries to the option `ecb-methods-menu-user-extension` and `ecb-methods-menu-user-extension` too.

#### Footnotes

### (42)

If you need a dynamic way of menu-extension then you should have a look at the options `ecb-directories-menu-user-extension-function` and `ecb-sources-menu-user-extension-function`.