I've been having problem with generating Java docs with JDE 2.2.8 under
XEmacs 21.5-b3 configured for `i686-pc-cygwin' on a Windows 2000 SP2
machine.

I've located three issues with the jde-javadoc-gen.el ($Revision: 1.6 $).

1/ Error message appears in the mini-buffer if a Javadoc directory does not
exist.
2/ When the javadoc command line is run, it uses the lisp variable
buffer-file-name to get the source file, unfortunately this is in a cygwin
path format, and needs to be converted into a DOS path to work with the
javadoc command line.
3/ Finally when the javadoc command has completed successfully, a browser
(IE or Netscape) should open showing the generated html docs. Unfortunately
a cygwin path is used (via jde-javadoc-gen-destination-directory) which is
NOT understood by the native window browser apps.

I've modified the jde-javadoc-gen.el (my patch can be found below) which
resolves the issues under my version of Cygwin Xemacs. A summary of what
I've done follows:

1/ Used file-readable-p to determine the existence of a Javadoc directory
instead of using directory-files.
2/ Used jde-normalize-path to convert cygwin path to DOS path.
3/ Used jde-normalize-path to convert cygwin path to DOS path.


PLEASE NOTE: I am not an experienced lisp user, and have no idea how
compatible these changes are with other Emacs variants/platforms. I'm sure
however someone can take on board the issues and provide the appropriate fix
to jde-javadoc-gen.el

Thanks,
Riz.


*** /c/usr/reazul/tmp/jde-javadoc-gen.el        Tue Oct  9 12:38:07 2001
--- /c/usr/reazul/tmp/jde-javadoc-gen.el8bAQPh  Tue Oct  9 12:38:07 2001
***************
*** 247,253 ****
    (save-some-buffers)
  
    
!   (if (not (directory-files jde-javadoc-gen-destination-directory nil nil
nil)) 
        (make-directory jde-javadoc-gen-destination-directory))
  
    (let ((arguments 
--- 247,253 ----
    (save-some-buffers)
  
    
!   (if (not (file-readable-p jde-javadoc-gen-destination-directory))
        (make-directory jde-javadoc-gen-destination-directory))
  
    (let ((arguments 
***************
*** 489,495 ****
                (lambda (packagename) (format "%s" packagename))
                jde-javadoc-gen-packages " ")))
        (setq arguments
!           (concat arguments " \"" (buffer-file-name) "\"")))
      
      (setq compilation-finish-function
          (lambda (buf msg)
--- 489,495 ----
                (lambda (packagename) (format "%s" packagename))
                jde-javadoc-gen-packages " ")))
        (setq arguments
!           (concat arguments " \"" (jde-normalize-path 'buffer-file-name)
"\"")))
      
      (setq compilation-finish-function
          (lambda (buf msg)
***************
*** 498,504 ****
                 jde-javadoc-display-doc
                 (string-match "finished" msg))
                (browse-url-of-file 
!                (expand-file-name "index.html"
jde-javadoc-gen-destination-directory)))))
  
      (compile-internal arguments "No errors now!")))
  
--- 498,504 ----
                 jde-javadoc-display-doc
                 (string-match "finished" msg))
                (browse-url-of-file 
!                (jde-normalize-path (expand-file-name "index.html"
jde-javadoc-gen-destination-directory))))))
  
      (compile-internal arguments "No errors now!")))
  

Reply via email to