mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 19:02:13 +07:00
add @NotNull to RunConfigurationProducer#createConfigurationFromContext
GitOrigin-RevId: 3743ec6fb03a54d599412fde874465cbc5421832
This commit is contained in:
committed by
intellij-monorepo-bot
parent
78700e885e
commit
22fc1bd60d
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.junit;
|
||||
|
||||
import com.intellij.execution.JavaRunConfigurationExtensionManager;
|
||||
@@ -77,7 +77,7 @@ public abstract class JavaRunConfigurationProducerBase<T extends ModuleBasedConf
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ConfigurationFromContext createConfigurationFromContext(ConfigurationContext context) {
|
||||
public ConfigurationFromContext createConfigurationFromContext(@NotNull ConfigurationContext context) {
|
||||
ConfigurationFromContext fromContext = super.createConfigurationFromContext(context);
|
||||
if (fromContext != null) {
|
||||
JavaRunConfigurationExtensionManager.getInstance().extendCreatedConfiguration((RunConfigurationBase)fromContext.getConfiguration(),
|
||||
|
||||
@@ -91,7 +91,7 @@ public abstract class RunConfigurationProducer<T extends RunConfiguration> {
|
||||
* not applicable to this run configuration producer.
|
||||
*/
|
||||
@Nullable
|
||||
public ConfigurationFromContext createConfigurationFromContext(ConfigurationContext context) {
|
||||
public ConfigurationFromContext createConfigurationFromContext(@NotNull ConfigurationContext context) {
|
||||
final RunnerAndConfigurationSettings settings = cloneTemplateConfiguration(context);
|
||||
Ref<PsiElement> ref = new Ref<>(context.getPsiLocation());
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python.testing
|
||||
|
||||
import com.intellij.execution.RunManager
|
||||
@@ -30,8 +30,8 @@ abstract class AbstractPythonTestConfigurationProducer<T : AbstractPythonTestRun
|
||||
override fun getConfigurationSettingsList(runManager: RunManager): List<RunnerAndConfigurationSettings> =
|
||||
super.getConfigurationSettingsList(runManager).filter { configurationClass.isAssignableFrom(it.configuration.javaClass) }
|
||||
|
||||
override fun createConfigurationFromContext(context: ConfigurationContext?): ConfigurationFromContext? {
|
||||
if (context == null || !configurationClass.isAssignableFrom(cloneTemplateConfiguration(context).configuration.javaClass)) {
|
||||
override fun createConfigurationFromContext(context: ConfigurationContext): ConfigurationFromContext? {
|
||||
if (!configurationClass.isAssignableFrom(cloneTemplateConfiguration(context).configuration.javaClass)) {
|
||||
return null
|
||||
}
|
||||
return super.createConfigurationFromContext(context)
|
||||
|
||||
@@ -738,9 +738,9 @@ internal class PyTestsConfigurationProducer : AbstractPythonTestConfigurationPro
|
||||
return cloneTemplateConfigurationStatic(context, findConfigurationFactoryFromSettings(context.module))
|
||||
}
|
||||
|
||||
override fun createConfigurationFromContext(context: ConfigurationContext?): ConfigurationFromContext? {
|
||||
override fun createConfigurationFromContext(context: ConfigurationContext): ConfigurationFromContext? {
|
||||
// Since we need module, no need to even try to create config with out of it
|
||||
context?.module ?: return null
|
||||
context.module ?: return null
|
||||
return super.createConfigurationFromContext(context)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user