function usage count not appearing in one project but is appear in another

On one project, when I open up a file containing a set of functions used throughout a project I get a handy 'usage count' right above the function declaration. On another project it no longer appears (it used to). Not sure what changed, got turned off, or how to fix it, but I definitely would like the 'usage count' to appear above all function declarations on both projects. 

If I 'Option F7' on the a function in question it actual does show all usages of the function'

Here's an image of a the project where the declarations have the correct usage hints. (25 in this case)

And here's another, entirely separate project where it's not. (This function shown below definitely has 'uses' and none of the declared functions show the usage count.)

Did I accidentally turn something off? or did some setting get messed up?

 

1
3 comments

Hi there,

"Settings (Preferences on macOS) | Editor | Inlay Hints" -- by looking at the icon this appears to be a per-project setting. Which means: you may have disabled it.

Check what you have for the Code vision node there.

1

Thank you for the help. I checked that setting, but it's already turned on.

No joy there.

I've been examining the two projects and in particular the initial 'require' statements that set up the import of my functions.

On the Project that WORKS (correctly counts usages), I have the directories set up a show below. /Volumes/PTDEV_iSCSI is the Resource Root. phpinc and public_html are Source folder. Everything works as it should.

In 'myscript.php' inside of clientarea the initial lines of the script includes a reference to 'settings.php' where SHAREPOINT is defined. Both project follow this nomenclature in the 'settings.php' file. SHAREPOINT is defined the same in both projects except for the actual paths.



On the 'working' project, if I open a script in  /clientarea/myscript.php and hover over the require_once SHAREPOINT path to /phpinc/ it shows 'PTDEV_iSCSI' and scripts inside of /phpinc/ containing the helper functions correctly 'count' usages in the project overall. 

 

On the project that is not showing the reference counts I see this:

The main difference I see is the /RPDEV_iSCSI/ is missing as part of the "Source" path. If it matched the project that correctly counts usage it would be "../RPDEV_iSCSI/public_html/administration/myscript.php"

I've got the directories on RPDEV set up using a similar pattern to PTDEV


While inside of a helper script that isn't showing the usage counts, I ~can~ hit CMD-B for 'Declarations or Usages' is it does find the project usages. So it 'finds' the correct number of usages, but doesn't display the count. ??? Weird. (In this case it should indicate '5 usages')

 

I feel like there's some setting that is on the PT project that is correctly mapping reference of SHAREPOINT to  '../PTDEV_iSCSI/public_html' that is not set up correctly on the RP project that only maps to ../public_html/ rather than ../RPDEV_iSCSI/public_html ??

As of right now it's the only visible thing I can see as a difference between the two projects when examining the primary scripts where functions are used and the helper scripts where functions are defined. 

I've tried flushing my caches and that doesn't help either.

Any additional help is appreciate and thank you for your time in advance.

0

That seems like some project specific thingy that cannot be fixed based a few screenshots alone so I will not be able to help here.

I'd suggest you use "Submit a request" link at the top of this page (or use "Help | Contact Support..." directly from the IDE) to submit a Support Ticket where you can privately provide additional data like logs, possibly some project setup etc etc. Having a project to play with (the setup; to reproduce the IDE behaviour in certain conditions) makes a huge difference.

0

Please sign in to leave a comment.