Lint: fix Lint additional checkers with the custom handlers

This commit is contained in:
Yan Zhulanow
2016-03-22 19:45:55 +03:00
parent 37a4d78347
commit 5cf5024d08
2 changed files with 36 additions and 24 deletions
@@ -1445,7 +1445,6 @@ public class LintDriver {
if (ideaProject == null) {
return;
}
List<UastLanguagePlugin> plugins = mClient.getLanguagePlugins();
for (JavaContext context : contexts) {
fireEvent(LintListener.EventType.SCANNING_FILE, context);
@@ -1456,10 +1455,10 @@ public class LintDriver {
UastVisitor customVisitor = scanner.createUastVisitor(context);
if (customVisitor != null) {
UastChecker.INSTANCE.checkWithCustomHandler(
ideaProject, context.file, plugins, customVisitor);
ideaProject, context.file, context, customVisitor);
} else {
UastChecker.INSTANCE.check(
ideaProject, context.file, (UastScanner)check, plugins, context);
ideaProject, context.file, (UastScanner)check, context);
}
}
}
@@ -1516,9 +1515,9 @@ public class LintDriver {
for (UastScanner detector : detectors) {
UastVisitor customHandler = detector.createUastVisitor(context);
if (customHandler != null) {
checker.checkWithCustomHandler(intellijProject, file, plugins, customHandler);
checker.checkWithCustomHandler(intellijProject, file, context, customHandler);
} else {
checker.check(intellijProject, file, detector, plugins, context);
checker.check(intellijProject, file, detector, context);
}
}
}