| Summary: | NullPointerException when "Requesting JavaScript AST from selection" | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Marshall Scorcio <marshall.scorcio> |
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 342461 *** |
I recently upgraded to Eclipse 3.7.1, JSDT 1.3.1.v201108102009, and Eclipse WDT 3.3.1.v201107072200. After the upgrade I've been getting "'Requesting JavaScript AST from selection' has encountered a problem" dialogs when editing JavaScript files. I am able to consistently reproduce a specific case where clicking on "return" in a function that returns a string literal will cause a NullPointerException. It seems to only happen the first time you click on "return" after opening the file. Steps to Reproduce: 1. In a JavaScript project, create a file named foo.js with the following contents: function foo() { return "bar"; } 2. Open up foo.js with the JavaScript editor. 3. Click on the keyword "return". Actual Result: A dialog appears with the title "Problem Occurred" is displayed that says: An internal error occurred during: "Requesting JavaScript AST from selection". java.lang.NullPointerException Expected Result: No error should occur.