I'm facing unique error/alert-popup while editing JavaScript files in Eclipse and it pops up this error every time I place the cursor on that line.
JS: NullPointerException when cursor is placed at the end of the line containing return statement.
foo.bar = function(x) {
if (xyz) {
return fn(x);«error»
}
return fn(x);«error»
return (fn(x));«error»
return new fn(x);«ok»
return x;«sometimes»
return "";«error»
return x+"x";«error»
return this.x;«error»
return fn(
x);«error»
return new fn(
x);«ok»
return;«error»
};
If cursor is at the end of the line of a return, this exception happens:
An internal error occurred during: "Requesting JavaScript AST from selection".
java.lang.NullPointerException
The Eclipse error is:
'Requesting JavaScript AST from Selection' has encountered a problem.
An internal error occured during "Requesting JavaScript AST from selection".
java.lang.NullPointerException
Is there a solution or workaround available to fix the problem?
Simplest solution:
Turn off Toggle Mark Occurrences (Alt-Shift-O or the paintbrush icon on the toolbar, which handily, will show you your current state).
Official solution:
You can track the official bug here.
There is a patch posted here which you might try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With