Thursday, May 3, 2012

Subwords completion

Not so long ago I was fairly happy with JDT's content assist, and then I started using Subwords completion from Code Recommenders project and now it is fair to say that I cannot write code without it! :-)

The idea is simple enough - you should not have to type a name from the beginning to find a match in the content assist popup. It really helps when I do not know if I have to 'find' an element or 'get' an element.

The feature is sophisticated enough to understand a rough shorthand e.g. dclr for declaration.


It is also sophisticated enough to understand that a method or type name in Java is composed of several words e.g. 'ty + dclr' finds all 'type' + 'declarations'.

13 comments:

  1. Can we have it for open resource dialog?

    ReplyDelete
    Replies
    1. In open resource just use metachars, like */*name*.properties or something like that

      Delete
    2. We do not have any concrete plans for it, but it might be useful to not have to type these metachars.

      Delete
  2. Can we have this in NetBeans? x)

    ReplyDelete
    Replies
    1. You should ask the NetBeans team ;-)

      Delete
    2. It is already reported - http://netbeans.org/bugzilla/show_bug.cgi?id=212412

      Delete
  3. Is there a vim plugin?

    ReplyDelete
    Replies
    1. I've heard it's already in emacs for years (fuzzy completion).

      Delete
    2. Yeah, I just read about the emacs one on reddit. It is probably this one - http://emacswiki.org/emacs/Icicles_-_Fuzzy_Completion

      Delete
  4. Will it work in PDT?

    ReplyDelete
    Replies
    1. Nope, Code Recommenders is an extension to JDT, so it will work only for Java. Though you may open an enhancement request for PDT.

      Delete
    2. Requests for PDT go in bugzilla - https://bugs.eclipse.org/bugs/enter_bug.cgi?product=PDT

      Delete