Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Go to declaration" does not work in Netbeans PHP

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, NetBeans, PHP 7.0.1

My classes are defined under <project-root>/foloder00/folder01/folder02/MyClass.php

I call MyClass <project-root>/index.php

Do you know what the problem is? And the workaround?

like image 904
Nam G VU Avatar asked Dec 03 '11 18:12

Nam G VU


2 Answers

As suggested by Nam, it is cache related. So another approach could be to delete the cache:

  1. Close NetBeans
  2. Delete cache folder (by default, on Linux it is located in /home/USER/.cache/netbeans)
  3. Open the project and wait for the scanning project task to finish.
like image 106
WonderLand Avatar answered Oct 10 '22 23:10

WonderLand


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\

like image 45
Tilman Avatar answered Oct 10 '22 22:10

Tilman