Skip to content

Commit

Permalink
Tweak name
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed May 22, 2024
1 parent d0709c3 commit 507268b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import com.intellij.refactoring.rename.RenamePsiElementProcessor
import com.intellij.usageView.UsageInfo
import com.intellij.util.Processor

class GraphQLOperationRenameProcessor : RenamePsiElementProcessor() {
/**
* Allows to rename the corresponding usage in Kotlin code when renaming a GraphQL operation or fragment definition.
* The file name is also renamed if it matches the current operation or fragment name (as is customary).
*/
class GraphQLDefinitionRenameProcessor : RenamePsiElementProcessor() {
private var newName: String = ""

override fun canProcessElement(element: PsiElement): Boolean {
Expand Down
6 changes: 3 additions & 3 deletions intellij-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@
default="false"
/>

<!-- Rename operation -->
<!-- Rename GraphQL operation or fragment definition -->
<renamePsiElementProcessor
id="apollo.GraphQLOperationRenameProcessor"
implementation="com.apollographql.ijplugin.refactoring.GraphQLOperationRenameProcessor"
id="apollo.GraphQLDefinitionRenameProcessor"
implementation="com.apollographql.ijplugin.refactoring.GraphQLDefinitionRenameProcessor"
order="first"
/>
</extensions>
Expand Down

0 comments on commit 507268b

Please sign in to comment.