From 20cb4e91b35a952ea89e86866bde89646cfed6f2 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 16 May 2018 00:14:19 +0300 Subject: [PATCH] Do not retain proxy-based components for compiler plugin settings in project model --- .../allopen/allopen-ide/src/AllOpenModelBuilderService.kt | 6 +++++- .../src/AnnotationBasedPluginProjectResolverExtension.kt | 4 +++- plugins/noarg/noarg-ide/src/NoArgModelBuilderService.kt | 4 ++++ .../src/SamWithReceiverModelBuilderService.kt | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/plugins/allopen/allopen-ide/src/AllOpenModelBuilderService.kt b/plugins/allopen/allopen-ide/src/AllOpenModelBuilderService.kt index 8c40f2c7023..65bf3740d5a 100644 --- a/plugins/allopen/allopen-ide/src/AllOpenModelBuilderService.kt +++ b/plugins/allopen/allopen-ide/src/AllOpenModelBuilderService.kt @@ -21,7 +21,11 @@ import org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginModel import org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginModelBuilderService import org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginProjectResolverExtension -interface AllOpenModel : AnnotationBasedPluginModel +interface AllOpenModel : AnnotationBasedPluginModel { + override fun copy(): AllOpenModel { + return AllOpenModelImpl(annotations.toList(), presets.toList()) + } +} class AllOpenModelImpl( override val annotations: List, diff --git a/plugins/annotation-based-compiler-plugins-ide-support/src/AnnotationBasedPluginProjectResolverExtension.kt b/plugins/annotation-based-compiler-plugins-ide-support/src/AnnotationBasedPluginProjectResolverExtension.kt index b2d57495822..7a68f2ddba2 100644 --- a/plugins/annotation-based-compiler-plugins-ide-support/src/AnnotationBasedPluginProjectResolverExtension.kt +++ b/plugins/annotation-based-compiler-plugins-ide-support/src/AnnotationBasedPluginProjectResolverExtension.kt @@ -33,6 +33,8 @@ interface AnnotationBasedPluginModel : Serializable { val annotations: List val presets: List + fun copy(): AnnotationBasedPluginModel + val isEnabled get() = annotations.isNotEmpty() || presets.isNotEmpty() } @@ -56,7 +58,7 @@ abstract class AnnotationBasedPluginProjectResolverExtension,