Hello,

i am quite new to jde and in no way an emacs pro. I run the debian testing package of jde. when i now open a .java file everything looks good, jde is loaded. opening a second .java file however gives the message
"xxx.java was not setup for parsing."
so what does that mean? the thing that disturbs me most is that there is no sytax highlighting in that second file.


i found some threads on this in the list archive, however i don't understand anything of what is mentioned there.

the *Messages* buffer after starting emacs

Loading tool-bar...done
Loading image...done
Loading tooltip...done
Loading 00debian-vars...done
Loading 35elib-startup (source)...done
Loading 50cedet-common (source)...
Loading advice...done
Loading 50cedet-common (source)...done
Loading 50dictionaries-common (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading ispell...done
Loading 50dictionaries-common (source)...done
Loading 50eieio (source)...done
Loading 50jde (source)...done
Loading 51ede (source)...done
Loading 51speedbar (source)...done
Loading 52semantic (source)...
Loading derived...done
Loading regexp-opt...done
Loading mule-util...done
Loading font-lock...done
Loading /usr/lib/emacs/21.3/i386-linux/fns-21.3.1-x.el (source)...done
Loading semantic-idle (source)...done [2 times]
Loading ede-speedbar (source)...done
Loading 52semantic (source)...done
Loading /usr/share/emacs/site-lisp/cedet-common/cedet.el (source)...
"/usr/share/emacs/site-lisp/cedet-common/" added to `load-path'
Setting up cedet...done
Setting up cogre...
progn:
Cannot open load file: cogre-load
Setting up ede...done
Setting up eieio...done
Setting up semantic...done
Setting up speedbar...done
Setting up cedet-contrib...
progn:
Cannot open load file: cedet-contrib-load
Loading /usr/share/emacs/site-lisp/cedet-common/cedet.el (source)...done
Loading semantic-el (source)...done



There are two suspicious lines: Cannot open load file: cogre-load Cannot open load file: cedet-contrib-load


My .emacs file:

(require 'cc-mode)
(global-font-lock-mode 1)
(c-toggle-hungry-state 1)
(require 'cc-mode)
(defun my-build-tab-stop-list (width)
 (let ((num-tab-stops (/ 80 width))
   (counter 1)
   (ls nil))
   (while (<= counter num-tab-stops)
     (setq ls (cons (* width counter) ls))
     (setq counter (1+ counter)))
   (set (make-local-variable 'tab-stop-list) (nreverse ls))))
(defun my-c-mode-common-hook ()
 (setq tab-width 5) ;; change this to taste, this is what K&R uses :)
 (my-build-tab-stop-list tab-width)
 (setq c-basic-offset tab-width)
 (setq indent-tabs-mode nil)) ;; force only spaces for indentation
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)


;; jde stuff ;; This .emacs file illustrates the minimul setup ;; required to run the JDE.

;; Set the debug option to enable a backtrace when a
;; problem occurs.
(setq debug-on-error t)

;; Update the Emacs load-path to include the path to
;; the JDE and its require packages. This code assumes
;; that you have installed the packages in the emacs/site
;; subdirectory of your home directory.
(add-to-list 'load-path (expand-file-name "/usr/share/emacs/site-lisp/jde/lisp"))
(add-to-list 'load-path (expand-file-name "/usr/share/emacs/site-lisp/cedet-common"))
(add-to-list 'load-path (expand-file-name "/usr/share/emacs/site-lisp/elib"))


;; Initialize CEDET.
(load-file (expand-file-name "/usr/share/emacs/site-lisp/cedet-common/cedet.el"))



;; If you want Emacs to defer loading the JDE until you open a ;; Java file, edit the following line (setq defer-loading-jde nil) ;; to read: ;; (setq defer-loading-jde t) ;;

(if defer-loading-jde
   (progn
     (autoload 'jde-mode "jde" "JDE mode." t)
     (setq auto-mode-alist
       (append
        '(("\\.java\\'" . jde-mode))
        auto-mode-alist)))
 (require 'jde))


;; Sets the basic indentation for Java source files ;; to five spaces. (defun my-jde-mode-hook () (setq c-basic-offset 5))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)

;; Include the following only if you want to run
;; bash as your shell.

;; Setup Emacs to run bash as its primary shell.
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(custom-set-variables
 ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
 ;; Your init file should contain only one such instance.
'(jde-jdk-registry (quote (("1.5.0" . "/opt/java/jdk1.5.0_01")))))
(custom-set-faces
 ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
 ;; Your init file should contain only one such instance.
)


Thanks for any help.

Felix

Reply via email to