AutoJavaComplete

 This is Auto Java Complete.   
 Mail list: emacsjava at googlegroups.com  
 My email is <jixiuf at gmail.com>.

Install

First you should have installed AutoComplete and Yasnippet Then install this one for java completion.

Please Do not forget to read Install README.txt ChangeLog

Run the following to generate the tag file ~/.java_base.tag and restart your Emacs:

      javac Tags.java 
      java Tags 

Enjoy!

My Config Example

about yasnippet auto-complete and ajc-java-complete.el

Source

if Tags.java can not work on your PC. you can use my tag file: just bunzip and rename it to ~/.java_base.tag

You can find source code on github: auto-java-complete.

You can clone it using

      git clone git://github.com/emacs-java/auto-java-complete.git
      git checkout 0.2.8 (tag0.2.8,last version)

whitypig make a fork on https://github.com/whitypig/ajc-java-complete and this fork support multiple tag files

Video Demo

There is a 2.8M video demo in another repos . EditingJavaFile

And this is another demo(5.7M) about editing Jsp File EditingJspFile

Features

It can complete imports:

      import   java.
               java.lang
               java.util
               java.io

It can complete class names:

     public void test(){
        Str
  
        String
        StringBuffer
        StringBuilder

It can complete methods:

     System.
            out
            in
            err
            gc()  
            getProperty(String)

It cannot tell the different between static methods and normal methods, so all method will be listed.

It can do more:

    public void test(){
        Map<String,List<String>> map= new  HashMap<String,List<String>> ();
            map.
                clear()
                put(Object,Object)
                get(Object)

And this:

              System. getProperty(file. getName()).to
                                                   toString()
                                                   toUpperCase()
                                                   toCharArray()

It can auto import class in buffer. Here are two suggested keybindings(included in ajc-java-complete-config.el):

     (local-set-key (kbd "C-c i") (quote ajc-import-all-unimported-class))
     (local-set-key (kbd "C-c m") (quote ajc-import-class-under-point))

You even can edit a jsp file using AutoJavaComplete ,try it.(read ajc-java-complete.el )

Screenshots

auto-java-complete.jpg auto-java-complete-method-templete.jpg AutoJavaComplete-class

AutoJavaComplete-constructor

AutoJavaComplete-import

AutoJavaComplete-import2


CategoryCompletion CategoryJava Joseph