mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
allow show javascript own inspection results in inspection results view
This commit is contained in:
@@ -29,7 +29,7 @@ import com.intellij.psi.PsiFile;
|
||||
public class GlobalInspectionUtil {
|
||||
private static final String LOC_MARKER = " #loc";
|
||||
|
||||
static RefElement retrieveRefElement(PsiElement element, GlobalInspectionContext globalContext) {
|
||||
public static RefElement retrieveRefElement(PsiElement element, GlobalInspectionContext globalContext) {
|
||||
PsiFile elementFile = element.getContainingFile();
|
||||
RefElement refElement = globalContext.getRefManager().getReference(elementFile);
|
||||
if (refElement == null) {
|
||||
|
||||
@@ -101,6 +101,9 @@ public final class LocalInspectionToolWrapper extends DescriptorProviderInspecti
|
||||
final PsiNamedElement problemElement = myTool.getProblemElement(elt);
|
||||
|
||||
RefElement refElement = refManager.getReference(problemElement);
|
||||
if (refElement == null && problemElement != null) { // no need to loose collected results
|
||||
refElement = GlobalInspectionUtil.retrieveRefElement(elt, getContext());
|
||||
}
|
||||
List<ProblemDescriptor> elementProblems = problems.get(refElement);
|
||||
if (elementProblems == null) {
|
||||
elementProblems = new ArrayList<ProblemDescriptor>();
|
||||
|
||||
Reference in New Issue
Block a user