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

Refactor rename controller from router.ex

Open GiorgioG opened this issue 2 years ago • 2 comments

System

Plugin Version: 13.0.0 Application: IntelliJ IDEA Ultimate Edition (2022.1.1) Operating System: Linux (5.17.5-76051705-generic)

What I was doing

Attempted to refactor->rename "PageController" in router.ex in a Phoenix app.

Event

Exception

Stacktrace

kotlin.NotImplementedError: An operation is not implemented: Rename not implemented
	at org.elixir_lang.psi.impl.PsiNamedElementImpl.setName(PsiNamedElementImpl.kt:71)
	at org.elixir_lang.psi.impl.ElixirPsiImplUtil.setName(ElixirPsiImplUtil.java:1652)
	at org.elixir_lang.psi.impl.ElixirAliasImpl.setName(ElixirAliasImpl.java:77)

GiorgioG avatar May 20 '22 11:05 GiorgioG

The router aliases don't resolve to modules because I never implemented understanding the router DSL to get the outer module namespace from scope. Once that's done this would just be renaming a module.

KronicDeth avatar May 20 '22 16:05 KronicDeth

@KronicDeth That makes sense, thanks for the quick response.

GiorgioG avatar May 20 '22 17:05 GiorgioG