Do not retain proxy-based components for compiler plugin settings in project model
This commit is contained in:
@@ -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<String>,
|
||||
|
||||
+3
-1
@@ -33,6 +33,8 @@ interface AnnotationBasedPluginModel : Serializable {
|
||||
val annotations: List<String>
|
||||
val presets: List<String>
|
||||
|
||||
fun copy(): AnnotationBasedPluginModel
|
||||
|
||||
val isEnabled get() = annotations.isNotEmpty() || presets.isNotEmpty()
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ abstract class AnnotationBasedPluginProjectResolverExtension<T : AnnotationBased
|
||||
val model = resolverCtx.getExtraProject(gradleModule, modelClass)
|
||||
|
||||
if (model != null) {
|
||||
ideModule.putCopyableUserData(userDataKey, model)
|
||||
ideModule.putCopyableUserData(userDataKey, model.copy() as T)
|
||||
}
|
||||
|
||||
super.populateModuleExtraModels(gradleModule, ideModule)
|
||||
|
||||
@@ -23,6 +23,10 @@ import org.jetbrains.kotlin.annotation.plugin.ide.AnnotationBasedPluginProjectRe
|
||||
|
||||
interface NoArgModel : AnnotationBasedPluginModel {
|
||||
val invokeInitializers: Boolean
|
||||
|
||||
override fun copy(): NoArgModel {
|
||||
return NoArgModelImpl(annotations.toList(), presets.toList(), invokeInitializers)
|
||||
}
|
||||
}
|
||||
|
||||
class NoArgModelImpl(
|
||||
|
||||
+5
-1
@@ -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 SamWithReceiverModel : AnnotationBasedPluginModel
|
||||
interface SamWithReceiverModel : AnnotationBasedPluginModel {
|
||||
override fun copy(): SamWithReceiverModel {
|
||||
return SamWithReceiverModelImpl(annotations.toList(), presets.toList())
|
||||
}
|
||||
}
|
||||
|
||||
class SamWithReceiverModelImpl(
|
||||
override val annotations: List<String>,
|
||||
|
||||
Reference in New Issue
Block a user