Generics support added to Java Code Completion

Support for generics (added in Java 5) is something that was sorely lacking from the Java code completion in RSTALanguageSupport.  That is, until the latest Subversion changes!  This is a very early implementation, and like a lot of the recent Java support changes, there may be bugs and performance issues.  But it’s there!  And things look good for simple usage of the java.util Collecitons classes:

Generics Support

Generics Support

Previously, methods such as List#add() and List#get() would always say that their parameter/return types were of type Object.  Now, if you specify type arguments to classes that accept them, code completion will reflect those type arguments.

As before, please be bleeding edge, try this out, and report back bugs!  You can do so either here, or in the RSyntaxTextArea forums.  There is also currently no way to turn this feature off (i.e. if you want to program with “-source 1.4″ effectively enabled), but that will come soon.

3 Responses to “Generics support added to Java Code Completion”

  1. Bob Fisch says:

    Hi

    I’ve found a bug (maybe?) related to the “Javadoc/Multi-line comments now automatically closed”. Here the way to reproduce it:

    1) Open any Java file (or create a new one) that constains a least one JavaDoc comment.
    2) Position the cursor at the begining of the line where the JavaDoc comment starts.
    3) Press

    Having this:
    /**
    * Write a description of class “Test” here.
    */

    Results in this:
    *
    *//**
    * Write a description of class “Test” here.
    */

    => I’m working actually with revision 272 (in case this is important)

    greetings

    Bob

  2. admin says:

    Good catch Bob. Try it now (revision 280).

  3. Bob Fisch says:

    Hi

    After upgrading to the latest revision (291) it is better, but still the behavior of the editor pressing in front if a “/**” is strange.

    In fact, pressing having the cursor positioned right before a “/**” is expected to insert a new line _before_ the JavaDoc comment. Instead, it opens a new one.

    Thus no, having:
    /**
    * Write a description of class “Test” here.
    */

    …results in:
    /**
    *
    */
    * Write a description of class “Test” here.
    */

    greetings
    Bob