admin管理员组文章数量:1335406
I have been using Eclipse for some weeks now and I start getting used to it.
However, one thing really annoys me:
When editing JavaScript (I didn't try any other language yet), the editor window keeps jumping to the start of the document I am editing.
This mostly happens when the code currently contains syntax errors and mostly while / after deleting lines.
Especially constructs like { =
and sometimes unterminated strings / ments seem to cause this problem.
When it happens, only the view scrolls to the top of the document - the cursor stays where it was before the "jump" occurred.
Anyone having an idea on how to fix this?
I have been using Eclipse for some weeks now and I start getting used to it.
However, one thing really annoys me:
When editing JavaScript (I didn't try any other language yet), the editor window keeps jumping to the start of the document I am editing.
This mostly happens when the code currently contains syntax errors and mostly while / after deleting lines.
Especially constructs like { =
and sometimes unterminated strings / ments seem to cause this problem.
When it happens, only the view scrolls to the top of the document - the cursor stays where it was before the "jump" occurred.
Anyone having an idea on how to fix this?
Share Improve this question asked Jun 28, 2011 at 7:33 MatthiasMatthias 12.3k4 gold badges53 silver badges96 bronze badges 3- 1 Why the vote to close as Off-Topic? According to stackoverflow./faq stackoverflow is for questions related to "software tools monly used by programmers", too. – Matthias Commented Jun 28, 2011 at 7:46
- Amazingly this bug still exists in 2016. Did you ever find a solution? – Boundless Commented Nov 30, 2016 at 14:37
- @Boundless: "Solution" for me was to switch to another editor (Notepad++, VS Code, Visual Studio). Haven't really been using Eclipse to edit JavaScript for a while. – Matthias Commented Nov 30, 2016 at 14:39
5 Answers
Reset to default 1I believe the problem described above is related to this bug: https://bugs.eclipse/bugs/show_bug.cgi?id=318095
The work around is to disable the "Link with Editor" option from the Project Explorer. Which is to say make sure the icon with two arrows facing in opposite directions at the top of the file tree is not enabled. Disabling this option resolved the issue for me.
Hii i got solution goto
Window
->Preferences
->searchautosave
and disble it and hit apply and close button. this worked for me !
Looks like a problem with the implementation of the JavaScript editor. Most probably the jump occurs when the JavaScript-Parser is not able to parse your document and throws an exception. You might consider to report a bug to the eclipse project (maybe there is already such a report?).
As a workaround you might consider to adapt your way of typing the code a bit. Try to write the code in a way that does not confuse the parser (for example it might help to immediately close a newly created ment and THEN write the content instead of open the ment, write the content and finally close the mend). Same for strings, blocks ...
I am having the same problem. I had this line of code in my file and I could consistently reproduce the issue:
$.preload(preloadImages
, {
base:assetsUrl+'b/images/',
ext:'.png'
});
I changed it to the following and I no longer have the problem.
$.preload(preloadImages, {
base:assetsUrl+'b/images/',
ext:'.png'
});
I get this Phenomenon, when i'm editing in a Java-Class while still residing in a Debug-Process. The Debugger recognises the Change and reevaluates the Code and jumps back in order to be able to reexecute only the changed Code.
本文标签: javascriptEclipse keeps jumping to the start of the documentStack Overflow
版权声明:本文标题:javascript - Eclipse keeps jumping to the start of the document - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742372302a2462467.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论