javacomplete
javacomplete copied to clipboard
java completion daemon
Table of Contents
- 1. An autocompletion daemon for the Java programming language
- 2. Builds
- 3. Setup
- 3.1. Junixsocket native lib
- 3.2. Start the daemon
- 3.3. Emacs setup
An autocompletion daemon for the Java programming language
The completion daemon provides ide like functionality. Development is at a very early stage. The completion definitely can be improved and is likely not to work in some corner cases. Nevertheless I am already using the completion for development, so I think it's in a useable state.
The following features are currently implemented:
- code completion
- method/field/variable signature lookup
- adding import declarations
planed features are
- removing unused imports
- …
Builds
available on javacomplete.tillmanns.me
the builds may contain already closed issues, I recommend building the software from source using gradle.
Setup
The application currently holds dependencies on the following packages:
-
javaparser code.google.com/p/javaparser/ - eclipse AST Parser eclipse.org/jdt/core
- javassist javassist.ortg
- tinlylog www.tinylog.org/
- junixsocket code.google.com/p/junixsocket/
- jsonp jsonp.java.net/
I recently switched to the eclipse ASTParser, which allows to complete from intact code leafs inside the ast code tree. All the dependencies, including the eclipse parser will be downloaded automatically using the maven central repository.
Junixsocket native lib
You can download the library files here: junixsocket/downloads/list
Instructions on how to install can be found here: junixsocket/wiki/GettingStarted
You have to copy the .so files to the LIBRARYPATH, which is /opt/newsclub/lib-native by default. The easiest way to setup them is to use the default path.
Start the daemon
In order for the import feature to work with classes living in the standard library you have to set the JAVASRC environment variable pointing at the jdk source.
Dependencies may be referenced using the JAVACOMPLETPATH variable (using a colon seperated list).
example call:
JAVASRC=/usr/lib/jvm/java-7-openjdk/src.zip \
JAVACOMPLETEPATH=build/libs/javacomplete-all-0.1.0.jar \
java -jar build/libs/javacomplete-all-0.1.0.jar