At 12:58 AM 3/15/2005, Paul Kinnucan wrote:

Ole Arndt writes:
 > Hi Lars,
 >


But I'm curious as to what kind of a project structure would make regular expressions in source paths useful.

The structure that I have at work is one such. We have multiple subprojects side by side:


source
  project1
    prj.el
    com/foo/project1
      *.java
  project2
    prj.el
    com/foo/project2
      *.java
  ...
  project17
     prj.el
     com/foo/project17
       *.java
products
  <similar tree with class files>

Some projects depend on others, but the dependency graph is non-cyclic, so we build and test project 1, then project 2 and so on. Each prj.el sets jde-sourcepath to "." and jde-global-classpath to include ../products/<projectName>/<directoriesWithClasses>. Which works, except when I try to jump to a source file in a different subproject. What I'd like to do is set jde-sourcepath to ("." "../*") but instead, I have to manually do ("." "../project1" "../project2" ... "../projectN-1"). Which eventually gets built up in each prj.el. And we frequently add more projects, so even if the list is complete, that's only a temporary condition.

Whether this is a good coding practice is debatable, but it is what we do.

Finally, to handle a path specification like:

*/src/java

the JDEE would have to cycle through every directory on your system,
appending /src/java to it, testing whether such a directory exists,
and then searching that directory for the source file? Seems
like a pretty time-consuming operation that might make finding
and opening source files a very slow process.

I'd be happy with just something that expands * like a unix wildcard. So */src/java woudn't be the equivalent of a unix find command, but more like the equivalent of ls */src/java.


Troy

Paul


> > Just be sure to never save your project files with jde-save-project, > or you will lose your changes. > > I have written myself a small module for a related purpose: Read the > dependencies from a maven project.xml file and build the > jde-global-classpath from this information. My .prj.el files now typically > look like this: > > (setq pom (pom-read-pom)) > (jde-set-variables > '(jde-global-classpath (pom-get-classpath pom)) > '(jde-project-name (pom-get-project-id pom)) > '(jde-sourcepath (quote ("./src/java" "./src/test")))) > > I have, of course, also a prj.el file for all my default settings in > my top level source directory. > > Ole > -- > Ole Arndt http://www.sugarshark.com >

---------------------------------------- Troy Daniels [EMAIL PROTECTED] 781-273-3388 x218



Reply via email to