5/14/2013

Fix "Requesting JavaScript AST from selection" When Editing Javascript in Eclipse

Eclipse does not work well with js/css/jsp/jspf. I often encounter error such as “An internal error occurred during: Requesting JavaScript AST from selection. java.lang.OutOfMemoryError: Java heap space” when select/edit/search these types of files. It seems Eclipse has no idea how to validate these files, so I tried to disable all validators. But it does not solve the problem. All CPU resource is still occupied until I found out this way to exclude these files for validation.

1. Right click on your project, and click “Properties”.

2. Click “Include Path” and Press “Source” tab. Then edit the excluded file list.

3. Add the folders and files which you want Eclipse to skip to validate.

4. For example, I excluded all files in web app folder.

Hopefully, Out Of Memory error will not happen again.