cleanup — remove unused NamedScopeManager param

This commit is contained in:
Vladimir Krivosheev
2019-01-07 17:03:58 +01:00
parent c196e66f24
commit 7272c19b89
2 changed files with 7 additions and 14 deletions
@@ -1,4 +1,4 @@
// 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.
// 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.packageDependencies;
import com.intellij.icons.AllIcons;
@@ -58,8 +58,9 @@ public class DependencyValidationManagerImpl extends DependencyValidationManager
@NonNls private static final String UNNAMED_SCOPE = "unnamed_scope";
@NonNls private static final String VALUE = "value";
public DependencyValidationManagerImpl(final Project project, NamedScopeManager namedScopeManager) {
public DependencyValidationManagerImpl(@NotNull Project project, @NotNull NamedScopeManager namedScopeManager) {
super(project);
myNamedScopeManager = namedScopeManager;
namedScopeManager.addScopeListener(() -> reloadScopes());
}
@@ -1,5 +1,4 @@
// 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.
// 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.codeInsight.daemon.impl;
import com.intellij.codeHighlighting.BackgroundEditorHighlighter;
@@ -53,7 +52,6 @@ import com.intellij.openapi.vfs.newvfs.RefreshQueueImpl;
import com.intellij.packageDependencies.DependencyValidationManager;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiDocumentManagerBase;
import com.intellij.psi.search.scope.packageSet.NamedScopeManager;
import com.intellij.psi.util.PsiModificationTracker;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.*;
@@ -114,8 +112,8 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
@NotNull DaemonCodeAnalyzerSettings daemonCodeAnalyzerSettings,
@NotNull EditorTracker editorTracker,
@NotNull PsiDocumentManager psiDocumentManager,
@NotNull final NamedScopeManager namedScopeManager,
@NotNull final DependencyValidationManager dependencyValidationManager) {
// DependencyValidationManagerImpl adds scope listener, so, we need to force service creation
@SuppressWarnings("unused") @NotNull DependencyValidationManager dependencyValidationManager) {
myProject = project;
mySettings = daemonCodeAnalyzerSettings;
myEditorTracker = editorTracker;
@@ -911,8 +909,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
ApplicationManager.getApplication().assertIsDispatchThread();
// Editors in modal context
List<Editor> editors = getActiveEditors();
List<Editor> editors = myEditorTracker.getActiveEditors();
Collection<FileEditor> activeTextEditors = new THashSet<>(editors.size());
for (Editor editor : editors) {
if (editor.isDisposed()) continue;
@@ -947,11 +944,6 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
return result;
}
@NotNull
private List<Editor> getActiveEditors() {
return myEditorTracker.getActiveEditors();
}
@TestOnly
private static void wrap(@NotNull ThrowableRunnable runnable) {
try {