简体   繁体   中英

Eclipse ctrl+click refers to wrong line

I have been facing this problem that when I ctrl+click on a method name to go inside that method, it points me somewhere else. Closing the editor and reopening doesn't fix the issue, I have to restart the eclipse which is so frustrating. Does anyone know why it's happening so and the fix to it?

eclipse version: 4.5.0

os: ubuntun 14.04

Using eclipse Hyperlinking you can open following:

在此处输入图片说明

So if it is opening declaration Ex: interface declaration, then try implementation option.

See following for more details:

Sometimes I face this issue but will get fixed if eclipse is relaunched. Anyway, try this.

Clean-build the workspace:

  1. Save all your files in the workspace.
  2. Project -> clean -> 'Clean selected projects below'
  3. Check your workspace if unchecked
  4. Check 'Start a build immediately' if unchecked and click 'ok'

Now try 'ctrl + click' or F3 in eclipse to goto method definition. Hope it helps!

根据您的Eclipse版本:转到Project Explorer>您的源目录>右键单击>索引>重建。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM