192: Fix nullability related problems for 192

This commit is contained in:
Vyacheslav Gerasimov
2019-05-29 20:24:58 +03:00
parent 57943768bf
commit 05a2f5bda5
3 changed files with 6 additions and 6 deletions
@@ -27,8 +27,8 @@ class KotlinStandaloneScriptRunConfigurationProducer :
RunConfigurationProducer<KotlinStandaloneScriptRunConfiguration>(KotlinStandaloneScriptRunConfigurationType.instance) { RunConfigurationProducer<KotlinStandaloneScriptRunConfiguration>(KotlinStandaloneScriptRunConfigurationType.instance) {
override fun setupConfigurationFromContext( override fun setupConfigurationFromContext(
configuration: KotlinStandaloneScriptRunConfiguration, configuration: KotlinStandaloneScriptRunConfiguration,
context: ConfigurationContext?, context: ConfigurationContext,
sourceElement: Ref<PsiElement>? sourceElement: Ref<PsiElement>
): Boolean { ): Boolean {
configuration.setupFilePath(pathFromContext(context) ?: return false) configuration.setupFilePath(pathFromContext(context) ?: return false)
configuration.setGeneratedName() configuration.setGeneratedName()
@@ -40,8 +40,8 @@ class KotlinStandaloneScriptRunConfigurationProducer :
return pathFromPsiElement(location.psiElement) return pathFromPsiElement(location.psiElement)
} }
override fun isConfigurationFromContext(configuration: KotlinStandaloneScriptRunConfiguration?, context: ConfigurationContext?): Boolean { override fun isConfigurationFromContext(configuration: KotlinStandaloneScriptRunConfiguration, context: ConfigurationContext): Boolean {
val filePath = configuration?.filePath val filePath = configuration.filePath
return filePath != null && filePath == pathFromContext(context) return filePath != null && filePath == pathFromContext(context)
} }
@@ -180,7 +180,7 @@ class KotlinAddImportAction internal constructor(
return "Exclude '$value' from auto-import" return "Exclude '$value' from auto-import"
} }
override fun onChosen(selectedValue: String?, finalChoice: Boolean): PopupStep<Any>? { override fun onChosen(selectedValue: String, finalChoice: Boolean): PopupStep<Any>? {
if (finalChoice && !project.isDisposed) { if (finalChoice && !project.isDisposed) {
AddImportAction.excludeFromImport(project, selectedValue) AddImportAction.excludeFromImport(project, selectedValue)
} }
@@ -85,7 +85,7 @@ class ReplaceExplicitFunctionLiteralParamWithItIntention : PsiElementBaseIntenti
val functionLiteral: KtFunctionLiteral, val functionLiteral: KtFunctionLiteral,
val cursorWasInParameterList: Boolean val cursorWasInParameterList: Boolean
) : RenameProcessor( ) : RenameProcessor(
editor.project, editor.project!!,
functionLiteral.valueParameters.single(), functionLiteral.valueParameters.single(),
"it", "it",
false, false,