Eclipse在JavaScript文件中复制/粘贴 [英] Eclipse is hanged on copy/paste in JavaScript files

查看:478
本文介绍了Eclipse在JavaScript文件中复制/粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Java / CFEclipse IDE运行Eclipse Helios 3.6,并在尝试编辑Javascript文件时发现一些非常奇怪和加重的错误。 .js文件达到一定的大小(〜250行代码)后,当我尝试选择,复制粘贴选择或保存时,Eclipse会随机挂起。单击挂起启动后,将导致文件编辑源...帮助栏被打开,再次单击将导致程序标题中显示的窗口(未响应)消息。然后,挂机再等待5-10秒钟后,对于所有我尝试编辑的JavaScript文件,情况就是这样,尽管较短的文件不会挂起,并且不会出现(不响应)消息。



<我认为这是Javascript验证/自动完成选项的一个问题,因此已经关闭了;但是,复制粘贴挂起问题仍然存在。我也试过Javascript IDE - 同样的问题。这是Eclipse Javascript处理的一个问题吗?有没有人得到这样的错误?如果这是一个根本的Eclipse问题,任何人都可以建议一个更好的Javascript / Coldfusion编辑器?



编辑:有关更多信息,从最新的挂起的日志输出: / p>

 !ENTRY org.eclipse.wst.jsdt.ui 4 2 2010-08-18 11:25:54.699 
!MESSAGE从插件调用代码时出现问题:org.eclipse.wst.jsdt.ui。
!STACK 0
java.lang.NullPointerException
在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)
在org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getMethod(Scope.java :1813)
在org.eclipse.wst.jsdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:307)
在org.eclipse.wst.jsdt.internal.compiler.ast .Expression.resolve(Expression.java:477)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
在org.eclipse.wst .jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
在org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement.java:280)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve( Block.java:89)
在org.eclipse.wst.jsdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:191)
在org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration。 java:337)
在org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:139)
在org.eclipse.wst.jsdt.internal.compiler。 ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:291)
在org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:362)
在org.eclipse。 wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:394)
在org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:859)
在org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:527)
在org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAS T(ASTParser.java:862)
在org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
在org.eclipse.wst.jsdt.internal。 ui.javaeditor.ASTProvider $ 1.run(ASTProvider.java:581)
在org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
在org.eclipse.wst.jsdt .internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
在org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
在org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager $ PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
在org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager $ 3.run (SelectionListenerWithASTManager.java:135)
在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
!消息在AST创建期间JSDT核心中的错误
!STACK 0
java.lang.N ullPointerException
在org.eclipse.wst.jsdt.internal.compiler.lookup.ArrayBinding.getExactMethod(ArrayBinding.java:233)
在org.eclipse.wst.jsdt.internal.compiler.lookup.Scope .findExactMethod(Scope.java:401)
在org.eclipse.wst.jsdt.internal.compiler.lookup.Scope.getMethod(Scope.java:1813)
在org.eclipse.wst.jsdt .internal.compiler.ast.MessageSend.resolveType(MessageSend.java:307)
在org.eclipse.wst.jsdt.internal.compiler.ast.Expression.resolve(Expression.java:477)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)中的
在org.eclipse.wst.jsdt.internal.compiler.ast.ForStatement.resolve(ForStatement。 java:280)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
在org.eclipse.wst.jsdt.internal.compiler。 ast.ForStatement.resolve(ForStatement.java:280)
在org.eclipse.wst.jsdt.internal.compiler.ast.Block.resolve(Block.java:89)
在org.eclipse。 wst.jsdt.inter nal.compiler.ast.IfStatement.resolve(IfStatement.java:191)
在org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:337)
at (org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve :291)
在org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:362)
在org.eclipse.wst.jsdt.internal.compiler.ast .CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:394)
在org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:859)
在org.eclipse.wst.jsdt .core.dom.JavaScriptUnitResolver.resolve(JavaScriptUnitResolver.java:527)
在org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:862)
在org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
在org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider $ 1.run(ASTProvider.java :581)
在org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
在org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider .java:574)
在org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
在org.eclipse.wst.jsdt.internal.ui $。$ org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


解决方案

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



首选项/ JavaScript /编辑器/打字{过去ing} /更新导入


I've been running Eclipse Helios 3.6 using the Java/CFEclipse IDEs, and finding some very strange and aggravating errors when trying to edit Javascript files. After the .js file reaches a certain size (~250 lines of code), Eclipse will randomly hang whenever I try to select, copy-paste selections, or save. Clicking after the hang starts will result in the "file edit source ... help" bar being whited out, and clicking again leads to the windows "(not responding)" message displayed in the program header. The hang then goes away after another 5-10 seconds of waiting. This is the case for all JavaScript files I try to edit, although shorter ones don't hang as long and don't bring up the "(not responding)" message.

I've thought it was a problem with the Javascript validation/autocomplete options, and have accordingly turned those off; however, the copy-paste hang problem still persists. I've also tried the Javascript IDE - same problem. Is this a problem with Eclipse Javascript handling, period? Has anyone else gotten errors like these? And if it's a fundamentally Eclipse problem, would anyone be able to suggest a better Javascript/Coldfusion editor?

EDIT: For more information, log output from the latest hang:

!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)

解决方案

For me the solution was disable this option...

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

这篇关于Eclipse在JavaScript文件中复制/粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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