Eclipse -click Hyperlink Not Working

前端 未结 17 919
情深已故
情深已故 2020-12-28 17:08

I\'m running Eclipse Kepler, and for some reason, the ctrl-click hyperlink feature isn\'t working in one particular workspace.

I\'ve looked at this question, and the

相关标签:
17条回答
  • 2020-12-28 17:30

    For further info, click Window > Show View > Error Log. Then see the messages apearing each time you want to do Ctrl+click. Then double-click to open one of the entries and you will get detailed info.

    You can cut out come code snippets (for a while), save it and see if the hyperlink functionality restores, then go to another piece of code until you find it.

    In my case it occured only in one file and its currently know bug in Eclipse Oxygen: https://bugs.eclipse.org/bugs/show_bug.cgi?id=517610

    It occured in PyDdev Just one line of code confused it terribly: Unhandled event loop exception

    print '*' * 100, '\n' #  reproduces the bug
    print '*' * 100, 'anythin' # also buggy
    

    but

    print ('*' * 100), '\n' #  works fine
    print '*' * 100 #  works fine
    
    0 讨论(0)
  • 2020-12-28 17:31

    This is due to unrechable class folder reference for the source folder. It would be fixed by typing

    mvn eclipse:eclipse

    Allow maven to complete the build and then refresh eclipse.

    0 讨论(0)
  • 2020-12-28 17:34

    (And this may well be related -- "Mark Occurrences" isn't working in that workspace either, even thought the "Toggle Mark Occurrences" button is pressed.)

    This kind of problem occurs when you have opened a .class file, or you have opened a file which is not in the build path of the project ( especially with maven projects in eclipse ). So maybe your issue is related to some class path problems in eclipse settings file. The project might be compiling fine, but eclipse may not be displaying the files and folders correctly and thus the editor is unable to determine the link when you press CTRL-click. So verify your eclipse settings and make sure that all source folders are declared as "source folders" and are added to the build path.

    Also verify that you are in the correct "perspective" that understands java syntax (Java perspecive or JEE prespective)

    0 讨论(0)
  • 2020-12-28 17:39

    If it's a maven project, refresh maven.

    • Select a project > Maven > Refresh Maven
    • Select all projects
    • OK
    0 讨论(0)
  • 2020-12-28 17:42

    Seems like you have a project dependency in your build path (see the project properties). Open the other project or delete it from the build path.

    0 讨论(0)
  • 2020-12-28 17:43

    Delete project from eclipse and import again, it resolved for me.

    0 讨论(0)
提交回复
热议问题