JDE and Elisp gurus,

        Here is a suggestion.

I know that JDE looks for the project file (default prj.el) in the
directory
(or its parent recursively) of the file being visited in the current
Buffer.

If one makes a assumption that one stores a project file it the
directory at the
root of the package tree this -

JAVASTUFF
        prj.el
        com
                acme
                        coolstuff
                                A.java
                                B.java

how would one go about automatically prepending the JAVASTUFF directory
(or something like JAVASTUFF/classes for people who like to keep
java sources separate from classes) to the jde-global-classpath
variable and make it buffer local.


That way one needs to set the CLASSPATH to the fixed external libraries
only. The root directory of the package is automatically added to the
CLASSPATH depending on which java file one is working on.

Does this make sense ?

Here is my general idea in terms of lisp code -

  (let ((pro-file (jde-find-project-file default-directory)))
    (if pro-file
        (progn
          (setq output-dir (file-name-directory (expand-file-name pro-file)))
          (jde-set-variables 
           '(jde-global-classpath (cons output-dir jde-global-classpath))
           )
          )
      )
    )

What is the best place to hook this into JDE ?

Could it be jde-load-project-file (obviously protected by a custom
variable
along the lines of jde-prepend-package-root-to-global-classpath
(boolean)
and jde-prepend-package-root-to-global-classpath-relative-dir (string
e.g.
"/classes"))

-sandip
begin:vcard 
n:Chitale;Sandip
tel;work:4085709778
x-mozilla-html:FALSE
url:http://www.selectica.com
org:Selectica;Engineering
adr:;;2890 Zanker Rd., Ste 101;San Jose;CA;95134;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Sr. Software Engineer
fn:Sandip Chitale
end:vcard

Reply via email to