use of com.intellij.codeInsight.daemon.UnusedImportProvider in project intellij-community by JetBrains.
the class PostHighlightingVisitor method isUnusedImportEnabled.
private boolean isUnusedImportEnabled(HighlightDisplayKey unusedImportKey) {
InspectionProfile profile = InspectionProjectProfileManager.getInstance(myProject).getCurrentProfile();
if (profile.isToolEnabled(unusedImportKey, myFile) && myFile instanceof PsiJavaFile && HighlightingLevelManager.getInstance(myProject).shouldInspect(myFile)) {
return true;
}
final ImplicitUsageProvider[] implicitUsageProviders = Extensions.getExtensions(ImplicitUsageProvider.EP_NAME);
for (ImplicitUsageProvider provider : implicitUsageProviders) {
if (provider instanceof UnusedImportProvider && ((UnusedImportProvider) provider).isUnusedImportEnabled(myFile))
return true;
}
return false;
}
Aggregations