At 02:00 AM 1/18/00 -0700, Lance Johnston wrote:
>Is it only possible to set JDE variables via custom-set-variables in the
>.emacs file? I have tried to do the following, which works...
>

As part of its project context-switching logic, the JDE resets the
JDE variables, using the values which custom stores as properties on each
variable, when you load a source buffer. That's why this works

>(custom-set-variables
>  '(jde-compile-option-command-line-args "-g")
>  '(jde-db-debugger (quote ("jdebug" . "Class")))
>  '(jde-bug-jpda-directory "d:/java/jpda"))
>
>... as well as the following, which doesn't...
>

and this doesn't.

>(setq-default jde-compile-option-command-line-args "-g")
>(setq-default jde-db-debugger (quote ("jdebug" . "Class")))
>(setq-default jde-bug-jpda-directory "d:/java/jpda")
>


>Shouldn't both methods work? I've also tried putting the setq's inside

Probably, but I could not think of a way to do this and support automatic
project context-switching. Further, from a tech support point of view it's
preferable to force JDE users to use customize. In the early days, before I
converted the JDE to use defcustom to define all configuration variables, I
was continually bombarded with problem reports that turned out to be the
result of a user not setting a configuration variable correctly, for
example, specifying a value as a string when what was required was a LIST
of strings. Experienced users especially would set variables based on their
assumption of what the value type should be rather than consult the doc to
find out what was actually required. This, of course, was made quite easy
by the fact that lisp variables are untyped.  Custom  ensures that at least
the type of variables is correct if not the actual values. Anyway, after I
converted all JDE variables to use custom, the incidence of this kind of
problem has decreased radically. I have no desire to return to the bad old
days when people were free to set variables to whatever value type made
sense to them, without consulting the doc for the variable.

>my jde mode hook. The interesting thing about that is that the variables
>seem to be getting set whenever I load a .java file, but JDEBug 

Yes, of course. This is what allows you to have multiple projects, each
with its own project file, open in a single session. The default "project
file" is your .emacs file.

doesn't
>work. Any help would be great.

This is a separate issue. I can assure you that JDEbug works on all
supported platforms that meet JPDA requirements and where Emacs/JDE is
correctly configured. I suggest that you read the ReleaseNotes.txt file
(currently the only source for setup info) from back to front and follow
the setup instructions contained therein exactly (using customize). If you
are still having problems, use JDE->Help->Submit Bug Report to generate a
complete description of your environment and send it to me with a specific
description of what the problem is. (Content-free assertions like "JDEbug
doesn't work" are not helpful.)

- Paul 

Reply via email to