Refactor / rename not working, or stops working

Answered

When I rightclick a method name or function name, I have the option to Refactor - Rename...

I can fill out the dialog, but no matter the options I select, once I click 'Refactor' or 'Preview', the dialog closes and nothing happens. No error message, nothing in the event log, no change to the source.

The subject says 'stops working' because restarting the IDE seems to fix the problem. Note that in all cases where I've encountered the problem, I had multiple projects in separate windows of the IDE open - not sure if that affects it though (it's just very common for me).

PyCharm 2017.3.2 (Professional Edition)
Build #PY-173.4127.16, built on December 19, 2017
Licensed to Jaap van der Velde
You have a perpetual fallback license for this version
Subscription is active until February 12, 2019
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

I've also recently started noticing extreme lagginess of my entire PC when PyCharm is open, but I'm suspecting recently replaced anti-virus of causing this problem. So, only mentioning it if it helps in identifying my refactoring issue. The anti-virus doesn't stop the refactoring from working initially, so I don't think there's a direct causal relationship there.

 

Cheers, JAAP.

7 comments

PyCharm 2017.3.2 (Professional Edition)
Build #PY-173.4127.16, built on December 19, 2017
Licensed to Александр Плосков
Subscription is active until October 22, 2018
For educational use only.
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Have same problem. Invalidate caches and restart solved my problem. Just restart IDE cannot solve this issue.

0

Good to know I'm not the only one. I will try to invalidate caches next time as well.

However, just a restart of the IDE did solve the problem every time, but of course it also always returns at some point.

0

Same here: works again after invalidation and restart.

UPS - slightly offtopic - my case has nothing to do with PyCharm - only java project in use here!
Still, I leave my comment in here, as this was the first hit in google

Maybe this helps:

* new start of intellij
* refactor java property + getter/setter, etc. - works
* start debugging
* refactor another java property - not working
* invalidate and restart
* wait quite a while until index is built
* refactoring works

0

Happening on Goland.

GoLand 2017.3
Build #GO-173.3727.144, built on November 30, 2017
Licensed to xxxx
You have a perpetual fallback license for this version
Subscription is active until February 27, 2019
JRE: 1.8.0_161-b12 x86
JVM: Java HotSpot(TM) Client VM by Oracle Corporation
Windows 10 10.0

0

Hello,

Could you please report an issue on YouTrack: http://youtrack.jetbrains.com/issues/IDEA. attaching idea.log ("Help | Show log in...") after reproducing the problem and restarting IDE?

 

0

Hi,

I'm sorry, I cannot reliably reproduce the issue and possibly it has been (intentionally or accidentally) fixed in recent updates. 

However, I can tell you that I've noticed that, when refactoring, in some cases the refactor will be:

  • live (happening as I type), in some cases
  • immediately applied (through a dialog, but executed without additional steps and in some cases
  • a 'Find' windows opens to show the impact before the refactor is executed.

In this final situation, the Find window gets populated, but it is docked to the bottom of the screen, along with debug, console, terminal, etc. and it doesn't come to the front. So, unless you know what to look for, there is no cue to actually open it, especially if it was already open prior to the 'Refactor' command (otherwise you might see its tab appear).

It is quite possible that the technical issue I thought I was experiencing was actually just a failure to notice the 'Find' window opening.

So, at the very least I would like to see this fixed:

  • When refactoring, in the case that the Find window needs to be presented to allow the user to check the refactor, make sure the find window opens and gets moved to the front. Possibly giving it focus.

It doesn't have to pop out or anything, just making sure it is visible would help.

Ideally, I would like to see:

  • Separate or relabel the 'Find' and 'Refactor' window. They can be the same (i.e. same layout and function), but opening a window or tab named 'Refactor' and showing it would make it much clearer.

I've submitted this issue on YouTrack as PY-28884, since I cannot provide the information for any technical issue as reported before, if it still exists.

0

Thanks! We have similar issue for platform: https://youtrack.jetbrains.com/issue/IDEA-180334. You could check the issue with 2018.1 EAP: https://www.jetbrains.com/pycharm/nextversion/. Some fixes were included there.

0

Please sign in to leave a comment.