javascript - Eclipse 在复制/粘贴 JavaScript 文件时挂起

标签 javascript eclipse copy-paste jsdt

我一直在使用 Java/CFEclipse IDE 运行 Eclipse Helios 3.6,并在尝试编辑 Javascript 文件时发现了一些非常奇怪且令人恼火的错误。在 .js 文件达到一定大小(约 250 行代码)后,每当我尝试选择、复制粘贴选择或保存时,Eclipse 都会随机挂起。挂起后单击将导致“文件编辑源...帮助”栏变白,再次单击将导致程序标题中显示窗口“(未响应)”消息。再等 5-10 秒后,挂起就会消失。我尝试编辑的所有 JavaScript 文件都是这种情况,尽管较短的文件不会挂起太久,也不会显示“(未响应)”消息。

我认为这是 Javascript 验证/自动完成选项的问题,因此已将其关闭;但是,复制粘贴挂起问题仍然存在。我也尝试过 Javascript IDE - 同样的问题。这是 Eclipse Javascript 处理的问题吗?还有其他人遇到过这样的错误吗?如果这是一个根本性的 Eclipse 问题,有人能建议更好的 Javascript/Coldfusion 编辑器吗?

编辑:有关更多信息,请记录最新挂起的输出:

!ENTRY org.eclipse.wst.jsdt.ui 4 2 2010-08-18 11:25:54.699
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.wst.jsdt.ui".
!STACK 0
java.lang.NullPointerException
    at org.eclipse.wst.jsdt.internal.compiler.lookup.ArrayBinding.getExactMethod(ArrayBinding.java:233)
    at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:401)
    at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getMethod(Scope.java:1813)
    at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:307)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Expression.resolve(Expression.java:477)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:191)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:337)
    at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:139)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:291)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:362)
    at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:394)
    at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:859)
    at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:527)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:862)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
    at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
    at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:135)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.wst.jsdt.ui 4 0 2010-08-18 11:25:54.824
!MESSAGE Error in JSDT Core during AST creation
!STACK 0
java.lang.NullPointerException
    at org.eclipse.wst.jsdt.internal.compiler.lookup.ArrayBinding.getExactMethod(ArrayBinding.java:233)
    at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:401)
    at org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getMethod(Scope.java:1813)
    at org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:307)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Expression.resolve(Expression.java:477)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
    at org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
    at org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:191)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:337)
    at org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:139)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:291)
    at org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:362)
    at org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:394)
    at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:859)
    at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:527)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:862)
    at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
    at org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
    at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
    at org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:135)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

最佳答案

对我来说,解决方案是禁用此选项...

Preferences/JavaScript/Editor/Typing{When pasting}/Update imports

关于javascript - Eclipse 在复制/粘贴 JavaScript 文件时挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3515422/

相关文章:

javascript - 将Apollo-link-error中的Apollo React onError添加到链接const

Eclipse Indigo 在 HTML4 片段中​​生成 HTML5 警告

.net - 如何避免异常捕获 .NET 中的复制粘贴

visual-studio-2008 - 如何在Visual Studio 2008中自定义复制/粘贴行为?

eclipse - 保存eclipse透视布局和其他东西

excel - 将 Excel 图表复制到 Word 的 VBA 脚本在更高版本的 Word 中不起作用

javascript - 如何发送正确的模型

javascript - 如何删除存储在本地存储中的数据?

javascript - 使用 Javascript 提取具有类属性的超链接的 url

java - 查询数据存储时出现错误消息