override fun loadState()

in src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/features/dbcontext/scaffold/ScaffoldDbContextDataContext.kt [43:95]


    override fun loadState(commonDialogState: DialogsStateService.SpecificDialogState) {
        super.loadState(commonDialogState)

        if (pluginSettings.storeSensitiveData) {
            commonDialogState.getSensitive(KnownStateKeys.CONNECTION)?.apply {
                connection.value = this
            }
        }

        commonDialogState.get(KnownStateKeys.PROVIDER)?.apply {
            provider.value = this
        }

        commonDialogState.get(KnownStateKeys.OUTPUT_FOLDER)?.apply {
            outputFolder.value = this
        }

        commonDialogState.getBool(KnownStateKeys.USE_ATTRIBUTES)?.apply {
            useAttributes.value = this
        }

        commonDialogState.getBool(KnownStateKeys.USE_DATABASE_NAMES)?.apply {
            useDatabaseNames.value = this
        }

        commonDialogState.getBool(KnownStateKeys.GENERATE_ON_CONFIGURING)?.apply {
            generateOnConfiguring.value = this
        }

        commonDialogState.getBool(KnownStateKeys.USE_PLURALIZER)?.apply {
            usePluralizer.value = this
        }

        commonDialogState.get(KnownStateKeys.DB_CONTEXT_NAME)?.apply {
            dbContextName.value = this
        }

        commonDialogState.get(KnownStateKeys.DB_CONTEXT_FOLDER)?.apply {
            dbContextFolder.value = this
        }

        commonDialogState.get(KnownStateKeys.TABLES)?.apply {
            tablesList.clear()
            tablesList.addAll(this.split(listSeparator).map { SimpleItem(it) })
            scaffoldAllTables.value = this.isEmpty()
        }

        commonDialogState.get(KnownStateKeys.SCHEMAS)?.apply {
            schemasList.clear()
            schemasList.addAll(this.split(listSeparator).map { SimpleItem(it) })
            scaffoldAllSchemas.value = this.isEmpty()
        }
    }