diff --git a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurationType.java b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurationType.java index a72a1370dd81..a18e1817d5b1 100644 --- a/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurationType.java +++ b/java/execution/impl/src/com/intellij/execution/remote/RemoteConfigurationType.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 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-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. /* * Class RemoteConfigurationFactory @@ -27,7 +25,7 @@ public class RemoteConfigurationType implements ConfigurationType { myFactory = new ConfigurationFactory(this) { @Override @NotNull - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new RemoteConfiguration(project, this); } diff --git a/platform/lang-impl/src/com/intellij/execution/compound/CompoundRunConfiguration.kt b/platform/lang-impl/src/com/intellij/execution/compound/CompoundRunConfiguration.kt index 223c2434032d..ea5b1c5e724b 100644 --- a/platform/lang-impl/src/com/intellij/execution/compound/CompoundRunConfiguration.kt +++ b/platform/lang-impl/src/com/intellij/execution/compound/CompoundRunConfiguration.kt @@ -25,7 +25,7 @@ class CompoundRunConfiguration @JvmOverloads constructor(project: Project, name: RunConfigurationBase(project, factory, name), RunnerIconProvider, WithoutOwnBeforeRunSteps, Cloneable { companion object { @JvmField - val COMPARATOR: Comparator = Comparator { o1, o2 -> + val COMPARATOR: Comparator = Comparator { o1, o2 -> val i = o1.type.displayName.compareTo(o2.type.displayName) when { i != 0 -> i diff --git a/plugins/ant/src/com/intellij/lang/ant/config/execution/AntRunConfigurationType.java b/plugins/ant/src/com/intellij/lang/ant/config/execution/AntRunConfigurationType.java index 770cc29f7098..3289fbe88fcd 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/execution/AntRunConfigurationType.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/execution/AntRunConfigurationType.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 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-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. package com.intellij.lang.ant.config.execution; import com.intellij.execution.configurations.ConfigurationFactory; @@ -17,7 +15,7 @@ public class AntRunConfigurationType implements ConfigurationType { private final ConfigurationFactory myFactory = new ConfigurationFactory(this) { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new AntRunConfiguration(project, this, ""); } }; diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfigurationType.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfigurationType.java index ddd95737d573..c2106164d8ac 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfigurationType.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunConfigurationType.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 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-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. package org.jetbrains.idea.maven.execution; import com.intellij.compiler.options.CompileStepBeforeRun; @@ -49,13 +47,13 @@ public class MavenRunConfigurationType implements ConfigurationType { myFactory = new ConfigurationFactory(this) { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new MavenRunConfiguration(project, this, ""); } @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project, RunManager runManager) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project, @NotNull RunManager runManager) { return new MavenRunConfiguration(project, this, ""); } @@ -66,8 +64,6 @@ public class MavenRunConfigurationType implements ConfigurationType { if (!StringUtil.isEmptyOrSpaces(cfg.getRunnerParameters().getWorkingDirPath())) return cfg; Project project = cfg.getProject(); - if (project == null) return cfg; - MavenProjectsManager projectsManager = MavenProjectsManager.getInstance(project); List projects = projectsManager.getProjects(); diff --git a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationType.java b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationType.java index 085e7777f7f2..875f1fa1792a 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationType.java +++ b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationType.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 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-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. package com.theoryinpractice.testng.configuration; @@ -29,7 +27,7 @@ public class TestNGConfigurationType implements ConfigurationType { { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new TestNGConfiguration("", project, this); } diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfigType.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfigType.java index 2d2505a16c2c..cca0b2ca07ef 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfigType.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/run/XsltRunConfigType.java @@ -71,7 +71,7 @@ public class XsltRunConfigType implements ConfigurationType { @Override @NotNull - public RunConfiguration createTemplateConfiguration(final Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull final Project project) { return new XsltRunConfiguration(project, this); } } diff --git a/python/python-rest/src/com/jetbrains/rest/run/RestRunConfigurationType.java b/python/python-rest/src/com/jetbrains/rest/run/RestRunConfigurationType.java index b5259dfeb669..300f7d344d16 100644 --- a/python/python-rest/src/com/jetbrains/rest/run/RestRunConfigurationType.java +++ b/python/python-rest/src/com/jetbrains/rest/run/RestRunConfigurationType.java @@ -75,7 +75,7 @@ public class RestRunConfigurationType implements ConfigurationType { @Override @NotNull - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new DocutilsRunConfiguration(project, this); } } @@ -87,7 +87,7 @@ public class RestRunConfigurationType implements ConfigurationType { @Override @NotNull - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new SphinxRunConfiguration(project, this); } } diff --git a/python/src/com/jetbrains/python/run/PythonConfigurationType.java b/python/src/com/jetbrains/python/run/PythonConfigurationType.java index 28800517d1ae..cf0d1827297a 100644 --- a/python/src/com/jetbrains/python/run/PythonConfigurationType.java +++ b/python/src/com/jetbrains/python/run/PythonConfigurationType.java @@ -30,7 +30,7 @@ public class PythonConfigurationType implements ConfigurationType { @Override @NotNull - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new PythonRunConfiguration(project, this); } } diff --git a/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java b/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java index fda6c7bab79d..92525ab279f7 100644 --- a/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java +++ b/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 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-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. package com.jetbrains.python.testing; import com.google.common.collect.ObjectArrays; @@ -15,7 +13,6 @@ import com.jetbrains.python.testing.doctest.PythonDocTestRunConfiguration; import com.jetbrains.python.testing.nosetestLegacy.PythonNoseTestRunConfiguration; import com.jetbrains.python.testing.pytestLegacy.PyTestRunConfiguration; import com.jetbrains.python.testing.unittestLegacy.PythonUnitTestRunConfiguration; -import com.jetbrains.python.testing.PyTestLegacyInteropKt; import icons.PythonIcons; import org.jetbrains.annotations.NotNull; @@ -65,7 +62,7 @@ public final class PythonTestConfigurationType implements ConfigurationType { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new PythonUnitTestRunConfiguration(project, this); } @@ -82,7 +79,7 @@ public final class PythonTestConfigurationType implements ConfigurationType { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new PythonDocTestRunConfiguration(project, this); } @@ -99,7 +96,7 @@ public final class PythonTestConfigurationType implements ConfigurationType { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new PyTestRunConfiguration(project, this); } @@ -116,7 +113,7 @@ public final class PythonTestConfigurationType implements ConfigurationType { @NotNull @Override - public RunConfiguration createTemplateConfiguration(Project project) { + public RunConfiguration createTemplateConfiguration(@NotNull Project project) { return new PythonNoseTestRunConfiguration(project, this); }