192: Fix nullability related problems for 192
This commit is contained in:
+4
-4
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user