diff --git a/plugins/allopen/allopen-cli/src/AllOpenDeclarationAttributeAltererExtension.kt b/plugins/allopen/allopen-cli/src/AllOpenDeclarationAttributeAltererExtension.kt index 751e81f6ac2..a574db29d5c 100644 --- a/plugins/allopen/allopen-cli/src/AllOpenDeclarationAttributeAltererExtension.kt +++ b/plugins/allopen/allopen-cli/src/AllOpenDeclarationAttributeAltererExtension.kt @@ -23,10 +23,10 @@ import org.jetbrains.kotlin.extensions.AnnotationBasedExtension import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.KtModifierListOwner -import org.jetbrains.kotlin.resolve.BindingContext +import org.jetbrains.kotlin.psi.psiUtil.isPrivate class CliAllOpenDeclarationAttributeAltererExtension( - private val allOpenAnnotationFqNames: List + private val allOpenAnnotationFqNames: List ) : AbstractAllOpenDeclarationAttributeAltererExtension() { override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?) = allOpenAnnotationFqNames } @@ -37,11 +37,11 @@ abstract class AbstractAllOpenDeclarationAttributeAltererExtension : Declaration } override fun refineDeclarationModality( - modifierListOwner: KtModifierListOwner, - declaration: DeclarationDescriptor?, - containingDeclaration: DeclarationDescriptor?, - currentModality: Modality, - isImplicitModality: Boolean + modifierListOwner: KtModifierListOwner, + declaration: DeclarationDescriptor?, + containingDeclaration: DeclarationDescriptor?, + currentModality: Modality, + isImplicitModality: Boolean ): Modality? { if (currentModality != Modality.FINAL) { return null diff --git a/plugins/allopen/allopen-cli/src/AllOpenPlugin.kt b/plugins/allopen/allopen-cli/src/AllOpenPlugin.kt index a8c8feb8a26..95be76ed97a 100644 --- a/plugins/allopen/allopen-cli/src/AllOpenPlugin.kt +++ b/plugins/allopen/allopen-cli/src/AllOpenPlugin.kt @@ -26,33 +26,38 @@ import org.jetbrains.kotlin.config.CompilerConfigurationKey import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension object AllOpenConfigurationKeys { - val ANNOTATION: CompilerConfigurationKey> = - CompilerConfigurationKey.create("annotation qualified name") - + val ANNOTATION: CompilerConfigurationKey> = CompilerConfigurationKey.create("annotation qualified name") val PRESET: CompilerConfigurationKey> = CompilerConfigurationKey.create("annotation preset") } class AllOpenCommandLineProcessor : CommandLineProcessor { companion object { val SUPPORTED_PRESETS = mapOf( - "spring" to listOf( - "org.springframework.stereotype.Component", - "org.springframework.transaction.annotation.Transactional", - "org.springframework.scheduling.annotation.Async", - "org.springframework.cache.annotation.Cacheable", - "org.springframework.boot.test.context.SpringBootTest", - "org.springframework.validation.annotation.Validated"), - "quarkus" to listOf( - "javax.enterprise.context.ApplicationScoped", - "javax.enterprise.context.RequestScoped")) + "spring" to listOf( + "org.springframework.stereotype.Component", + "org.springframework.transaction.annotation.Transactional", + "org.springframework.scheduling.annotation.Async", + "org.springframework.cache.annotation.Cacheable", + "org.springframework.boot.test.context.SpringBootTest", + "org.springframework.validation.annotation.Validated" + ), + "quarkus" to listOf( + "javax.enterprise.context.ApplicationScoped", + "javax.enterprise.context.RequestScoped" + ) + ) - val ANNOTATION_OPTION = CliOption("annotation", "", "Annotation qualified names", - required = false, allowMultipleOccurrences = true) + val ANNOTATION_OPTION = CliOption( + "annotation", "", "Annotation qualified names", + required = false, allowMultipleOccurrences = true + ) - val PRESET_OPTION = CliOption("preset", "", "Preset name (${SUPPORTED_PRESETS.keys.joinToString()})", - required = false, allowMultipleOccurrences = true) + val PRESET_OPTION = CliOption( + "preset", "", "Preset name (${SUPPORTED_PRESETS.keys.joinToString()})", + required = false, allowMultipleOccurrences = true + ) - val PLUGIN_ID = "org.jetbrains.kotlin.allopen" + const val PLUGIN_ID = "org.jetbrains.kotlin.allopen" } override val pluginId = PLUGIN_ID