>>>>> "Gerd" == Gerd Boerrigter <[EMAIL PROTECTED]> writes:
Gerd> I have some improvement suggestions.
Gerd> Would it be possible to extend `jde-help-symbol' in a way,
Gerd> that if any additional argument is passed to the function, the
Gerd> user is asked for a sysmbol? Additionally, if no symbol is
Gerd> found at the current point the user could be asked, too.
This is the behaviour that I like also. Ive included
a function below which provides this behaviour. Not that as it
overwrites the standard jde function its a) not very future proof, b)
a hack, and c) should be loaded AFTER JDE or it will get over written
in its turn.
Paul- perhaps there should be a new customisable group
called "jde-gui-options" with a whole load of these customisations
options like this. My other one would be automatically killing a class
which is already running if jde-run is called...
Gerd> Related to this function: if more classes with the same name
Gerd> are found in different packages, the user can selected the
Gerd> desired ones. It is even possible to select more then one.
Gerd> The interface used looks very nice with the checkboxes and the
Gerd> OK button, but it is kind of clumsy to navigate them with a
Gerd> keyboard. Would it possible to use the usual completion
Gerd> function used for example by find-file? That would make
Gerd> keyboard navigation a lot easier.
It does look nice doesn't it?
Navigation is a lot quicker if you [tab] between check
boxes. If you want to change the selection behaviour then you would
need to alter the jde-help-choose-document function. It wouldn't be
hard, but I don't have the code for this one Im afraid...
Phil
;;;Modifications to jde-help...asks me before it shows...
(defun jde-help-symbol ()
"Displays help for the symbol at point. The symbol may reference an object, a class,
or a method or field. If the symbol references a class, this function displays the
javadoc for the class. If the symbol references an object, this method
displays the javadoc for the class of the object. If the symbol references a field or
a method, this function displays the javadoc for the class of the object of which
the field or method is a member. Eventually this function will be enhanced to position
the javadoc at the point where the method or field is documented."
(interactive)
(condition-case err
(let* ((parse-result (jde-help-parse-symbol-at-point))
(unqualified-name
(read-from-minibuffer "Class: "
(if parse-result (car parse-result)
(thing-at-point 'symbol))))
(class-names
;;expand the names into full names, or a list of names
(bsh-eval-r
(concat "jde.util.JdeUtilities.getQualifiedName(\"" unqualified-name
"\");")))
(doc-files (mapcar 'jde-help-get-doc class-names)))
;;Check return value of QualifiedName
(if (eq nil class-names)
(error "Cannot find %s" unqualified-name))
;;Remove any annoying nils from the returned values
(setq doc-files (delq nil doc-files))
(if (eq nil doc-files)
(error "Cannot find documentation for %s" unqualified-name))
;;If the list is only one long
(if (eq 1 (length doc-files))
;;then show it
(jde-help-show-document (car doc-files))
;;else let the user choose
(jde-help-choose-document doc-files)))
(error
(message "%s" (error-message-string err)))))