Eclipse continues to jump to the beginning of the document

I have been using Eclipse for several weeks now and am starting to get used to it.

However, one thing really annoys me:
When editing JavaScript (I have not tried any other language yet), the editor window continues to jump to the beginning of the document that I am editing.

This mainly happens when the code currently contains syntax errors and mainly during / after deleting lines.
Especially constructs like { = , and sometimes unused lines / comments, seem to cause this problem.

When this happens, only the scroll scrolls to the top of the document - the cursor remains where it was before the "jump".

Anyone have an idea how to fix this?

+7
source share
4 answers

I believe that the problem described above is related to this error: https://bugs.eclipse.org/bugs/show_bug.cgi?id=318095

The work around is disabling the Link to Editor option in Project Explorer. This means that the icon with two arrows pointing in opposite directions at the top of the file tree is not enabled. Disabling this option resolved the issue for me.

+1
source

Looks like a problem with the implementation of the JavaScript editor. Most likely, a jump occurs when JavaScript-Parser cannot parse your document and throws an exception. You might consider reporting an error in the eclipse project (maybe there is already such a report?).

As a workaround, you might consider changing your code a bit. Try to write the code so that it does not confuse the parser (for example, it could immediately close the newly created comment, and THEN write the content instead of opening the comment, writing the content and finally closing the command). The same goes for lines, blocks ...

0
source

I have the same problem. I had this line of code in my file and I could reproduce the problem sequentially:

 $.preload(preloadImages , { base:assetsUrl+'b/images/', ext:'.png' }); 

I changed it to the following and I have no more problem.

 $.preload(preloadImages, { base:assetsUrl+'b/images/', ext:'.png' }); 
0
source

I get this phenomenon when I edit a Java class while still in Debug-Process. The debugger recognizes the change and reevaluates the code and reverts back to be able to re-execute only the changed code.

0
source

All Articles