Cannot rename any variable (or anything else)

Issue #1489 resolved
Alan Birchenough created an issue

Since I resumed work this morning I have been unable to use “Refactor → Rename” on anything, including any variable. I execute the standard gesture, but nothing happens. Also, I tried the right mouse menu option to invoke it explicitly, but again, there is no response from the IDE.

I tried invalidating caches and restarting, but this did not fix the problem.

I attach compressed logs.

Comments (9)

  1. Scott Wells repo owner

    Alan, the issue is this:

    java.lang.NoSuchMethodError: 'void com.intellij.util.containers.ContainerUtil.addAll(java.util.Collection, java.util.Collection)'
        at com.illuminatedcloud.intellij.refactoring.ApexDeclarationNameSuggestionProvider.getExpressionNames(SourceFile:224)
        at com.illuminatedcloud.intellij.refactoring.ApexDeclarationNameSuggestionProvider.getSuggestedNames(SourceFile:115)
        at com.intellij.refactoring.rename.inplace.MyLookupExpression.initLookupItems(MyLookupExpression.java:50)
    

    That method has been there for a long while, so I'm not sure why it's not resolving. It's almost like something is wrong with your base IDE. I noticed that you're on a slightly older build of the base IDE, 2019.2.4 vs. 2019.3. Do you mind updating to 2019.3 to see if that resolves the issue?

  2. Scott Wells repo owner

    FWIW, that last time that ApexDeclarationNameSuggestionProvider changed was March 10, 2019, and that's the Illuminated Cloud class that's calling something that can't be resolved. That definitely makes me think that it's an issue with the base IDE install.

  3. Alan Birchenough reporter

    Your explanation makes sense. Thanks. I guess I can’t imagine how a base IDE just becomes internally incoherent, so instead I should just move on…bizarre.

  4. Scott Wells repo owner

    I've seen it happen in rare situations, most often (seemingly) as a result of the patch update process.

    Like I said, that's what it looks like to me, but it's possible when we get to the bottom of it, it is in fact my issue to solve. Let's get the most obviously potential solution out of the way first, though.

  5. Alan Birchenough reporter

    Sure. As mentioned previously, upgrading to IntelliJ 2019.3 did in fact resolve the issue.

  6. Log in to comment