add quick fix for ACCESS_TO_TOP_LEVEL_FROM_ANOTHER_FILE to code cleanup

This commit is contained in:
Michael Nedzelsky
2015-09-10 15:00:57 +03:00
parent 908228a3cf
commit 1dfd877af2
2 changed files with 3 additions and 2 deletions
@@ -103,7 +103,8 @@ public class KotlinCleanupInspection(): LocalInspectionTool(), CleanupLocalInspe
Errors.DEPRECATED_ANNOTATION_THAT_BECOMES_MODIFIER,
Errors.DEPRECATED_DECAPITALIZED_ANNOTATION,
Errors.DEPRECATED_ESCAPED_MODIFIER,
Errors.DEPRECATED_UNESCAPED_ANNOTATION
Errors.DEPRECATED_UNESCAPED_ANNOTATION,
Errors.ACCESS_TO_PRIVATE_TOP_LEVEL_FROM_ANOTHER_FILE
)
private fun Diagnostic.isObsoleteLabel(): Boolean {
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.JetFile
import org.jetbrains.kotlin.psi.JetModifierListOwner
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
public class ChangePrivateTopLevelToInternalFix(element: JetModifierListOwner, private val elementName: String) : JetIntentionAction<JetModifierListOwner>(element) {
public class ChangePrivateTopLevelToInternalFix(element: JetModifierListOwner, private val elementName: String) : JetIntentionAction<JetModifierListOwner>(element), CleanupFix {
override fun getText() = "Make $elementName internal"
override fun getFamilyName() = "Make top-level declaration internal"