From dec4bc1bba911267bd3e914c9b07222b123b01ec Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Sat, 14 Jan 2017 05:06:54 +0300 Subject: [PATCH] ATTest removed * Beta version does not have any updates since 2012 --- .../src/com/jetbrains/python/PyNames.java | 2 - python/src/META-INF/python-core-common.xml | 1 - .../com/jetbrains/python/PyBundle.properties | 3 - .../com/jetbrains/python/PythonHelper.java | 1 - .../PyIntegratedToolsConfigurable.java | 6 - .../PyIntegratedToolsProjectConfigurator.java | 9 -- .../testing/PythonTestConfigurationType.java | 20 +--- .../PythonTestConfigurationsModel.java | 1 - .../python/testing/TestRunnerService.java | 1 - .../testing/VFSTestFrameworkListener.java | 20 +--- .../attest/PythonAtTestCommandLineState.java | 76 ------------- .../PythonAtTestConfigurationProducer.java | 103 ------------------ .../attest/PythonAtTestRunConfiguration.java | 87 --------------- .../PythonAtTestRunConfigurationEditor.java | 51 --------- .../PythonAtTestRunConfigurationForm.java | 55 ---------- .../PythonAtTestRunConfigurationParams.java | 26 ----- 16 files changed, 3 insertions(+), 459 deletions(-) delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestCommandLineState.java delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestConfigurationProducer.java delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfiguration.java delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationEditor.java delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationForm.java delete mode 100644 python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationParams.java diff --git a/python/psi-api/src/com/jetbrains/python/PyNames.java b/python/psi-api/src/com/jetbrains/python/PyNames.java index 43f3138b2676..aca311aaeaab 100644 --- a/python/psi-api/src/com/jetbrains/python/PyNames.java +++ b/python/psi-api/src/com/jetbrains/python/PyNames.java @@ -203,8 +203,6 @@ public class PyNames { public static final String NOSE_TEST = "nose"; public static final String PY_TEST = "pytest"; - public static final String AT_TEST = "Attest"; - public static final String AT_TEST_IMPORT = "attest"; public static final String TEST_CASE = "TestCase"; diff --git a/python/src/META-INF/python-core-common.xml b/python/src/META-INF/python-core-common.xml index 51325faaae08..c440388b5be3 100644 --- a/python/src/META-INF/python-core-common.xml +++ b/python/src/META-INF/python-core-common.xml @@ -159,7 +159,6 @@ - diff --git a/python/src/com/jetbrains/python/PyBundle.properties b/python/src/com/jetbrains/python/PyBundle.properties index 0be82887a36b..aa7aba62b860 100644 --- a/python/src/com/jetbrains/python/PyBundle.properties +++ b/python/src/com/jetbrains/python/PyBundle.properties @@ -813,9 +813,6 @@ runcfg.pytest.target=&Target: runcfg.pytest.parameters=&Options: runcfg.pytest.keywords=&Keywords: -### attest run conf -runcfg.attest.display_name=Attests -runcfg.attest.description=Python's attests run configuration ### test run configuration runcfg.test.display_name=Python tests diff --git a/python/src/com/jetbrains/python/PythonHelper.java b/python/src/com/jetbrains/python/PythonHelper.java index 383057e7498d..9c88ffe9b44d 100644 --- a/python/src/com/jetbrains/python/PythonHelper.java +++ b/python/src/com/jetbrains/python/PythonHelper.java @@ -54,7 +54,6 @@ public enum PythonHelper implements HelperPackage { SETUPPY("pycharm", "pycharm_setup_runner"), NOSE("pycharm", "noserunner"), PYTEST("pycharm", "pytestrunner"), - ATTEST("pycharm", "attestrunner"), DOCSTRING("pycharm", "docrunner"), BEHAVE("pycharm", "behave_runner"), diff --git a/python/src/com/jetbrains/python/configuration/PyIntegratedToolsConfigurable.java b/python/src/com/jetbrains/python/configuration/PyIntegratedToolsConfigurable.java index 35825d8807cd..c82dc933c84e 100644 --- a/python/src/com/jetbrains/python/configuration/PyIntegratedToolsConfigurable.java +++ b/python/src/com/jetbrains/python/configuration/PyIntegratedToolsConfigurable.java @@ -144,12 +144,6 @@ public class PyIntegratedToolsConfigurable implements SearchableConfigurable { createQuickFix(sdk, facetErrorPanel, PyNames.NOSE_TEST)); } } - else if (PythonTestConfigurationsModel.PYTHONS_ATTEST_NAME.equals(selectedItem)) { - if (!VFSTestFrameworkListener.getInstance().isAtTestInstalled(sdk)) { - return new ValidationResult(PyBundle.message("runcfg.testing.no.test.framework", "attest"), - createQuickFix(sdk, facetErrorPanel, PyNames.AT_TEST)); - } - } } return ValidationResult.OK; } diff --git a/python/src/com/jetbrains/python/testing/PyIntegratedToolsProjectConfigurator.java b/python/src/com/jetbrains/python/testing/PyIntegratedToolsProjectConfigurator.java index f0d866528bd1..d9293e4347c1 100644 --- a/python/src/com/jetbrains/python/testing/PyIntegratedToolsProjectConfigurator.java +++ b/python/src/com/jetbrains/python/testing/PyIntegratedToolsProjectConfigurator.java @@ -119,13 +119,10 @@ public class PyIntegratedToolsProjectConfigurator implements DirectoryProjectCon if (packages != null) { final boolean nose = PyPackageUtil.findPackage(packages, PyNames.NOSE_TEST) != null; final boolean pytest = PyPackageUtil.findPackage(packages, PyNames.PY_TEST) != null; - final boolean attest = PyPackageUtil.findPackage(packages, PyNames.AT_TEST) != null; if (nose) testRunner = PythonTestConfigurationsModel.PYTHONS_NOSETEST_NAME; else if (pytest) testRunner = PythonTestConfigurationsModel.PY_TEST_NAME; - else if (attest) - testRunner = PythonTestConfigurationsModel.PYTHONS_ATTEST_NAME; if (!testRunner.isEmpty()) { LOG.debug("Test runner '" + testRunner + "' was detected from SDK " + sdk); } @@ -166,9 +163,6 @@ public class PyIntegratedToolsProjectConfigurator implements DirectoryProjectCon if (stringValue.contains(PyNames.PY_TEST)) { return PythonTestConfigurationsModel.PY_TEST_NAME; } - if (stringValue.contains(PyNames.AT_TEST_IMPORT)) { - return PythonTestConfigurationsModel.PYTHONS_ATTEST_NAME; - } } } return ""; @@ -211,9 +205,6 @@ public class PyIntegratedToolsProjectConfigurator implements DirectoryProjectCon if (PyNames.PY_TEST.equals(importElement.getVisibleName())) { return PythonTestConfigurationsModel.PY_TEST_NAME; } - if (PyNames.AT_TEST_IMPORT.equals(importElement.getVisibleName())) { - return PythonTestConfigurationsModel.PYTHONS_ATTEST_NAME; - } } } return ""; diff --git a/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java b/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java index 61d68ded7808..4aef83b4c273 100644 --- a/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java +++ b/python/src/com/jetbrains/python/testing/PythonTestConfigurationType.java @@ -22,7 +22,6 @@ import com.intellij.execution.configurations.RunConfiguration; import com.intellij.openapi.project.Project; import com.jetbrains.python.PyBundle; import com.jetbrains.python.run.PythonConfigurationFactoryBase; -import com.jetbrains.python.testing.attest.PythonAtTestRunConfiguration; import com.jetbrains.python.testing.doctest.PythonDocTestRunConfiguration; import com.jetbrains.python.testing.nosetest.PythonNoseTestRunConfiguration; import com.jetbrains.python.testing.pytest.PyTestRunConfiguration; @@ -42,7 +41,6 @@ public class PythonTestConfigurationType implements ConfigurationType { public final PythonUnitTestConfigurationFactory PY_UNITTEST_FACTORY = new PythonUnitTestConfigurationFactory(this); public final PythonNoseTestConfigurationFactory PY_NOSETEST_FACTORY = new PythonNoseTestConfigurationFactory(this); public final PythonPyTestConfigurationFactory PY_PYTEST_FACTORY = new PythonPyTestConfigurationFactory(this); - public final PythonAtTestConfigurationFactory PY_ATTEST_FACTORY = new PythonAtTestConfigurationFactory(this); public static PythonTestConfigurationType getInstance() { return ConfigurationTypeUtil.findConfigurationType(PythonTestConfigurationType.class); @@ -112,22 +110,6 @@ public class PythonTestConfigurationType implements ConfigurationType { } } - private static class PythonAtTestConfigurationFactory extends PythonConfigurationFactoryBase { - protected PythonAtTestConfigurationFactory(ConfigurationType configurationType) { - super(configurationType); - } - - @Override - public RunConfiguration createTemplateConfiguration(Project project) { - return new PythonAtTestRunConfiguration(project, this); - } - - @Override - public String getName() { - return PyBundle.message("runcfg.attest.display_name"); - } - } - @Override public String getDisplayName() { return PyBundle.message("runcfg.test.display_name"); @@ -152,6 +134,6 @@ public class PythonTestConfigurationType implements ConfigurationType { @Override public ConfigurationFactory[] getConfigurationFactories() { return new ConfigurationFactory[] {PY_UNITTEST_FACTORY, PY_DOCTEST_FACTORY, PY_NOSETEST_FACTORY, - PY_PYTEST_FACTORY, PY_ATTEST_FACTORY}; + PY_PYTEST_FACTORY}; } } diff --git a/python/src/com/jetbrains/python/testing/PythonTestConfigurationsModel.java b/python/src/com/jetbrains/python/testing/PythonTestConfigurationsModel.java index 9a8757e690a1..76224585ab99 100644 --- a/python/src/com/jetbrains/python/testing/PythonTestConfigurationsModel.java +++ b/python/src/com/jetbrains/python/testing/PythonTestConfigurationsModel.java @@ -30,7 +30,6 @@ public class PythonTestConfigurationsModel extends CollectionComboBoxModel { public static final String PYTHONS_UNITTEST_NAME = PyBundle.message("runcfg.unittest.display_name"); public static final String PYTHONS_NOSETEST_NAME = PyBundle.message("runcfg.nosetests.display_name"); public static final String PY_TEST_NAME = PyBundle.message("runcfg.pytest.display_name"); - public static final String PYTHONS_ATTEST_NAME = PyBundle.message("runcfg.attest.display_name"); private String myTestRunner; private Module myModule; diff --git a/python/src/com/jetbrains/python/testing/TestRunnerService.java b/python/src/com/jetbrains/python/testing/TestRunnerService.java index d6439e43e56b..4216c28f7f69 100644 --- a/python/src/com/jetbrains/python/testing/TestRunnerService.java +++ b/python/src/com/jetbrains/python/testing/TestRunnerService.java @@ -37,7 +37,6 @@ public class TestRunnerService implements PersistentStateComponent getConfigurations() { diff --git a/python/src/com/jetbrains/python/testing/VFSTestFrameworkListener.java b/python/src/com/jetbrains/python/testing/VFSTestFrameworkListener.java index 3f655edde3da..aefc504b36f5 100644 --- a/python/src/com/jetbrains/python/testing/VFSTestFrameworkListener.java +++ b/python/src/com/jetbrains/python/testing/VFSTestFrameworkListener.java @@ -73,8 +73,7 @@ public class VFSTestFrameworkListener { final String path = event.getPath(); final boolean containsNose = path.contains(PyNames.NOSE_TEST); final boolean containsPy = path.contains("py-1") || path.contains(PyNames.PY_TEST); - final boolean containsAt = path.contains(PyNames.AT_TEST); - if (!containsAt && !containsNose && !containsPy) continue; + if (!containsNose && !containsPy) continue; for (Sdk sdk : PythonSdkType.getAllSdks()) { if (PySdkUtil.isRemote(sdk)) { continue; @@ -90,10 +89,6 @@ public class VFSTestFrameworkListener { scheduleTestFrameworkCheck(sdk, PyNames.PY_TEST); return; } - else { - scheduleTestFrameworkCheck(sdk, PyNames.AT_TEST); - return; - } } } } @@ -104,7 +99,7 @@ public class VFSTestFrameworkListener { } public void updateAllTestFrameworks(@NotNull Sdk sdk) { - final Map whichInstalled = checkTestFrameworksInstalled(sdk, PyNames.PY_TEST, PyNames.NOSE_TEST, PyNames.AT_TEST); + final Map whichInstalled = checkTestFrameworksInstalled(sdk, PyNames.PY_TEST, PyNames.NOSE_TEST); ApplicationManager.getApplication().invokeLater(() -> { for (Map.Entry entry : whichInstalled.entrySet()) { final Boolean installed = entry.getValue(); @@ -191,14 +186,6 @@ public class VFSTestFrameworkListener { myService.SDK_TO_ATTEST.put(sdkHome, installed); } - public boolean isAtTestInstalled(@NotNull Sdk sdk) { - final Boolean isInstalled = myService.SDK_TO_ATTEST.get(sdk.getHomePath()); - if (isInstalled == null) { - scheduleTestFrameworkCheck(sdk, PyNames.AT_TEST); - return true; - } - return isInstalled; - } public void setTestFrameworkInstalled(boolean installed, @NotNull String sdkHome, @NotNull String name) { switch (name) { @@ -208,9 +195,6 @@ public class VFSTestFrameworkListener { case PyNames.PY_TEST: setPyTestInstalled(installed, sdkHome); break; - case PyNames.AT_TEST: - setAtTestInstalled(installed, sdkHome); - break; } } } diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestCommandLineState.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestCommandLineState.java deleted file mode 100644 index a4e6b76c154c..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestCommandLineState.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.intellij.execution.runners.ExecutionEnvironment; -import com.intellij.openapi.util.io.FileUtil; -import com.jetbrains.python.PythonHelper; -import com.jetbrains.python.testing.PythonTestCommandLineStateBase; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.List; - -/** - * User: catherine - */ -public class PythonAtTestCommandLineState extends PythonTestCommandLineStateBase { - private final PythonAtTestRunConfiguration myConfig; - - - public PythonAtTestCommandLineState(PythonAtTestRunConfiguration runConfiguration, ExecutionEnvironment env) { - super(runConfiguration, env); - myConfig = runConfiguration; - } - - @Override - protected PythonHelper getRunner() { - return PythonHelper.ATTEST; - } - - @NotNull - protected List getTestSpecs() { - List specs = new ArrayList<>(); - - final String scriptName = FileUtil.toSystemDependentName(myConfig.getScriptName()); - switch (myConfig.getTestType()) { - case TEST_SCRIPT: - specs.add(scriptName); - break; - case TEST_CLASS: - specs.add(scriptName + "::" + myConfig.getClassName()); - break; - case TEST_METHOD: - specs.add(scriptName + "::" + myConfig.getClassName() + "::" + myConfig.getMethodName()); - break; - case TEST_FOLDER: - final String folderName = FileUtil.toSystemDependentName(myConfig.getFolderName() + "/"); - if (!myConfig.getPattern().isEmpty()) { - specs.add(folderName + ";" + myConfig.getPattern()); - } - else - specs.add(folderName); - break; - case TEST_FUNCTION: - specs.add(scriptName + "::::" + myConfig.getMethodName()); - break; - default: - throw new IllegalArgumentException("Unknown test type: " + myConfig.getTestType()); - } - - return specs; - } -} diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestConfigurationProducer.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestConfigurationProducer.java deleted file mode 100644 index a278d8e1fd5e..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestConfigurationProducer.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.google.common.collect.Lists; -import com.intellij.execution.Location; -import com.intellij.openapi.module.Module; -import com.intellij.openapi.module.ModuleUtilCore; -import com.intellij.openapi.projectRoots.Sdk; -import com.intellij.psi.PsiElement; -import com.jetbrains.python.psi.*; -import com.jetbrains.python.psi.types.PyClassLikeType; -import com.jetbrains.python.psi.types.TypeEvalContext; -import com.jetbrains.python.sdk.PythonSdkType; -import com.jetbrains.python.testing.*; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.List; -/** - * User: catherine - */ -public class PythonAtTestConfigurationProducer extends - PythonTestConfigurationProducer { - public PythonAtTestConfigurationProducer() { - super(PythonTestConfigurationType.getInstance().PY_ATTEST_FACTORY); - } - - protected boolean isAvailable(@NotNull final Location location) { - final PsiElement element = location.getPsiElement(); - Module module = location.getModule(); - if (module == null) module = ModuleUtilCore.findModuleForPsiElement(element); - - final Sdk sdk = PythonSdkType.findPythonSdk(module); - return module != null && TestRunnerService.getInstance(module).getProjectConfiguration().equals( - PythonTestConfigurationsModel.PYTHONS_ATTEST_NAME) && sdk != null; - } - - @Override - protected boolean isTestClass(@NotNull final PyClass pyClass, - @Nullable final AbstractPythonTestRunConfiguration configuration, - @Nullable final TypeEvalContext context) { - for (PyClassLikeType type : pyClass.getAncestorTypes(TypeEvalContext.codeInsightFallback(pyClass.getProject()))) { - if (type != null && "TestBase".equals(type.getName()) && hasTestFunction(pyClass)) { - return true; - } - } - return false; - } - - private static boolean hasTestFunction(@NotNull final PyClass pyClass) { - PyFunction[] methods = pyClass.getMethods(); - for (PyFunction function : methods) { - PyDecoratorList decorators = function.getDecoratorList(); - if (decorators == null) continue; - for (PyDecorator decorator : decorators.getDecorators()) { - if ("test".equals(decorator.getName()) || "test_if".equals(decorator.getName())) - return true; - } - } - return false; - } - - protected boolean isTestFunction(@NotNull final PyFunction pyFunction, - @Nullable final AbstractPythonTestRunConfiguration configuration) { - PyDecoratorList decorators = pyFunction.getDecoratorList(); - if (decorators == null) return false; - for (PyDecorator decorator : decorators.getDecorators()) { - if ("test".equals(decorator.getName()) || "test_if".equals(decorator.getName())) - return true; - } - return false; - } - - protected List getTestCaseClassesFromFile(@NotNull final PyFile file) { - List result = Lists.newArrayList(); - for (PyClass cls : file.getTopLevelClasses()) { - if (isTestClass(cls, null, null)) { - result.add(cls); - } - } - - for (PyFunction cls : file.getTopLevelFunctions()) { - if (isTestFunction(cls, null)) { - result.add(cls); - } - } - return result; - } -} \ No newline at end of file diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfiguration.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfiguration.java deleted file mode 100644 index 54a6836b7f40..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfiguration.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.intellij.execution.ExecutionException; -import com.intellij.execution.Executor; -import com.intellij.execution.configurations.*; -import com.intellij.execution.runners.ExecutionEnvironment; -import com.intellij.openapi.options.SettingsEditor; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.projectRoots.Sdk; -import com.intellij.openapi.util.InvalidDataException; -import com.intellij.openapi.util.WriteExternalException; -import com.jetbrains.python.PyBundle; -import com.jetbrains.python.sdk.PythonSdkType; -import com.jetbrains.python.testing.AbstractPythonTestRunConfiguration; -import com.jetbrains.python.testing.VFSTestFrameworkListener; -import org.jdom.Element; -import org.jetbrains.annotations.NotNull; - -/** - * User: catherine - */ -public class PythonAtTestRunConfiguration extends AbstractPythonTestRunConfiguration - implements PythonAtTestRunConfigurationParams { - protected String myTitle = "Attest"; - protected String myPluralTitle = "Attests"; - public PythonAtTestRunConfiguration(Project project, - ConfigurationFactory configurationFactory) { - super(project, configurationFactory); - } - - @Override - protected SettingsEditor createConfigurationEditor() { - return new PythonAtTestRunConfigurationEditor(getProject(), this); - } - - @Override - public RunProfileState getState(@NotNull final Executor executor, @NotNull final ExecutionEnvironment env) throws ExecutionException { - return new PythonAtTestCommandLineState(this, env); - } - - @Override - public void readExternal(Element element) throws InvalidDataException { - super.readExternal(element); - } - - @Override - public void writeExternal(Element element) throws WriteExternalException { - super.writeExternal(element); - } - - @Override - protected String getTitle() { - return myTitle; - } - - @Override - protected String getPluralTitle() { - return myPluralTitle; - } - - public static void copyParams(PythonAtTestRunConfigurationParams source, PythonAtTestRunConfigurationParams target) { - copyParams(source.getTestRunConfigurationParams(), target.getTestRunConfigurationParams()); - } - - @Override - public void checkConfiguration() throws RuntimeConfigurationException { - super.checkConfiguration(); - Sdk sdkPath = PythonSdkType.findSdkByPath(getInterpreterPath()); - if (sdkPath != null && !VFSTestFrameworkListener.getInstance().isAtTestInstalled(sdkPath)) - throw new RuntimeConfigurationWarning(PyBundle.message("runcfg.testing.no.test.framework", "attest")); - } -} diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationEditor.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationEditor.java deleted file mode 100644 index 216ff8f56725..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationEditor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.intellij.openapi.options.ConfigurationException; -import com.intellij.openapi.options.SettingsEditor; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; - -/** - * User: catherine - */ -public class PythonAtTestRunConfigurationEditor extends SettingsEditor { - private PythonAtTestRunConfigurationForm myForm; - - public PythonAtTestRunConfigurationEditor(final Project project, final PythonAtTestRunConfiguration configuration) { - myForm = new PythonAtTestRunConfigurationForm(project, configuration); - } - - protected void resetEditorFrom(@NotNull final PythonAtTestRunConfiguration config) { - PythonAtTestRunConfiguration.copyParams(config, myForm); - } - - protected void applyEditorTo(@NotNull final PythonAtTestRunConfiguration config) throws ConfigurationException { - PythonAtTestRunConfiguration.copyParams(myForm, config); - } - - @NotNull - protected JComponent createEditor() { - return myForm.getPanel(); - } - - protected void disposeEditor() { - myForm = null; - } -} diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationForm.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationForm.java deleted file mode 100644 index dfe6305cdd95..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationForm.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.intellij.openapi.project.Project; -import com.jetbrains.python.PyBundle; -import com.jetbrains.python.testing.AbstractPythonTestRunConfigurationParams; -import com.jetbrains.python.testing.PythonTestRunConfigurationForm; - -import javax.swing.*; -import javax.swing.border.TitledBorder; -import java.awt.*; - -/** - * User: catherine - */ -public class PythonAtTestRunConfigurationForm implements PythonAtTestRunConfigurationParams { - private JPanel myRootPanel; - - private final PythonTestRunConfigurationForm myTestRunConfigurationForm; - - - public PythonAtTestRunConfigurationForm(final Project project, final PythonAtTestRunConfiguration configuration) { - myRootPanel = new JPanel(new BorderLayout()); - myTestRunConfigurationForm = new PythonTestRunConfigurationForm(project, configuration); - TitledBorder border = (TitledBorder)myTestRunConfigurationForm.getTestsPanel().getBorder(); - border.setTitle(PyBundle.message("runcfg.attest.display_name")); - - myRootPanel.add(myTestRunConfigurationForm.getPanel(), BorderLayout.CENTER); - } - - @Override - public AbstractPythonTestRunConfigurationParams getTestRunConfigurationParams() { - return myTestRunConfigurationForm; - } - - public JComponent getPanel() { - return myRootPanel; - } -} - - diff --git a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationParams.java b/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationParams.java deleted file mode 100644 index fa4d1d716a3e..000000000000 --- a/python/src/com/jetbrains/python/testing/attest/PythonAtTestRunConfigurationParams.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.jetbrains.python.testing.attest; - -import com.jetbrains.python.testing.AbstractPythonTestRunConfigurationParams; - -/** - * User: catherine - */ -public interface PythonAtTestRunConfigurationParams { - AbstractPythonTestRunConfigurationParams getTestRunConfigurationParams(); - -}