use ConfigurationType.CONFIGURATION_TYPE_EP directly, cleanup

This commit is contained in:
Vladimir Krivosheev
2018-09-04 13:25:42 +02:00
parent 13f29c85b9
commit 40856e13e1
3 changed files with 8 additions and 40 deletions

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 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.
*/
// 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.testIntegration;
import com.intellij.execution.RunManagerEx;
@@ -37,12 +23,12 @@ interface ConfigurationByRecordProvider {
class RunConfigurationByRecordProvider implements ConfigurationByRecordProvider {
private final Project myProject;
private final Map<Integer, RunnerAndConfigurationSettings> myConfigurationsMap = ContainerUtil.newHashMap();
public RunConfigurationByRecordProvider(Project project) {
myProject = project;
initRunConfigurationsMap();
}
@Override
public RunnerAndConfigurationSettings getConfiguration(TestStateStorage.Record record) {
Integer runConfigurationHash = new Integer((int)record.configurationHash);
@@ -51,7 +37,7 @@ class RunConfigurationByRecordProvider implements ConfigurationByRecordProvider
private void initRunConfigurationsMap() {
RunManagerEx manager = RunManagerEx.getInstanceEx(myProject);
for (ConfigurationType type : manager.getConfigurationFactories()) {
for (ConfigurationType type : ConfigurationType.CONFIGURATION_TYPE_EP.getExtensionList()) {
Map<String, List<RunnerAndConfigurationSettings>> structure = manager.getStructure(type);
for (Map.Entry<String, List<RunnerAndConfigurationSettings>> e : structure.entrySet()) {
for (RunnerAndConfigurationSettings settings : e.getValue()) {
@@ -98,7 +84,7 @@ public class RecentTestsListProvider {
if (runConfiguration == null) {
return;
}
if (TestLocator.isSuite(url)) {
SuiteEntry entry = new SuiteEntry(url, record.date, runConfiguration);
data.addSuite(entry);