js: filter unresolved reference inspection visitors by reference place
authorKonstantin Ulitin <konstantin.ulitin@jetbrains.com>
Thu, 24 Sep 2020 09:51:11 +0000 (11:51 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 24 Sep 2020 10:25:11 +0000 (10:25 +0000)
GitOrigin-RevId: 42a1697711905da3bd2dedb46028f72877e0032c

AngularJS/src/org/angular2/inspections/Angular2AnalysisHandlersFactory.java
AngularJS/src/org/angular2/inspections/Angular2TemplateInspectionsProvider.java
flex/src/com/intellij/lang/javascript/inspections/actionscript/ActionScriptAnalysisHandlersFactory.java
flex/src/com/intellij/lang/javascript/inspections/actionscript/ActionScriptReferenceChecker.java
vuejs/src/org/jetbrains/vuejs/inspections/VueAnalysisHandlersFactory.kt

index 60738632c91184bd5083edb84cc526beb01c5daa..bc0472c26e9e4401decca995c9ac3df5800ff31e 100644 (file)
@@ -12,8 +12,8 @@ import com.intellij.lang.javascript.psi.JSReferenceExpression;
 import com.intellij.lang.javascript.psi.JSThisExpression;
 import com.intellij.lang.javascript.psi.ecmal4.JSClass;
 import com.intellij.lang.javascript.psi.util.JSClassUtils;
+import com.intellij.lang.javascript.validation.JSProblemReporter;
 import com.intellij.lang.javascript.validation.JSReferenceChecker;
-import com.intellij.lang.javascript.validation.JSReferenceInspectionProblemReporter;
 import com.intellij.lang.javascript.validation.TypeScriptReferenceChecker;
 import com.intellij.lang.javascript.validation.fixes.CreateJSFunctionIntentionAction;
 import com.intellij.lang.javascript.validation.fixes.CreateJSVariableIntentionAction;
@@ -41,7 +41,7 @@ public class Angular2AnalysisHandlersFactory extends TypeScriptAnalysisHandlersF
   }
 
   @Override
-  public @NotNull JSReferenceChecker getReferenceChecker(@NotNull JSReferenceInspectionProblemReporter reporter) {
+  public @NotNull JSReferenceChecker getReferenceChecker(@NotNull JSProblemReporter<?> reporter) {
     return new TypeScriptReferenceChecker(reporter) {
       @Override
       protected void addCreateFromUsageFixesForCall(@NotNull JSReferenceExpression methodExpression,
index bfbaed4f3ca167a2c2892c557af8a7db899b389e..d548c7bb5320175ed2bfc29c645dc1b025fb869d 100644 (file)
@@ -9,7 +9,10 @@ import com.intellij.lang.javascript.inspections.JSUnresolvedFunctionInspection;
 import com.intellij.lang.javascript.inspections.JSUnresolvedVariableInspection;
 import com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection;
 import com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection;
-import com.intellij.lang.typescript.inspections.*;
+import com.intellij.lang.typescript.inspections.TypeScriptUnresolvedFunctionInspection;
+import com.intellij.lang.typescript.inspections.TypeScriptUnresolvedVariableInspection;
+import com.intellij.lang.typescript.inspections.TypeScriptValidateJSTypesInspection;
+import com.intellij.lang.typescript.inspections.TypeScriptValidateTypesInspection;
 import com.sixrr.inspectjs.validity.ThisExpressionReferencesGlobalObjectJSInspection;
 import org.jetbrains.annotations.NotNull;
 
@@ -34,7 +37,6 @@ public class Angular2TemplateInspectionsProvider implements InspectionToolProvid
       TypeScriptUnresolvedFunctionInspection.class,
       TypeScriptValidateTypesInspection.class,
       TypeScriptValidateJSTypesInspection.class,
-      TypeScriptAccessibilityCheckInspection.class,
 
       ThisExpressionReferencesGlobalObjectJSInspection.class,
       JSUnusedGlobalSymbolsInspection.class,
index ca1f65b4091c3d8375af3f652270e86eec66e928..8936afc111b7550a493f6fdd9a327ffebc9fe3ab 100644 (file)
@@ -27,7 +27,7 @@ public class ActionScriptAnalysisHandlersFactory extends JSAnalysisHandlersFacto
 
   @NotNull
   @Override
-  public JSReferenceChecker getReferenceChecker(@NotNull JSReferenceInspectionProblemReporter reporter) {
+  public JSReferenceChecker getReferenceChecker(@NotNull JSProblemReporter<?> reporter) {
     return new ActionScriptReferenceChecker(reporter);
   }
 
index 18fab97f42c698ecaeb9adcdb33726e3cb9ac2f4..8f07fecabd93c9613953e2dfa1f1246e4da504f2 100644 (file)
@@ -20,7 +20,7 @@ import com.intellij.lang.javascript.psi.resolve.ActionScriptResolveUtil;
 import com.intellij.lang.javascript.psi.resolve.JSResolveResult;
 import com.intellij.lang.javascript.psi.resolve.JSResolveUtil;
 import com.intellij.lang.javascript.psi.types.JSAnyType;
-import com.intellij.lang.javascript.validation.JSReferenceInspectionProblemReporter;
+import com.intellij.lang.javascript.validation.JSProblemReporter;
 import com.intellij.lang.javascript.validation.TypedJSReferenceChecker;
 import com.intellij.lang.javascript.validation.fixes.CreateFlexMobileViewIntentionAndFix;
 import com.intellij.lang.javascript.validation.fixes.CreateJSEventMethod;
@@ -42,7 +42,7 @@ import java.util.List;
 
 public class ActionScriptReferenceChecker extends TypedJSReferenceChecker {
 
-  public ActionScriptReferenceChecker(@NotNull JSReferenceInspectionProblemReporter reporter) {
+  public ActionScriptReferenceChecker(@NotNull JSProblemReporter<?> reporter) {
     super(reporter);
   }
 
index 5eb420f89a6dfa52c703daa4cec1d72c50ce8a6e..3ab3e4114a1eb5e624d423bd9888f1fa4d87c014 100644 (file)
@@ -63,7 +63,7 @@ class VueAnalysisHandlersFactory : JSAnalysisHandlersFactory() {
     }
   }
 
-  override fun getReferenceChecker(reporter: JSReferenceInspectionProblemReporter): JSReferenceChecker {
+  override fun getReferenceChecker(reporter: JSProblemReporter<*>): JSReferenceChecker {
     return object : JSReferenceChecker((reporter)) {
       override fun addCreateFromUsageFixes(node: JSReferenceExpression?,
                                            resolveResults: Array<out ResolveResult>?,