Cursor will sometimes jump to sub name?

mannih2001 wrote on Tue Feb  5 17:16:38 CET 2008:

I really, really like epic, but I am sometimes nagged by a peculiar problem:

Sometimes, while typing, the cursor will suddenly jump to the name of the
enclosing sub. The name will be selected and if I'm not careful, I will
simply type over the name.

I have no idea how to trigger this behavior, but I am now 100% sure that
I am not accindentally typing some keyboard shortcut. It can happen while
typing just about anything, no shift, ctrl or whatever modifiers seem to
be needed.

Has anyone else experienced this? Could this be a bug in epic or eclipse?

justin_time wrote on Mon Feb 11 20:24:54 CET 2008:
I've had the same thing happen to me a couple times today.  Same thing as
you - no idea how I caused it.  Honestly, I thought it was viPlugin that
was causing it for me - do you by change have that installed?
mannih2001 wrote on Tue Feb 12 08:02:59 CET 2008:
No, that one is not installed. Never even heard about it.

maqsoum wrote on Fri Feb 22 21:19:13 CET 2008:
 This happens to me as well, if I hadn't seen this post i'd be suspecting
that I was accidentally hitting some key...
jacktanner wrote on Mon Feb 25 22:41:41 CET 2008:
I've seen this too, but have been unable to pin down a pattern. FWIW, this
is GCJ-compiled Eclipse on Fedora.
jploski wrote on Mon Feb 25 22:52:47 CET 2008:
This is probably just a bad guess, but is everyone who has experienced it
using gcj? (BTW, according to one report, gcj was orders of magnitude slower
than Sun's JVM, e.g. when editing big source files.)

The only situation I can think of in which the cursor might jump to a sub
name is when the selection in the Outline view is changed somehow...
mannih2001 wrote on Wed Feb 27 15:39:42 CET 2008:
No, sorry. That would have been too easy. I'm on Sun's JVM (java-6-sun-

"The only situation I can think of in which the cursor might jump to a sub
name is when the selection in the Outline view is changed somehow..."

The behaviour I'm seeing (sometimes) looks exactly like some evil daemon
clicked on the Outline view and immediately put the focus to back the editor.
But the bastard will always take the current function/method. I have already
looked for a possible keyboard shortcut that might do something like that.
I haven't found one, though, but the list is long and maybe I missed it.
IS there a keyboard shortcut that might be responsible?


jploski wrote on Wed Feb 27 17:13:16 CET 2008:
AFAIK, there is no such keyboard shortcut. I suspect that the current event
handling in the editor might not be as deterministic as one would like.
EPIC synchronizes selections both ways - when you select something in Outline,
the caret jumps to the subroutine definition, when you move the caret around
(which is also considered a "selection change" in Eclipse), the Outline
is updated accordingly. To avoid an infinite loop, there is a check whether
an Outline update is occurring during a caret movement. If this check sometimes
failed, you would get just the reported symptoms.

Which version of Eclipse do you use? It could be that the event sequencing
(more precisely, whether event notifications are nested or serialized in
this particular case) depends on some Eclipse internals. I'd like to reproduce
the situation before changing anything in the code, but in case I don't
succeed, I will make the "caret-to-outline" synchronization an optional
preference so that you can disable it and test whether the problem reoccurs
without it.
mannih2001 wrote on Wed Feb 27 17:21:58 CET 2008:
Souns like you are on the right track. I'm using (Build id: M20071023-165)
on Ubuntu Gutsy.

jploski wrote on Wed Feb 27 19:42:12 CET 2008:
Eclipse 3.3.x indeed behaves differently from 3.2. The bug is fixed in 0.5.44/0.6.21,
so upgrade now.
mannih2001 wrote on Wed Feb 27 19:50:44 CET 2008:
Wow. You sure are the fastest bug fixer I know.

Thank you,
jacktanner wrote on Mon Feb 25 22:42:16 CET 2008:
It's definitely a regression, by the way; I'd guess it showed up in the
last six months or so.
maqsoum wrote on Wed Feb 27 00:58:30 CET 2008:
  It looks like I'm running with sun's VM, but I'm not sure of the meaning
of the 
env variables like : gnu.gcj.precompiled.db.path that are parametrizing
my eclipse VM ....

 I'd be glad to get rid of it and see if it helps, I googled around and
it doesn't seem
straight forward.

maxime   28402  5570  0 17:47 ?        00:00:00 /usr/lib/eclipse/eclipse
-vm /usr/lib/jvm/java-6-sun/bin/java -install /usr/lib/eclipse -startup
/usr/lib/eclipse/startup.jar -vmargs -Djava.library.path=/usr/lib/jni -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never -Dosgi.locking=none

maxime   28412 28402 25 17:47 ?        00:00:20 /usr/lib/jvm/java-6-sun/bin/java
-Djava.library.path=/usr/lib/jni -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never -Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar -os linux -ws gtk -arch x86 -launcher
/usr/lib/eclipse/eclipse -name Eclipse -showsplash 600 -exitdata 488002
-install /usr/lib/eclipse -vm /usr/lib/jvm/java-6-sun/bin/java -vmargs -Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db -Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none -jar /usr/lib/eclipse/startup.jar

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.