Type-ahead (autocomplete) in Eclipse??


Last Updated:

  1. PerfectReign

    PerfectReign Well-Known Member This Topic's Starter

    Joined:
    Apr 12, 2010
    Messages:
    50
    Likes Received:
    0
    I've been wanting to get into Android development. Since all the demo tutorials use Eclipse, I downloaded it and gave it a try. I have version 1.2.2 (as far as I can tell) running on both Windows Vista and Ubuntu. (the help>about states Build id: 20100218-1602)

    I'd been using Netbeans for a few years and Visual Studio currently as well as since version 6 back in the '90s. I tried Eclipse back in '04/05, but it didn't have an IDE with a GUI designer, so I went with Netbeans.

    In typing the classes, I don't seem to get a type-ahead.

    For example, I type: import android.widget.

    I would expect to have my choices listed for me so I would know what is available.

    Googling, I can't seem to find how to make this work. Also, I'm posting here, because I can't seem to find any active Eclipse communities.
     

    Advertisement
  2. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    Does type ahead work for other stuff besides import? For importing I just do ctrl-shift-o

    (I have the same build as you)
     
  3. PerfectReign

    PerfectReign Well-Known Member This Topic's Starter

    Joined:
    Apr 12, 2010
    Messages:
    50
    Likes Received:
    0
    type-ahead (auto complete) apparently does not work at all in Eclipse by design.

    Bummer.

    I'll look into using NetBeans for developing my apps. Here's what type-ahead looks like in Netbeans:

    [​IMG]

    As you can see, I typed .get and the type-ahead gave me suggestions for all the methods with get in the list.​

    I feel like telling the Eclipse folks that the 1990's are calling and they want their editor back. :mad:

    I'll google more for how to integrate NetBeans with Android plugins...
     
  4. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    I'm pretty sure it works for me. If I type class. it will list all the methods for that class.
     
  5. PerfectReign

    PerfectReign Well-Known Member This Topic's Starter

    Joined:
    Apr 12, 2010
    Messages:
    50
    Likes Received:
    0
    Really??

    I figured as much.

    I'll check again.

    Here's what Android looks like in NetBeans...

    [​IMG]
     
  6. PerfectReign

    PerfectReign Well-Known Member This Topic's Starter

    Joined:
    Apr 12, 2010
    Messages:
    50
    Likes Received:
    0
    Huh!

    I just tried again in Eclipse. Based on your post, cp1, I tried it and type-ahead is working.

    Go figure!!


    [​IMG]
     
  7. cp1

    cp1 Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    375
    Likes Received:
    35
    For me, it seems that if you type it out straight: db.ex -- then it will pop up immediately.

    But if you type db, click somewhere, then come back and add .ex then it won't do it. You have to delete it and start over, typing db.ex all at once for it to work.
     
  8. gilangb89

    gilangb89 Member

    Joined:
    Jun 3, 2010
    Messages:
    11
    Likes Received:
    1
    you can use Ctrl+Space, it's general in most IDE's for type-aheads :)

    for example type this:
    "import andr" and press Ctrl+Space here
    "TextView tv = " and press Ctrl+Space here

    or in .xml file:
    "<TextView android:" and press Ctrl+Space here

    basically you can press it almost everywhere for type-aheads, that helps a lot :)
     
    cp1 likes this.

Share This Page

Loading...