senny / emacs-eclim

This project brings some of the great eclipse features to emacs developers. It is based on the eclim project, which provides eclipse features for vim.
http://www.emacswiki.org/emacs/EmacsEclim
587 stars 102 forks source link

problems highlighting not working #151

Open jbtwh opened 10 years ago

jbtwh commented 10 years ago

Windows 7 emacs 24.3 java 7 eclipse indigo + eclim 1.7.19 also tried eclipse luna + eclim 2.4.0 = same problem

Problems underlining not working. eclim-problems works fine. Judging by debugger function eclim--problems-insert-highlight is never called

eclimemacs

lins05 commented 9 years ago

Confirmed here with eclipse luna (4.4.1) and eclim 2.4.0 on OSX. I'll look into this soon.

jbtwh commented 9 years ago

Possible reason:

(defun eclim-problems-highlight ()
  (interactive)
  (save-restriction
    (widen)
    (when (eclim--file-managed-p)
      (eclim--problems-clear-highlights)
      (loop for problem across (remove-if-not (lambda (p) (string= (assoc-default 'filename p) (file-truename (buffer-file-name)))) eclim--problems-list)
            do (eclim--problems-insert-highlight problem)))))

(assoc-default 'filename p) and (file-truename (buffer-file-name)) return paths in different cases. Maybe this is os specific thing

jingtaozf commented 8 years ago

If file has a symbolic link then the buffer file name in emacs may be different with the one eclipse returns. all file related operation should be carefully reviewed to avoid such issue completely.