This is nice.  I don't believe there is a way to get a list of class
names through reflection (doing so might be considered a security
violation by the Java designers).  So either we get the list through
a recursive descent of the jde-sourcepaths or we do what you have
done.  

Personally, I just use TAGS.  JDE includes a tagsfile builder shell
script in the scripts directory.  The downside is it won't be as
accurate as doing a JDE-centric command, as you have done.

But I'm very happy other people are beginning to use the macros in
jde-class.el!

Suraj Acharya <[EMAIL PROTECTED]> writes:

> Here is my not so good way of getting class name completion for C-c C-v C-y.
>
>
>
>
> (defvar jde-all-built-classes '())
>   (with-all-class-files (name)
>                     (let* ((start-pos (string-match "/\\([a-zA-Z0-9]*\\)\\.class" 
> name))
>                            (end-pos (match-end 1)))
>                       (when (and start-pos end-pos)
>                         (setq  classes (cons (list (substring name (+ 1 start-pos) 
> end-pos)) jde-all-built-classes)))))
>
> (defun jde-open-class-source-new ()
>    (interactive)
>    (if jde-all-built-classes
>        (jde-open-class-source (completing-read "Class:" jde-all-built-classes))
>      (jde-open-class-source)))
>
>
> And then bind C-c C-v C-y to jde-open-class-source-new instead of  
> jde-open-class-source.
>
>
> The extra check for nullness of  jde-all-built-classes is because I don't run the 
> (with-all-class-files ... bit
> on start-up, but rather by hand, since it takes a bit of time to complete.
>
>
> I'm looking into integrating this with jde-xref so the class names get cached across 
> jde sessions.
>
> Does anyone have any ideas or suggestions for better ways of doing this?
>
>
> Suraj Acharya

Reply via email to