Find Usages sometimes doesn't work

Issue #1791 resolved
Jaap Branderhorst created an issue

We use the fflib framework and have a complex source tree that does not adhere to the standard ‘force-app/main/default’ structure. Within this tree we have a directory with services which contains business services. The business services consist of a class with static methods which in turn call the real implementation (which are in other classes).

Now we see that in some cases the methods of the business service classes are marked as ‘unused’ or we don’t find the right usages. We have rebuild the indexes and rebuild the IntelliJ cache. That doesn’t seem to help. A couple of screenshots might help:

As you can see, the getMaterials method is marked grey (not being used). Also when doing a ‘Find Usages’ search it is marked as not being used at all:

But a search in all files reveals usages:

Clearly showing the getMaterials method is used in the rest of the code and that the Find Usages functionality doesn’t work correctly

Comments (4)

  1. Scott Wells repo owner

    You mentioned that this project has a complex structure. How are the source roots configured? It's critical that all source be under properly-configured source roots. If you're not sure how to answer, feel free to email a high-level description of the project structure and your project's .iml file to support@illuminatedcloud.com and I'll see whether or not it's configured accordingly. That's by far the main reason for this type of issue.

  2. Scott Wells repo owner

    This build addresses all other known potential issues with reentrant indexing left over from the previous release. Please install it as follows:

    1. Download the attached archive, but don't extract it.
    2. Use Settings/Preferences > Plugins > Install plugin from disk (under the gear drop-down menu) and select the downloaded archive.
    3. Allow the IDE to restart.

    Once the IDE restarts, please completely rebuild indices and see whether the original problem still exists. If it does, please email the latest logs for review.

  3. Jaap Branderhorst Account Deactivated reporter

    Unfortunately it didn’t work. I’ll mail you the latest logs.

  4. Scott Wells repo owner

    Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.

  5. Log in to comment