Wizard: minor, remove unused functions
This commit is contained in:
+1
-4
@@ -26,13 +26,10 @@ class IdeWizard(
|
||||
},
|
||||
isUnitTestMode
|
||||
) {
|
||||
private val allSettings = plugins.flatMap { it.declaredSettings }
|
||||
val ideContext = IdeContext(context, servicesManager, isUnitTestMode)
|
||||
|
||||
init {
|
||||
with(valuesReadingContext) {
|
||||
context.settingContext.apply { initPluginSettings(allSettings) }
|
||||
}
|
||||
initPluginSettingsDefaultValues()
|
||||
}
|
||||
|
||||
var projectPath by setting(StructurePlugin::projectPath.reference)
|
||||
|
||||
-5
@@ -131,11 +131,6 @@ class SettingContext(val onUpdated: (SettingReference<*, *>) -> Unit) {
|
||||
onUpdated(reference)
|
||||
}
|
||||
|
||||
fun ReadingContext.initPluginSettings(settings: List<PluginSetting<*, *>>) {
|
||||
for (setting in settings) {
|
||||
setting.reference.savedOrDefaultValue?.let { values[setting.path] = it }
|
||||
}
|
||||
}
|
||||
|
||||
val allPluginSettings: Collection<PluginSetting<*, *>>
|
||||
get() = pluginSettings.values
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ abstract class Wizard(createPlugins: PluginsCreator, val servicesManager: Servic
|
||||
}
|
||||
}
|
||||
|
||||
private fun initPluginDefaultValues() {
|
||||
protected fun initPluginSettingsDefaultValues() {
|
||||
with(settingsWritingContext) {
|
||||
for (setting in pluginSettings) {
|
||||
setting.reference.setSettingValueToItsDefaultIfItIsNotSetValue()
|
||||
@@ -72,7 +72,7 @@ abstract class Wizard(createPlugins: PluginsCreator, val servicesManager: Servic
|
||||
phases: Set<GenerationPhase>,
|
||||
onTaskExecuting: (PipelineTask) -> Unit = {}
|
||||
): TaskResult<Unit> = computeM {
|
||||
initPluginDefaultValues()
|
||||
initPluginSettingsDefaultValues()
|
||||
initNonPluginDefaultValues()
|
||||
context.checkAllRequiredSettingPresent(phases).ensure()
|
||||
val taskRunningContext = WritingContext(context, servicesManager.withServices(services), isUnitTestMode)
|
||||
|
||||
Reference in New Issue
Block a user