There are two ways of having the code completion in Eclipse.
This method involves adding the jQuery library to the project. You can do the same for every library you want (e.g. motools).
You'll soon discover that's not so good because it doesn't work with $. or $().