From 51620ad2fe1ef7e5c69d72d51f9092f6a78ef2da Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Thu, 28 Feb 2013 15:21:16 +0400 Subject: [PATCH] cleanup --- .../theoryinpractice/testng/TestNGReferenceContributor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/testng/src/com/theoryinpractice/testng/TestNGReferenceContributor.java b/plugins/testng/src/com/theoryinpractice/testng/TestNGReferenceContributor.java index 6895ccd94f03..840dce8de9b6 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/TestNGReferenceContributor.java +++ b/plugins/testng/src/com/theoryinpractice/testng/TestNGReferenceContributor.java @@ -26,8 +26,6 @@ import com.intellij.codeInsight.AnnotationUtil; import com.intellij.codeInsight.completion.CompletionUtil; import com.intellij.codeInsight.lookup.LookupValueFactory; import com.intellij.codeInspection.InspectionProfile; -import com.intellij.codeInspection.InspectionProfileEntry; -import com.intellij.codeInspection.ex.LocalInspectionToolWrapper; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.text.StringUtil; @@ -248,8 +246,8 @@ public class TestNGReferenceContributor extends PsiReferenceContributor { List list = new ArrayList(); InspectionProfile inspectionProfile = InspectionProjectProfileManager.getInstance(myProject).getInspectionProfile(); - final InspectionProfileEntry inspectionTool = inspectionProfile.getInspectionTool(DependsOnGroupsInspection.SHORT_NAME, myElement); - DependsOnGroupsInspection inspection = (DependsOnGroupsInspection)((LocalInspectionToolWrapper)inspectionTool).getTool(); + DependsOnGroupsInspection inspection = (DependsOnGroupsInspection)inspectionProfile.getUnwrappedTool( + DependsOnGroupsInspection.SHORT_NAME, myElement); for (String groupName : inspection.groups) { list.add(LookupValueFactory.createLookupValue(groupName, null));