[Workspace Model] [IJPL-583] Remove set method from the WorkspaceEntityExtensionDelegate because now it works only for vals

GitOrigin-RevId: 8f71c1e8c0cbcfb8dc797dc9d3114e43a7297f3d
This commit is contained in:
Alex Plate
2024-03-25 13:27:42 +00:00
committed by intellij-monorepo-bot
parent 0e68917397
commit 7396b7850b
@@ -57,12 +57,6 @@ public open class WorkspaceEntityExtensionDelegate<T> {
return result as T
}
public operator fun setValue(thisRef: WorkspaceEntity, property: KProperty<*>, value: T?) {
thisRef as ModifiableWorkspaceEntityBase<*, *>
val entities = if (value is List<*>) value else listOf(value)
thisRef.updateReferenceToEntity(property.returnTypeKClass.java, property.isChildProperty, entities as List<WorkspaceEntity?>)
}
private fun computeOrGetCachedMetadata(property: KProperty<*>): PropertyMetadata {
val cachesMetadata = calculatedCache[property]
if (cachesMetadata != null) return cachesMetadata