IDEA-CR-48664 cleanup method name

GitOrigin-RevId: c3af55e903eb78d9b94957b0a3ca9c0aeabdf4c5
This commit is contained in:
Vladislav.Soroka
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent 1540bf979e
commit 4292a95ad8
@@ -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-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.build;
import com.intellij.build.events.*;
@@ -148,7 +134,7 @@ public abstract class AbstractViewManager implements ViewManager, BuildProgressL
}
protected void onBuildFinish(BuildDescriptor buildDescriptor) {
clearOrphanIds(Collections.singleton(buildDescriptor));
clearIdsOf(Collections.singleton(buildDescriptor));
BuildInfo buildInfo = (BuildInfo)buildDescriptor;
if (buildInfo.result instanceof FailureResult) {
boolean activate = buildInfo.isActivateToolWindowWhenFailed();
@@ -184,10 +170,10 @@ public abstract class AbstractViewManager implements ViewManager, BuildProgressL
myPinnedViews.remove(buildsView);
}
clearOrphanIds(buildsView.getBuildsMap().keySet());
clearIdsOf(buildsView.getBuildsMap().keySet());
}
private void clearOrphanIds(@NotNull Collection<? extends BuildDescriptor> builds) {
private void clearIdsOf(@NotNull Collection<? extends BuildDescriptor> builds) {
if (idsMap.isEmpty()) return;
Set ids = builds.stream().map(BuildDescriptor::getId).collect(Collectors.toSet());
idsMap.values().removeIf(val -> ids.contains(val));