Wizard: flatten second UI step to fit new UI
This commit is contained in:
+8
-1
@@ -59,7 +59,7 @@ fun <T> withSettingsOf(
|
||||
): T = function(IdBasedTemplateEnvironment(template, identificator))
|
||||
|
||||
|
||||
abstract class Template : SettingsOwner, EntitiesOwnerDescriptor {
|
||||
abstract class Template : SettingsOwner, EntitiesOwnerDescriptor, DisplayableSettingItem {
|
||||
final override fun <V : Any, T : SettingType<V>> settingDelegate(
|
||||
create: (path: String) -> SettingBuilder<V, T>
|
||||
): ReadOnlyProperty<Any, TemplateSetting<V, T>> = cached { name ->
|
||||
@@ -70,6 +70,8 @@ abstract class Template : SettingsOwner, EntitiesOwnerDescriptor {
|
||||
abstract val htmlDescription: String
|
||||
abstract val moduleTypes: Set<ModuleType>
|
||||
|
||||
override val text: String get() = title
|
||||
|
||||
open fun isApplicableTo(module: Module): Boolean = true
|
||||
|
||||
open val settings: List<TemplateSetting<*, *>> = emptyList()
|
||||
@@ -133,6 +135,11 @@ abstract class Template : SettingsOwner, EntitiesOwnerDescriptor {
|
||||
"projectName" to StructurePlugin::name.settingValue.capitalize()
|
||||
)
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other.safeAs<Template>()?.id == id
|
||||
|
||||
override fun hashCode(): Int = id.hashCode()
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
final override fun <V : DisplayableSettingItem> dropDownSetting(
|
||||
title: String,
|
||||
|
||||
Reference in New Issue
Block a user