“Go to declaration” does not work in Netbeans PHP

后端 未结 18 2330
眼角桃花
眼角桃花 2020-12-13 18:37

Some of my defined classes are not loaded by the IDE when I call Ctrl+B, Go to declaration, Ctrl+click.

I\'m using Windows 7, NetBea

相关标签:
18条回答
  • 2020-12-13 19:10

    I encountered the same problem on Mac, I solved it by deleting netbeans cache directory:

    • Close netbeans, Find and delete Cache directory of netbeans, it will solve your problem:
    • Replace '7.1.2' with your installed version of Netbeans, in directory paths given below.

    MAC:
    Remove following directory:

     ~/.netbeans/7.1.2/var/cache/
    

    command:rm -rf ~/.netbeans/7.1.2/var/cache/ enter image description here

    Windows XP:
    Remove following directory:

    C:\Documents and Settings\(user)\.netbeans\7.1.2\var\cache
    

    Windows Vista / 7:
    Remove following directory:

    C:\Users\(user)\.netbeans\7.1.2\var\cache
    

    Linux:
    Remove following directory:

    .netbeans/7.1.2/var/cache
    

    LINK:Here is detailed discussion about the issue

    0 讨论(0)
  • 2020-12-13 19:10

    Go to Tools->Options-> click on PHP Icon on top -> General tab -> find "Global include path" -> Add Folder -> .

    This worked for me on netbeans 11 also

    0 讨论(0)
  • 2020-12-13 19:12

    I got the same issue in Netbeans 11.0. My OS is Ubuntu 18.04. I solved the issue by clearing the cache of netbeans. Cache path of Netbeans 11 is

    /home/USER/snap/netbeans/common/cache/11.0

    0 讨论(0)
  • 2020-12-13 19:13

    Go to Tools->Options-> click on PHP Icon on top -> General tab -> find "Global include path" -> Add Folder ->

    if(onLinux) { choose /var/www; } if(onWindows) { choose c:\path_to_htdocs or whatever; }

    Ah, too much programming for today.. :)

    For me, this repaired autocompletion and ctrl+click on method call.

    0 讨论(0)
  • 2020-12-13 19:16

    For me, deleting the Cache didn't work. Deleting and recreating the project did.

    For what it's worth, my Cache directory lives here:

    C:\Users\{username}\AppData\Local\NetBeans\Cache

    I'm using NetBeans 8.1 in Windows 7.

    0 讨论(0)
  • 2020-12-13 19:19

    Deleting the Netbeans cache and letting Netbeans rebuild the cache after start fixes the 'go to declaration' issue, as suggested by others.

    On Windows 7 with Netbeans 8.0 the path to the cache is

    c:\Users{username}\AppData\Local\NetBeans\Cache\

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