Find Usages not working all the time.

Issue #568 duplicate
Mike Wannamaker created an issue

So I'm not sure how to reproduce this. Find usages of a class/method was working fine, I was using it and I did a bunch of refactoring of classes/methods. Then I went to do a find usages and it said there were no usages but I know there are. So I search with regex for method signature and sure enough it is there.

Perhaps the indexes are being corrupted?
Is there a quick way to refresh these indexes?

Comments (10)

  1. Scott Wells repo owner

    Hmmmm...definitely sounds like the caches/indices may be getting out of whack from all the search-and-replace. You can rebuild them easily from Illuminated Cloud>Configure Project using the Rebuild Caches and Indices button. Go ahead and close/reopen the project to be sure they're in the best state.

  2. Scott Wells repo owner

    Does this continue to be an issue? If so, any new thoughts on a way to reproduce? Resolving for now but feel free to reopen if it's still an issue and/or you have additional details.

  3. Mike Wannamaker reporter

    Hey Scott, yes this is still happening for me. I just rebuilt the indexes and it is not resolving it. I have a visualforce page that has {!basicControllerUIData} usage and in the controller I have a method public String getBasicControllerUIData() { ... }. The editor shows the method as grey (unused) and find usages reports no usages. But if I go to the page and command click, it jumps to the getBasicControllerUIData() method?. My page is called Manage.page and the controller is called ManageController.cls

  4. Mike Wannamaker reporter

    FYI: I'm now on version 2.0.1.8 and I thought maybe it was fixed. I have been using it alot refactoring a bunch of code and I just got bit.

  5. Scott Wells repo owner

    Mike, are you saying that 2.0.1.8 broke something that was working, or just that it didn't seem to fix it?

  6. Mike Wannamaker reporter

    No sorry, we upgraded to 2.0.1.8 and I was using it and verifying by also searching for the method string. I thought that maybe v2 fixed the issue, as it seemed to be working. However, I just did a bunch of refactoring removing what I thought was old dead code, but then the page wouldn't load. I went and verified and there was a merge field being used in the page as I described.

  7. Scott Wells repo owner

    Gotcha. I'll take a look. Sounds like you have a good example from which to work now. Thanks for providing that.

  8. Scott Wells repo owner

    I always feel a little weird resolving an older issue as a duplicate of a newer issue, but in this case I just finished working #1010 and I'm 99% sure it's the exact same issue. I'll be delivering that change with the next build, so after updating if you see this issue continue, don't hesitate to reopen this issue and/or #1010 and I'll take another look.

  9. Log in to comment