>>> Bruce Stephens <bruce+cedet@...> seems to think that:
>Ignoring the probably not-yet-stable clojure reflection stuff, how do
>I configure stuff so java imports are found?
>I tried the obvious:
>(semantic-add-system-include "~/trunk/build/apps/java" 'java-mode)
>where that directory contains "com/foo/bar/Baz.java" and the like, but
>that doesn't seem to resolve imports.
>Ah, I guess because there's no neat mapping between the import names
>(which indicate classes and things) and filenames? So cedet would
>need to scan all the files?
>Hmm. I guess the major irritation is that the bright red background
>makes it difficult to read, but I can easily enough change that, I
[ ... ]
For "easy", the first step would be to write an override function to
convert the import tags into a file name. Here is an example for
(define-mode-local-override semantic-tag-include-filename emacs-lisp-mode
"Return the name of the tag with .el appended.
If there is a detail, prepend that directory."
(let ((name (semantic-tag-name tag))
(detail (semantic-tag-get-attribute tag :directory)))
(concat (expand-file-name name detail) ".el")))
For java, it would probably convert "." to "/" and append ".java", or
something like that.
Once that is done then the include path trick will probably work for
many includes, and the smart completion would probably start working
well for those found items.
That would probably go a long way, but would not work for imports
ending in "*". The include concept does not map well onto imports.
I'm hoping to tackle this soon, after I get the last of the install
and testing bugs out so I can releases 1.0.
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net