Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#18 jde-create-prj-values-str multiple prj.el, relative globalcl

open
nobody
5
2010-04-14
2010-04-14
Anonymous
No

It appears that jde-create-prj-values-str does not work correctly if you have multiple project files and jde-global-classpath is defined in any but the deepest one.

Consider the following directory structure

project
--prj.el defines jde-global-classpath as ./build/lib
--comp1
----prj.el
----pkg1
------Something.java
--comp2
----prj.el
----pkg2
------Other.java
--build
----lib
----classes

jde-create-prj-values-str passes the return value of jde-get-global-classpath to jde-build-path-arg, but doesn't pass a symbol. As a result, jde-normalize-path uses the first prj.el that it finds to convert the ".". As a result, the class path becomes /project/comp1/build/lib rather than /project/build/lib. Consequently, the beanshell fails to find any classes that are defined on jde-global-classpath.

The change below in jde-create-prj-values-str fixes the problem for me. I'm not certain what it does if jde-global-classpath isn't defined. I believe that it's at line 2313 of jde.el in the released 2.4.0.1 files.

< (jde-build-path-arg nil (jde-get-global-classpath) t 'jde-
global-classpath)))
---
> (jde-build-path-arg nil (jde-get-global-classpath) t)))

With context:

environment variable."
(let* ((directory-sep-char ?/) ;; Override NT/XEmacs setting
(classpath
! (jde-build-path-arg nil (jde-get-global-classpath) t 'jde-
global-classpath)))
(format "jde.util.JdeUtilities.setProjectValues(\"%s\", %s);"
jde-current-project
classpath)))
--- 2334,2340 ----
environment variable."
(let* ((directory-sep-char ?/) ;; Override NT/XEmacs setting
(classpath
! (jde-build-path-arg nil (jde-get-global-classpath) t)))
(format "jde.util.JdeUtilities.setProjectValues(\"%s\", %s);"
jde-current-project
classpath)))

Discussion