mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
lock-free access to allSettings list
remove duplicated method getSortedConfigurations (already existed in the API method `allSettings` should be used instead)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -25,9 +25,6 @@ import com.intellij.util.messages.MessageBus;
|
||||
import com.jetbrains.python.run.AbstractPythonRunConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
@@ -37,8 +34,7 @@ public class PyModuleListener {
|
||||
@Override
|
||||
public void beforeModuleRemoved(@NotNull Project project, @NotNull Module module) {
|
||||
final RunManagerEx runManager = RunManagerEx.getInstanceEx(project);
|
||||
final Collection<RunnerAndConfigurationSettings> configurations = new ArrayList<>(runManager.getSortedConfigurations());
|
||||
for (RunnerAndConfigurationSettings configuration : configurations) {
|
||||
for (RunnerAndConfigurationSettings configuration : runManager.getAllSettings()) {
|
||||
if (configuration.getConfiguration() instanceof AbstractPythonRunConfiguration) {
|
||||
final Module configModule = ((AbstractPythonRunConfiguration)configuration.getConfiguration()).getModule();
|
||||
if (configModule == module) {
|
||||
|
||||
Reference in New Issue
Block a user