intellij-elm icon indicating copy to clipboard operation
intellij-elm copied to clipboard

Add "Move module members" refactoring

Open Birowsky opened this issue 6 years ago • 5 comments

You have no idea how happy I am to see fresh efforts on supporting elm in intellij!

THANK YOU!

So, what i'm asking for, here, is moving function/type alias/value from one file to another, while updating it's references throughout the project. With typescript, it looks like this:

screen shot 2018-02-10 at 14 27 53 screen shot 2018-02-10 at 14 30 19

Birowsky avatar Feb 10 '18 13:02 Birowsky

Yes, this would be fairly easy to do. The reference system works, so it should be relatively easy to move the value definition and find all the files where you need to update the imports.

This would probably be a medium-hard difficulty task for a contributor. My recommendation would be to look at how the Rust plugin (from JetBrains) implements similar functionality. My plugin is heavily based on the architecture of the Rust plugin. The Rust plugin is an especially good source for finding efficient ways to write tests for new functionality such as this.

In terms of inserting new imports, a lot of that code has already been implemented to support the ‘add import’ intention on unresolved references.

klazuka avatar Feb 12 '18 08:02 klazuka

That's nice. But maybe I should rephrase the question, can we expect you to do it? :}

Birowsky avatar Feb 12 '18 22:02 Birowsky

It’s a good idea, but I don’t have much spare time. It might be 6 months before I get around to it.

klazuka avatar Feb 13 '18 01:02 klazuka

🤘

Birowsky avatar Apr 14 '18 13:04 Birowsky

Keith, if I could somehow.. bribe.. you.. to get this out there? Like.. a beer.. or.. ten? image

Birowsky avatar Jun 30 '20 21:06 Birowsky