Move Classes dialog isn't working

Hello.

I'm trying to move a directory inside another one.

When I drag & drop the directory onto the destination, the Move Classes dialog pops to ask me the new namespace and directory in which move the items. By default these fields are filled with the namespace and directory I dragged the directory onto, so everything seems alright, but I can't hit the Refactor or Preview buttons. When I do, the button are outlined as if they were selected, but nothing happens. Only the Cancel button works.

I didn't find anything related to this issue here or anywhere else, and the documentation tells nothing about it (which seems normal as it is obviously a bug).

I'm on PhpStorm 2022.1.1 build PS-221.5591.58 on Windows 10.

Also I'm in a laravel project and I try to move a module if it helps.

 

EDIT: It works when I try to refactor a single class, which leads me to think that either the Move Classes dialog is not the appropriate one for a directory, or it doesn't work correctly in specific cases with a directory. Either way it doesn't do what I want, which is move the directory with all its files and change the namespace of classes inside it.

 

Thanks.

1

I have tried to reproduce the issue without any luck, "Move classes" on drag'n'drop works fine for me (on a PhpStorm 2022.1.2 though):

Could you please try it on a simple fresh project, would it behave in the same manner?

0

Would it be possible to also try it with a new project? 

0

This problem happened to me today on IntelliJ 2024.1, trying to refactor one class only, from on package to another.

Yesterday that worked fine on IntelliJ 2023.

I've deleted IDE leftovers, invalidated caches with all options checked, repair IDE on file (pom.xml), restarted IntelliJ and still its not working… Buttons Refactor and Preview take no action at all.

EDIT:

Classe rename also doesn't work. The inplace popup shows, rename it, show as red denoting problem, and after finishing it all rollsback.

0

请先登录再写评论。