At 10:06 AM 6/15/99 +0100, you wrote:
>
>Dear Paul,
>
>thanks a lot for JDE ! I have to code in Windows at the moment and I'd
>be lost without it..
>
>One short question: When you have a subdirectory, i.e. a package, and
>you're editing one of the files in the subdirectory.. The speedbar
>correctly recognises the package and everything.. However, when you
>compile, JDE will cd into the subdir.. which obviously makes the
>compiler barf..
>
Hi Christian,
This complaint crops up occasionally and I confess I don't understand what
the issue is. The jde constructs the compile command as
javac [COMPILE_OPTIONS] BUFFER_NAME.java
Note that the cd command that appears in the compile buffer is just there
for appearances. The JDE does not actually change directories because
it doesn't need to do so. The working directory of the current buffer is
the directory containing the source file.
This approach is consistent with the fact that the current directory is
always the buffer directory. Moreover, AFAIK the approach works just fine
for most people. (It does for me, anyway). To do what you ask, would
require the JDE to construct the compile command as
cd PACKAGE_ROOT_DIRECTORY
javac [COMPILE_OPTIONS} QUALIFIED_BUFFERNAME.java
Note in this case the JDE has to figure out the root of the package
(probably from a user-set customization variable), has then actually to
change to the parent of the package directory, and has to construct the
qualified class name. I confess I don't see what benefit accrues from going
to all this extra effort.
If you can give me a compelling reason for compiling from the package
parent directory, I'd consider implementing it as a JDE option.
- Paul