I'm using Win 10 (64bit) and I've tried this with Eclipse Photon and version 2018-09 (64 bit version both times) but I'm getting the same result with both:
I created a new project (File > New > Project...: JavaScript > JavaScript Project) and a JavaScript script (File > New > JavaScript Source File). If I type
function test() {
var inputField = doc
}
then press Ctrl+Space, it should give me a list of suggestions but instead the list only says "No Default Proposals".
If I press Ctrl+Space again after writing document.
the list only says "MISSING".
Writing code inside the <script></script>
part of an HTML file results in the same empty window.
Suggestions for HTML and CSS often work but sometimes the window doesn't even open in the first place and if I write e.g. <sty
, there's no suggestion for <style>
.
I can train Eclipse in a way if I write e.g.:
var inputField = document.getElementById("inputField");
inputField.style = "red";
Pressing Ctrl+Space after writing inputField
again suggests "style". This only works within the same file, if I get the same input field in a different script, there's no suggestion for "style".
I haven't changed anything about the settings (Window > Prerferences):
- JavaScript > Editor > Content Assist: "Enable auto activation" isn't checked (I don't want it to do that) and enabling it doesn't change anything
- JavaScript - Editor - Content Assist - Advanced: click (I tried checking everything except "Word Proposals" but no change)
- Web > HTML Files > Editor > Content Assist: Everything is checked
- Web > CSS Files > Editor > Content Assist: Everything is checked
I'm using Mars.2 for a Java project and everything works fine there, so not sure if it's the version (I don't want to use a version that old for the new JS project) or if Eclipse simply can't handle JS properly.
Any ideas/suggestions what I could try to fix this (without installing extra plugins)?
Edit: I just tried 2 more versions: It works with Mars.2 (PHP) but not with Neon. I'd still prefer fixing Photon or 2018-09 though instead of using a version that was released almost 3 years ago.