diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/Java9UnusedServiceImplementationsTest.kt b/java/java-tests/testSrc/com/intellij/codeInspection/Java9UnusedServiceImplementationsTest.kt index 1976ef5ebe94..c423f01fdb51 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/Java9UnusedServiceImplementationsTest.kt +++ b/java/java-tests/testSrc/com/intellij/codeInspection/Java9UnusedServiceImplementationsTest.kt @@ -16,16 +16,16 @@ package com.intellij.codeInspection import com.intellij.analysis.AnalysisScope -import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection -import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper import com.intellij.idea.Bombed import com.intellij.openapi.application.ex.PathManagerEx import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil.loadFileText +import com.intellij.testFramework.InspectionTestCase import com.intellij.testFramework.InspectionTestUtil import com.intellij.testFramework.createGlobalContextForTool import com.intellij.testFramework.fixtures.LightJava9ModulesCodeInsightFixtureTestCase -import com.intellij.testFramework.fixtures.MultiModuleJava9ProjectDescriptor.ModuleDescriptor.* +import com.intellij.testFramework.fixtures.MultiModuleJava9ProjectDescriptor.ModuleDescriptor.M2 +import com.intellij.testFramework.fixtures.MultiModuleJava9ProjectDescriptor.ModuleDescriptor.MAIN import org.intellij.lang.annotations.Language import org.jetbrains.annotations.NonNls @@ -78,7 +78,7 @@ class Java9UnusedServiceImplementationsTest : LightJava9ModulesCodeInsightFixtur val implText = String(loadFileText(sourceFile!!)) addFile("my/impl/MyServiceImpl.java", implText, M2) - val toolWrapper = GlobalInspectionToolWrapper(UnusedDeclarationInspection()) + val toolWrapper = InspectionTestCase.getUnusedDeclarationWrapper() val scope = AnalysisScope(project) val globalContext = createGlobalContextForTool(scope, project, listOf(toolWrapper)) InspectionTestUtil.runTool(toolWrapper, scope, globalContext) diff --git a/java/testFramework/src/com/intellij/testFramework/InspectionTestCase.java b/java/testFramework/src/com/intellij/testFramework/InspectionTestCase.java index 5ad8b8655f5b..5f384c27294e 100644 --- a/java/testFramework/src/com/intellij/testFramework/InspectionTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/InspectionTestCase.java @@ -62,7 +62,7 @@ public abstract class InspectionTestCase extends PsiTestCase { private EntryPoint myUnusedCodeExtension; private VirtualFile ext_src; - protected static GlobalInspectionToolWrapper getUnusedDeclarationWrapper() { + public static GlobalInspectionToolWrapper getUnusedDeclarationWrapper() { InspectionEP ep = new InspectionEP(); ep.presentation = UnusedDeclarationPresentation.class.getName(); ep.implementationClass = UnusedDeclarationInspection.class.getName();