It can:

I have the following to enable a side-wide Emacs-setup also for jdee:

First 2 help-funktions:

(defun customize-option-get-value (option type)
  "Return the value of a customizable option OPTION with TYPE, where
TYPE can either be 'standard-value \(the default-value of the
defcustom) or 'saved-value \(the value stored durable by the user via
  customize)." (let ((val (car (get option type))))
    (cond ((not (listp val)) val)
          ((equal 'quote (car val)) (car (cdr val)))
          (t (car val)))))

(defun customize-save-variable-save (option value &optional override)
  "Calls `customize-save-variable' with OPTION and VALUE if OPTION is a
custom-type and if OPTION has no saved-value until now.
If OVERRIDE is a function or lambda-form then it is called with two
arguments: 
- OLD-SAVED-VAL: The saved value of OPTION
- NEW-VALUE: see argument VALUE.
OVERRIDE is only called if OPTION has already a saved-value. If OVERIDE
returns not nil then `customize-save-variable' is called for OPTION
with VALUE even if OPTION has no saved-value until now."
  (and (get option 'custom-type)
       (or (not (get option 'saved-value))
           (and (functionp override)
                (funcall override
                         (customize-option-get-value option
                         'saved-value) value)))
       (progn
         (message "Overriding saved value for option %s with %s" option
         value) (customize-save-variable option value))))


Then you can customize jdee-veriables programatically like follows:

;; Here we set some options of JDE for the whole site:
;; We set default values for the following options but this default
valuies ;; will only be set if the user has *NOT* already customized
these options for ;; himself.
(customize-save-variable-save 'jde-mode-line-format
default-mode-line-format) (customize-save-variable-save
                              'jde-java-font-lock-api-file
"~/.jde-java-font-lock.api") (customize-save-variable-save
'jde-complete-insert-method-signature nil)
(customize-save-variable-save 'jde-auto-parse-buffer-interval 240)
(customize-save-variable-save 'jde-auto-parse-enable t)
(customize-save-variable-save 'jde-auto-parse-max-buffer-size 0)
(customize-save-variable-save 'jde-which-method-mode nil)
(customize-save-variable-save 'jde-imenu-enable nil)
(customize-save-variable-save 'jde-imenu-sort (quote asc)) ;; If a user
has set jde-check-version-flag to not nil then we override this ;; with
nil! (customize-save-variable-save 'jde-check-version-flag nil
                              (function (lambda (old-val new-val)
                                          ;; we return not nil (i.e.
                                          override ;; the old-value
                                          with nil when the ;; current
                                          set value is not nil. ;;
                                          Otherwise there is no need to
                                          ;; change the setting. We
                                          could also ;; simply return t
                                          but this is more ;; charming
;-) old-val))) 

Does this help?

But im not sure if and how this work together with the
project-management of JDEE?! But if not maybe it can be a good starting
point for developing an enhanced version... ;-) 

Klaus

Nascif Abousalh-Neto wrote:
> I think the question is, can it be done programatically?
> -----Original Message-----
> From: Berndl, Klaus [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 09, 2004 2:52 PM
> To: [EMAIL PROTECTED]
> Subject: FW: Customizing JDE
> 
> 
> M-x customize-option RET jde-make-program RET
> 
> This opens a customize-buffer where you can set an appropriate value
> for an option. 
> 
> Klaus
> 
> -----Original Message-----
> From: Nallathambi, Balaguru [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 09, 2004 8:01 PM
> To: Berndl, Klaus; '[EMAIL PROTECTED]'
> Subject: RE: Customizing JDE
> 
> 
> How do I customize via customize?
> What is AFAIK?
> -----Original Message-----
> From: Berndl, Klaus [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 09, 2004 4:58 AM
> To: Nallathambi, Balaguru; '[EMAIL PROTECTED]'
> Subject: RE: Customizing JDE
> 
> 
> AFAIK you can not customize JDEE-options via setq - JDEE accepts only
> customizations done via customize! 
> 
> Klaus
> 
> -----Original Message-----
> From: Nallathambi, Balaguru [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 08, 2004 8:44 PM
> To: '[EMAIL PROTECTED]'
> Subject: Customizing JDE
> 
> 
> We have our custom build environment, which generates shell wrapper
> scripts for java programs. 
> I managed to configure JDE to build using the custom build
> environment by setting the variable (setq jde-make-program
> "custommake") 
> I would like the JDE in emacs/xemacs to run the wrapper scripts by
> specifying (setq jde-run-executable "ls")
> But this does not seem to work.
> Is it possible to start the debugger to run a shell wrapper script
> which calls a "java helloworld.helloworld"? The wrapper script sets
> the classpath and other environment variables before launching java. 
> And set breakpoints inside helloworld to be debugged.
> Thanks in advance,
> Bala.

Reply via email to