Skip to content

Instantly share code, notes, and snippets.

@dkandalov
Last active May 28, 2022 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkandalov/d51de2311dfd92dfa56feb3e3f9f96a6 to your computer and use it in GitHub Desktop.
Save dkandalov/d51de2311dfd92dfa56feb3e3f9f96a6 to your computer and use it in GitHub Desktop.
import com.intellij.openapi.actionSystem.*
val newElementActionGroup = ActionManager.getInstance().getAction(IdeActions.GROUP_NEW) as DefaultActionGroup
val newKotlinFileAction = ActionManager.getInstance().getAction("Kotlin.NewFile") as AnAction
newElementActionGroup.remove(newKotlinFileAction)
newElementActionGroup.add(newKotlinFileAction, Constraints.FIRST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment