Re: Proposed New Structure (starter for 10)

[email protected] (Phillip Lord) Thu, 27 Aug 2015 08:42:01 +0100
Newsgroups gmane.emacs.jdee.devel
Message-ID <[email protected]>
Troy Daniels <[email protected]> writes:

>> Yes, the beanshell dynamic class loader, which loads byte codes generated
>> by the ASM library.
>>
>>
> One use case that I frequently run into is this:
>
> Attempt to do a clean build.
> Encounter an error because a.b.C does not import a.d.E.
> Open C.java, do M-x jde-import-all
> E is not imported, because E is built after C, and the build stopped on the
> error building C, so src/a/d/E.java exists, but classes/a/d/E.class does
> not.
>
> I think we need some level of source-parsing to handle this.  Even if it
> can't find a.d.E.InnerClass, something to search the source-path for E.java
> would be good.


I would say, some level of source *manipulation* rather than parsing.
I've always been a little surprised at how effective for instance my own
"predictive" expansion mode (pabbrev.el) is at code completion. All it
does is look for words in any buffer with the same mode.

In the case that you describe, for example, there is a high chance that
E.java would be open in another Emacs buffer. And if not, building a
word list from current Java source files might well do. Or even all
files, so completion would work between XML and Java.

jde-import-all gets it knowledge from one place (introspection).
Probably it needs a fall-back mechanism, even if these introduce a
lowered level of precision.

Phil

------------------------------------------------------------------------------