In general i find the project switching mechanism and related setting of all
jde-options to the
values of the new project file or - if there is no project file - resetting the values
to the ones set in
.emacs or - if there are no new values set - to the JDE default values. Really tricky
and nice.
But there are situations, where this is very annoying. I´m writing an extension to JDE
which can
open always the java-file where the current thing at point is defined.
For the opening function of this new feature i have written a new jde-option:
(defcustom jde-open-class-at-point-find-file-function 'find-file-other-window
"Define the function for opening the class at point. See
`jde-open-class-at-point'`. Default is `find-file-other-window'. A function
defined here must have the same signature as `find-file' means the first
argument is the filename and the second optional argument is a
wildcard-pattern."
:group 'jde-project
:type '(function :tag "Function to open class at point"))
This is useful because maybe a user want to define the behavior how the java-file is
opened (
in another window or the same window for example).
But also some other Tools like JCB (java class browser) want to change the value
of this new option for the time they are active, because they need an own special
"xyc-find-file"
function used with the new openeing feature because the tool uses a special window
layout for
example.
Now comes the problem: How should such a tool set an own value for
'jde-open-class-at-point-find-file-function (see above) with setq if after each
buffer-switch to another
jde-buffer the default or customized value is reset????? IMHO 'custom-set-variables
from within
elisp-code should not be used to change temporaly the value of an option!
IMHO JDE should offer an mechanism to exclude certain options from the automatic reset
after each
buffer switch, maybe with an new option 'jde-no-project-related-options where we can
define all jde-options
which should be excluded.
IMHO such options like the one i have defined new (see above) are never project
related, regardless of the project
a user will always use the same value!!!!
Setting 'jde-project-context-switching-enabled-p to nil is IMHO not an alternative
because this disables the whole
mechanism for every jde-option, and like said at beginning, in genral this feature is
nice, but not always and not
for EVERY option!
What do you mean?
Klaus
--
Klaus Berndl mailto: [EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220