Re
On Tue, Dec 11, 2012 at 4:27 AM, Eric M. Ludlam <eric@...> wrote:
>> 2. Flymake or anyway something that builds and highlights errors
>
> CEDET does not have anything special to do with flymake, or this sort of
> feature.
I think, that potentially Flymake could be extended to use information
from EDE projects, but we need to think on how it can be implemented
>> 3. Context sensitive completion
>
> Getting this to work depends on good integration with the javap custom
> back-end that will extract symbols from your jar files, or elsewhere.
Right now, name completion works relatively well, but it need to have
information from jar files. For some project types, it's possible to
extract this information automatically, but for some, like java-root &
ant, it's not always possible
>> 4. Indentation and syntax highlighting for modern day Java (generics,
>> foreach, etc)
>
> CEDET will use the java mode, but isn't really involved in making it better.
>
>> Focusing on 1: I read the following article:
>> <http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html>, which seems to
>> provide for what I need. I pulled a fresh copy of CEDET bzr, and copied the
>> example config in that article. I then created a new Java project using
>> `ede-java-root-project':
>>
>> (ede-java-root-project
>> "SRTool"
>> :name "SRTool"
>> :file "~/path/to/build.xml"
>> :srcroot '("src")
>> :localclasspath '("./bin"
>> "./antlr-3.4-complete.jar"
>> "./junit-4.10.jar"
>> "./jcommander.jar")
>> :classpath '("~/path/to/bin"
>> "~/path/to/antlr-3.4-complete.jar"
>> "~/path/to/junit-4.10.jar"
>> "~/path/to/jcommander.jar"))
>
> This is a good start. Alex (who someone else suggested reply to this
> thread) has some other extensions that might also help.
It's btter to switch to Ant project type (ede-ant-project), that was
added last week. Implementation has a number of heuristics, for
example, it will setup srcroot automatically for you config. Besides
this, I see, that you're using both localclasspath & classpath - this
is not necessary in your case, it's enough to use only one of them. To
generate list of jar files you can use the
'cedet-files-list-recursively' function from 'cedet-files' package,
like this
:classpath (cons "~/path/to/bin" (cedet-files-list-recursively
"~/path/to" ".*.jar"))
Ant projects could be also detected automatically, but in this case it
won't setup classpath automatically - current heuristics are working
only if libraries are in lib directory
> [...] “Find file in
>> project” works but only if I include every single subdirectory of `src'
>> explicitly. How should I proceed?
>
> the two 'root' project types aren't good at finding files because they
> don't have a built in cache. Integrating GNU Global or idutils in with
> EDE however will fix that. In the cedet.info manual about GNU Global
> (which I had the best luck with) explains both this setup, and the
> database setup for finding definitions.
>
>> Once problem 1 is done, how do I go onto investigating 2 and 3? Is it possible
>> to simply have CEDET to use `ant' targets to build code? Where can I find more
>> information on context sensitive information?
Ant project can compile current project using standard 'C-c . c' &
'C-c . C' commands for compilation of target & projects - you can set
"current target" using the :current-target slot of project, it will be
used when Ant is invoked. I'm still thinking on how implement
compilation of arbitrary Ant target (I understand how to extract all
available targets), but need to think how to switch between them.
--
With best wishes, Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott
|