I use the eclipse javascript neon version.
When I type do
and press Ctrl + Space
there appears the suggestion for do while
but none for document
. If I used document
once it appears in future uses but I want that it suggests all the possible reasonable continuations.
In a JS Project -> JavaScript Resources are two libraries.
ECMAScript Built-In Library and ECMA 3 Browser Support Library.
In the second are all the methods I'm interested but they don't show up in the auto-completion before I use the explicitly.
Things that I read on stackoverflow that did not work:
Window → Preferences → JavaScript → Editor → Content Assist → Restore Defaults
. For some it resolved the problem but for me it did not work.Window → Preferences → JavaScript → Editor → Content Assist → Advanced → Other JavaScript Proposals
are already checked.Unfortunately autocompletion of javascript code does not work in Eclipse Neon for this moment. The reason is desribed in this bug's answer: Eclipse bug description. This problem can be solved by installing Tern plugin in Eclipse. Detailed instruction can be found here: Tern installation guide.
You can also downgrade eclipse to Mars version, where autocompletion works out of the box, however it supports only older versions of javascript.