Community
Participate
Working Groups
I get a NPE when trying to autocmplete javascript in a html document. I noticed later that the project where this happened was a java project not a dynamic web project. So I created a new web project and it all worked fine. But to my knowldge I should be able to write web files(js, html, etc..) inside java projects. Attached is a small sample project where I get the NPE as well as the stack trace from .metadata/.log Thanks in advance.
Created attachment 139647 [details] project with npe on autocomplete
Thanks for opening the bug Moataz. I will look into this soon.
Hi Moataz, I'm having a hard time reproducing this problem. Can you provide me step-by-step instructions on how you created your project and html file and what you did to invoke content assist? In the attachment you provided I don't see the JavaScript nature or any of the JSDT library files included, so its not clear to me how the JSDT code was even invoked. Thanks, Chris
Hello Chris I created a java project, then a folder inside the project, then a html file in the folder. Then I added <script type="text/javascript"></script> into the <body> then I tried docu then autocomplete, then bang null pointer exception. Does it actually matter that I'm on linux not on windows?. I recall while using windows last year I had no similar problem while autocompleting in html files inside projects of java nature. about invoking JSDT, isn't it not so, that jsdt is invoked when I write javascript code inside html files? In the attched project zip, you can find the stack trace I pulled out from eclipse .log. Best regards Moataz
Categorizing JSDT bugzillas for planning purposes.
Fixed the NPE, however, content assist will still not work in a Java Project unless you enable JavaScript support. 1. Right-click on the project 2. Configure > Add JavaScript Support Code checked into the 3.2 stream.
*** Bug 275432 has been marked as a duplicate of this bug. ***