Author Topic: 'Goto Reference for ..' - Not showing all results in v21.0.3.0  (Read 225 times)

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6

Hi,

I'm having an issue with the 'Goto Reference for ...' option - mapped in my case to Ctrl-/.

In this particular instance I am using a Unity/C# based project.

What normally happens when using this option - with the cursor on a method name, is that the Reference panel lists the file that the method is declared in and any other project files that appear to call this method.
What I am seeing as of V21.0.3.0, is only the file that defines the Method and the file I am in at the time of selecting the option are listed, all other uses are no longer shown.


I cannot confirm if this was working as expected in v21.0.2.0 or earlier at the moment as I need to find the download for that particuar version, but I do believe this was working in earlier v21 builds.

This issue seems to periodically regress, particularly on the Mac as in the past I have had the same SE version behave differently compared to PC.

I have tried this on my normal config setup and also with a complete factory reset.  I don't believe it's a configuration issue but you are welcome to check any options I have set.

SlickEdit Pro 2016 (v21.0.3.0), with hot fix revision 3.
Running on a Mac with Sierra 10.12.1.

Attached is a screen grab of the goto references result for a method called 'getErrorMessageHelper', below that is the count for items using this method if I search for all files in project with that method name instead.

Thanks,
Mark

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2091
  • Hero Points: 259
Re: 'Goto Reference for ..' - Not showing all results in v21.0.3.0
« Reply #1 on: July 10, 2017, 08:58:19 pm »
It would be helpful to see the instances that are rejected or not found by references search.

1) are they in files that are included in the workspace tag file (Tools > Tag Files...)
2) Are they in commented out code (#if 0 or similar, perhaps)?
3) Does list-members work correctly on them?


ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: 'Goto Reference for ..' - Not showing all results in v21.0.3.0
« Reply #2 on: July 11, 2017, 11:26:00 am »
Hi Dennis,

1) All the files are in the workspace tag and I have forced a rebuild
2) No they are not in any conditional code block, just any/all general method used across the codebase - not just specific ones
3) Using that on the command bar shows as an unknown command


Additional update: I'm using my Mac at home today which has V21.0.3.0 installed but with NO hotfixes installed.  Getting references for a particular method behaves as expected (See attached image) - which as you can see compared to the previous images matches the count from the manual search results (6 items in total).

This image include the rejected references in the previous post, basically if its not in the originating reference search file, or the declaration of that method it's ignored (so not listing other uses of this method).

So I will try the latest hot fix to see if this changes the behaviour and I will also try this configuration from home in the office later this week to see if that has any effect.

Thanks,
Mark
« Last Edit: July 11, 2017, 11:52:53 am by ExtremeXS »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2091
  • Hero Points: 259
Re: 'Goto Reference for ..' - Not showing all results in v21.0.3.0
« Reply #3 on: July 11, 2017, 02:03:12 pm »
I see that you have "Look in" set to <Project>.  Are the other files in the current project (the *current* project, not the project which the current file belongs to).

Also, right-click on list of references and make sure that the filters (Quick Filters) are set to "Show All Tags".

I do not know how "GlobalGameState" and "GlobalGameState.Instance" are defined, so I do not know why the reference would be kicked out outside of the current file, unless it appears to be local to GlobalGameState.cs.

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: 'Goto Reference for ..' - Not showing all results in v21.0.3.0
« Reply #4 on: July 12, 2017, 11:08:56 am »
Hey Dennis,

Good spot!  I think the "Look in" setting is indeed the behaviour difference.

Whilst my home machine was set to <Current Project> it was behaving as if it where set to <Current Workspace>, when I changed the setting to something else and back to 'Project' I see the filtered behaviour where it only shows the current and declaring file (Projects are auto generated from Unity).  Now at least when I switch to 'Workspace' I get a full reference list.

I will retest on my office machine tomoz but I think you've hit the nail on the head with the look-in setting.  Also updated with Hotfix #4 and still working as expected here.

Quick Filters - was indeed set to "Show All Tags"

No idea when I changed that setting, but I am guessing quite some time ago, which may explain my legacy PC/Mac result differences in earlier versions too.

Thanks for your help,
Mark

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: 'Goto Reference for ..' - Not showing all results in v21.0.3.0
« Reply #5 on: July 13, 2017, 10:24:28 am »
Hi Dennis,

Checked my office machine - the "Look in" setting was even more restrictive <Current File>, so thanks very kindly for spotting that, I would never have noticed as it's a setting that I never change - even though at some point I clearly have touched!

Cheers,
Mark