Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocomplete not working with Eclipse Oxygen Javascript project

I'm using Eclipse Oxygen (4.7) with the Eclipse Web Tools Platform installed on Ubuntu 16.04.3. Auto-completion of variables and functions only works provided that the variable or function is local to the file that I'm currently working on. Auto-completion attempts using Ctrl-Space for variables and functions that are located outside the current file result in the dialog with No Default Proposals. Also, auto-completion for var/funcs within the current file are case sensitive, otherwise no proposals are displayed (a problem that I didn't have with previous versions of eclipse).

My project is a JS project and I am using the JS perspective. Under the Source files and folder in the global scope section of the Include Path of my project, the source tab shows Included: (All). Is there something else I need to do?

As a side note, I can't correctly configure the syntax highlighting for Javascript source files successfully. Certain things work fine, but others (like local variables) refuse to use the color that I've selected. Are these all bugs?

NOTE: I'm using the Darkest Dark eclipse theme. I don't know if that has any impact on auto-completion (but seems likely it would for syntax high-lighting).

like image 482
RTF Avatar asked Sep 18 '17 14:09

RTF


1 Answers

I had the same problem in Eclipse Oxygen using Ubuntu 18.03, and I fixed it doing next:

Go to Window -> Preference -> Javascript -> Editor -> Content Assist -> Advanced and put the configuration like this one

Javascript Content Assist Advanced configuration

After that I was able to autocomplete Javascript code.

like image 181
Inazense Avatar answered Nov 09 '22 11:11

Inazense