Register Android api quickfixes for inlined api inspection
#KT-14857 Fixed
This commit is contained in:
+10
@@ -383,6 +383,11 @@ public class AndroidLintInspectionToolProvider {
|
||||
@NotNull
|
||||
@Override
|
||||
public AndroidLintQuickFix[] getQuickFixes(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String message) {
|
||||
return getApiQuickFixes(startElement, endElement, message);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static AndroidLintQuickFix[] getApiQuickFixes(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String message) {
|
||||
int api = ApiDetector.getRequiredVersion(TextFormat.RAW.toText(message));
|
||||
if (api == -1) {
|
||||
return AndroidLintQuickFix.EMPTY_ARRAY;
|
||||
@@ -409,6 +414,11 @@ public class AndroidLintInspectionToolProvider {
|
||||
super(AndroidBundle.message("android.lint.inspections.inlined.api"), ApiDetector.INLINED);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public AndroidLintQuickFix[] getQuickFixes(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String message) {
|
||||
return AndroidKLintNewApiInspection.getApiQuickFixes(startElement, endElement, message);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AndroidKLintOverrideInspection extends AndroidLintInspectionBase {
|
||||
|
||||
Reference in New Issue
Block a user