phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

[Feature Request] Better refactoring

Open storm1er opened this issue 2 years ago • 15 comments

Hi,

I just tried vscode marsl.vscode-php-refactoring extension and it's really awesome. I'm pretty sure DevSense could implement it and be better without a doubt given the current devsense extension has more information =)

Thanks

storm1er avatar Dec 06 '22 08:12 storm1er

Thank you for the suggestion, and the nice words!

As far as I see, the only additional feature is the "Extract Method" right?

jakubmisek avatar Dec 06 '22 21:12 jakubmisek

@jakubmisek some refactoring capabilities would be awesome.

ctf0 avatar Dec 09 '22 06:12 ctf0

@ctf0 Thank you. Currently, the PHP editor has the https://docs.devsense.com/en/vscode/editor/refactoring and https://docs.devsense.com/en/vscode/editor/code-actions.

We have the "extract method" and more "code actions" on our to-do list.

jakubmisek avatar Dec 09 '22 11:12 jakubmisek

Hi, do you have any ETA, when we could expect Extract Method feature?

frees11 avatar Jan 13 '23 21:01 frees11

Hi, do you have any ETA, when we could expect Extract Method feature?

No specific ETA yet, we'll be first doing some code actions. Next month would be more probable.

jakubmisek avatar Jan 13 '23 21:01 jakubmisek

Hello any progress?

frees11 avatar Mar 10 '23 21:03 frees11

@frees11 we're adding more code actions. "Extract Method" is being tested so we can release it in upcoming weeks.

jakubmisek avatar Apr 29 '23 16:04 jakubmisek

@jakubmisek WOW, great to see this. If you need beta tester I will be glad to participate.

frees11 avatar Apr 29 '23 18:04 frees11

@jakubmisek hi any progress in this matter?

frees11 avatar Mar 07 '24 19:03 frees11

@frees11 we have added several new code actions and code fixes, and internally we have the extract method implemented as well - now we're deciding on how to approach the UI of the Extract Method.

jakubmisek avatar Mar 08 '24 13:03 jakubmisek

in my point of view, best UI for this has phpstorm - you will just select lines of code - click on extract to method, it will ask for new function name and thats it

frees11 avatar Mar 08 '24 14:03 frees11

@frees11 I agree, we just don't have this UI in VS Code (asking for a new function name), so we'll be inserting a snippet with a placeholder for the new function name instead I guess.

jakubmisek avatar Mar 08 '24 15:03 jakubmisek

check the popup api to get the user input for anything

ctf0 avatar Mar 08 '24 16:03 ctf0

@jakubmisek hi any progress in this matter?

frees11 avatar Aug 13 '24 12:08 frees11

thank you for reminding me, @frees11

jakubmisek avatar Aug 14 '24 12:08 jakubmisek