Move Declarations: Add intention which moves top-level declaration to the separate file in the same directory and package

#KT-4936 Fixed

GitOrigin-RevId: 2076945b91d37f8b384239a3da9317751924a7fc
This commit is contained in:
Alexey Sedunov
2015-09-11 02:20:38 +03:00
committed by intellij-monorepo-bot
parent 8e3896ffdd
commit dd6780afa4
22 changed files with 248 additions and 10 deletions
@@ -0,0 +1,11 @@
package p
class A {
}
fun foo() {
}
val x = 1
@@ -0,0 +1,11 @@
package p
class <caret>A {
}
fun foo() {
}
val x = 1
@@ -0,0 +1,4 @@
{
"mainFile": "source/test.kt",
"intentionClass": "org.jetbrains.kotlin.idea.refactoring.move.moveTopLevelDeclarations.MoveDeclarationToSeparateFileIntention"
}
@@ -0,0 +1,11 @@
package p
class <caret>A {
}
fun foo() {
}
val x = 1
@@ -0,0 +1,4 @@
{
"mainFile": "source/test.kt",
"intentionClass": "org.jetbrains.kotlin.idea.refactoring.move.moveTopLevelDeclarations.MoveDeclarationToSeparateFileIntention"
}
@@ -0,0 +1,5 @@
{
"mainFile": "source/test.kt",
"intentionClass": "org.jetbrains.kotlin.idea.refactoring.move.moveTopLevelDeclarations.MoveDeclarationToSeparateFileIntention",
"isApplicable": "false"
}