编辑Javascript时,Eclipse错误不断弹出 [英] Eclipse error constantly pops up while editing Javascript

查看:104
本文介绍了编辑Javascript时,Eclipse错误不断弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Eclipse中使用相对较小的(100-300行)Javascript文件,并且定期地对某些代码感到不安,并且每次将光标放在该行上时会弹出此错误。错误是:

 从选择中请求AST AST遇到问题。 
在从选择中请求JavaScript AST期间发生内部错误。
java.lang.NullPointerException

当我转换这个:

  if(p){
//输入代码
} else {return false;

到这个:

  if(p){
// enter code here
} return false;

错误弹出几次。每次停止我的打字,要求我点击好的按钮。然后再输入两个字符,并再次出现错误。



任何想法如何防止错误或禁用Javascript AST?



这是在Eclipse Java EE,Indigo Service Release 2上。它几乎是一个平面安装,只安装了两个插件,也不是SVN,与Javascript无关

解决方案

一个更好的答案(从Cliff Ribaudo链接的错误报告,评论10等):



关闭切换标记发生(Alt-Shift-O或工具栏上的画笔图标,这将轻松显示您当前的状态)。



感谢Cliff!



已编辑:




I am working on relatively small (100-300 lines) Javascript files in Eclipse and periodically it gets really upset about some piece of code and pops up this error every time I place the cursor on that line. The error is:

'Requesting JavaScript AST from Selection' has encountered a problem. 
An internal error occured during "Requesting JavaScript AST from selection". 
java.lang.NullPointerException

While I am converting this:

if(p){
    // enter code here
} else { return false; }

into this:

if(p){
    // enter code here
} return false; 

the error pops up several times. Each time it stops my typing and requires me to click the okay button. I then type two more characters and the error appears again.

Any ideas how to either prevent the error or disable whatever Javascript AST is?

This is on Eclipse Java EE, Indigo Service Release 2. It is almost a flat install, only two plugins installed and neither are for SVN and have nothing to do with Javascript.

解决方案

An even better answer (from the bug report linked by Cliff Ribaudo, comment #10 and others):

Turn off Toggle Mark Occurrences (Alt-Shift-O or the paintbrush icon on the toolbar, which handily, will show you your current state).

Thanks Cliff!

Edited:

这篇关于编辑Javascript时,Eclipse错误不断弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆