Re: Proposed New Structure (starter for 10)

[email protected] (Phillip Lord) Tue, 18 Aug 2015 17:21:58 +0100
Newsgroups gmane.emacs.jdee.devel
Message-ID <[email protected]>
Stephen Leake <[email protected]> writes:

> [email protected] (Phillip Lord) writes:
>
>> In particular, I'd be worried if it involves duplicating information
>> between Emacs and what-ever build tool is being used (probably maven),
>> unless we know how to completely automate this.
>
> That's the point of the EDE project; it would get whatever info Emacs
> needs from maven (by reading files or calling an external tool; I don't
> know what maven provides in that way), and deliver it to Emacs via the
> EDE API.

Maven is a pain, I am afraid and trying to get it to provide anything
coherent is difficult. This is why I thinking of launching a JVM and
asking it about itself. This latter also works for any method of
launching a JVM, so avoids supporting lots of different build tools
beyond the launch of the JVM.

That's the theory. But maven in a pain when launching the JVM also, so
it might not be possible.



>>>> Auto-completion -- we should support completion-at-point-function, using
>>>> a connection to the JVM, and a Java (or JVM) based completion library.
>>>> Actual completion can be done by company, auto-complete or what ever.
>>>
>>> There is a trade-off here when editing code; if the code has syntax
>>> errors, you may get better results from Semantic than from the java
>>> compiler. So we should design for a choice of completion backends, to
>>> allow experimenting.
>>
>> Sorry, my fault, it is `completion-at-point-functions' i.e. plural. So
>> this comes off the shelf, I think. 
>
> Hmm. Let's say the first item in that hook relies on the Java compiler,
> and the second on Semantic.
>
> We edit a few files (and save them), then try to do completion. The
> compiler completion tool notices the changed files, tries to run the
> compiler and fails, and returns nil. Then the Semantic tool runs and
> succeeds.
>
> That works, but may give a significant delay. In that case, the user can
> rearrange completion-at-point-functions until the code does compile. We
> might want a better way to do that. The java compiler based completion
> tool could check a flag that the user sets that says "don't bother", for
> example. It should not be hard to come up with a good way to switch
> between them.

Sounds sensible. I don't know how c-a-p-f works yet. It's something to
be investigated.

Phil

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