/usr/lib/xemacs/xemacs-packages/lisp/, and they won't work with JDE, so you have to get eieio, semantic and Speedbar. We'll load the new versions into ~/.xemacs, and then set up the XEmacs load-path so that the new versions are found before the old.
Web to the CEDET home page. Download the "Sematic Bovinator", "eieio" and "Speedbar".
tar xf speedbar-0.14beta4.tar
ln -s speedbar-0.14beta4 speedbar
This executed with several warnings.
tar xf eieio-0.174.tar
ln -s eieio-0.174 eieio
This mostly runs, but complains about
While compiling toplevel forms in file /usr/src/eieio/linemark.el: !! Symbol's function definition is void ((overlay-p)) >>Error occurred processing linemark.el: Symbol's function definition is void: overlay-p
I emailed Eric Ludlam about it, and he responded
Hmmm, this looks like a strange issue with the aliases I create to handle overlay compatibility. It trigger's off of the xemacs feature. Semantic does the same thing which is what is surprising that it would fail here. In fact, the word "overlay-p" doesn't exist in my file. Perhaps you have loaded overlay.el which is supposed to be a compatibility layer for XEmacs emulating Emacs which can cause some problems.
Fortunately, if you aren't planning on explicitly using linemark, you can ignore this error.
tar xf semantic-1.414.tar
ln -s semantic-1.414 semantic
This executed with several warnings.
tar xf jde-beta.tar
ln -s jde-2.2.9 jde
chown -R siemsen:users jde-2.2.9
EMACS = xemacs
ELIB = /usr/lib/xemacs/xemacs-packages/lisp/elib
This unpacks the code and the docs. The local docs don't explain installation. I had to go to the docs on the JDE home page to find out the following.
Mozilla doesn't like "file" URLs, and the JDE docs contain frames that won't work unless the docs are installed in a web tree. So copy them into the web tree...
tar cf - html | (cd /usr/web; tar xfp -)
mv /usr/web/html /usr/web/jde
Now you can use the following "local" versions, or the accompanying links to the JDEE website
We need to tell XEmacs where the JDE is, so it'll be loaded at
startup. Edit my
~/.xemacs/init.el file and add the
following if I'm on proteus:
(add-to-list 'load-path (expand-file-name "/home/siemsen/.xemacs/jde/lisp"))
(add-to-list 'load-path (expand-file-name "/home/siemsen/.xemacs/eieio"))
(add-to-list 'load-path (expand-file-name "/home/siemsen/.xemacs/speedbar"))
(add-to-list 'load-path (expand-file-name "/home/siemsen/.xemacs/semantic"))
There are many mistakes in the JDE User's Guide, including...
To be able to use TAGS on Java files, you have to have access to
the jtags script that builds tags databases. Edit my
.bashrc file and add this when I'm
Saveyour changes. This will update the
Jdk Registry. On npad, I set
Jdk Doc Urlentry. Set it to
Build Functionentry. Set it to
Enable Findentry. Toggle it to
Key Bindings(NOT the
Jdb Key Bindings:-) entry.
prj.elin the directory that contains the
.javafiles. Then you set up various jde- variables, and save them in the project file. Whenever you open a java file, the JDE will search for the project file and read it to set the variables.
To set per-project JDE variables, don't just edit the project file. Instead, set the variables and then tell XEmacs to update the project file so they'll be set correctly next time. To create a project file, use JDE->Project->Project File>Create New.
The documented way to set the project file variables is to use
JDE->Project->Options mode to set
the variables, and then save them to the project file. Trouble
is, the "customize" mode sets variables in the
~/.xemacs/custom.el file, and they
don't get written to the
file at all. If you want the prj.el file to "work", I guess you
have to edit it manually. Sigh.
You can also convert your Ant
build.xml file into a JDEE
prj.el file. See
Converting build.xml to prj.xml
jde-ant-buildas described above.
Exit XEmacs and restart, open a JAVA file, and you should see the JDEbug menu item at the top of the window.
'(jde-db-debugger (quote ("JDEbug" "" . "Executable")))
'(jde-db-source-directories (quote ("/home/siemsen/nandisc" "/home/yplay-java" "/home/opennnms-all/jsnmp")))
Use C-c C-v C-w to lookup the java doc for a class or symbol.
Use C-c C-v C-y to lookup the java source code for a class.
Use C-c C-v C-z to insert the "import" for a class.
Use C-c C-v . to auto-complete. Cycle through completions by hitting it multiple times.
Use M-x jde-import-kill-extra-imports to analyze your import statements and delete the ones that are unnecessary.
Use M-x jde-import-organize to group and sort a buffer's import statements according to rules that you specify.
Use M-x ispell-comments-and-strings to spell-check comments in source code.
"Abbrev Mode" in the JDE lets you type part of a Java keyword and the JDE creates the corresponding syntactic structure. For instance, you type "for " and the JDE prompts for the conditional clause and creates the full "for" block. This can be annoying, because it tends to complete things when you don't want it to, like when you're typing comments. You can avoid it by typing C-q before the space character, but that's asking too much. The jde-enable-abbrev-mode variable controls whether this is enabled. I wish it were like dynamic class completion, where you could type part of the word and then tell XEmacs to do the completion explicitly, with a special key. Sigh.