Hook into "extract react component" refactoring

Answered

I've created https://github.com/BlackRule/react-extract-component-customizer and run it in PhpStorm. When I use other refactorings my methods from MyRefactoringEventListener are being called but when I do the "extract react component" refactoring (that I created plugin for) they are not. :( What do I do? I want to create folder with files when this refactoring happens (and my dream is place the refactored code there )
I don't know where I should put this question so I posted it in /requests and requested invitation to slack to post there as well...

0
3 comments

If you want your custom refactoring to be trackable, you must publish all its events explicitly.

project.getMessageBus().syncPublisher(RefactoringEventListener.REFACTORING_EVENT_TOPIC)
  .refactoringStarted(…)
0

I'm sorry for bad explanation from my side.  The "extract react component" refactoring is built into Webstorm/ (React support probably or js plugin) . How do I listen for that from my plugin?

0

The refactoring is most likely not sending events then, please file feature request https://youtrack.jetbrains.com/issues/WEB

0

Please sign in to leave a comment.