Re: Proposed New Structure (starter for 10)

Stephen Leake <[email protected]> Mon, 17 Aug 2015 17:36:55 -0500
Newsgroups gmane.emacs.jdee.devel
Message-ID <[email protected]>
[email protected] (Phillip Lord) writes:

> Stephen Leake <[email protected]> writes:
>
>> [email protected] (Phillip Lord) writes:
>>
>>> After this my vision is subtly different. I believe that JDEE should be
>>> relatively small and do as little as possible, while allowing Emacs and
>>> the environment to do most or all of the things that you speak off.
>>
>> +1. However, JDEE needs to provide some things to "the rest of Emacs" to
>> leverage that properly.
>>
>>> So, project support. Eric has already mentioned EDE. 
>>
>> JDEE needs to provide an EDE java project.
>
> I think this is sounds sensible, but I am not sure what it would bring.
> 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.

>>> 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.

-- 
-- Stephe

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