IG: introduce convenience methods and cleanup

This commit is contained in:
Bas Leijdekkers
2017-06-10 17:56:27 +02:00
parent cf0338516f
commit 5fffff7b2c
4 changed files with 69 additions and 70 deletions

View File

@@ -59,6 +59,10 @@ public class UnusedSymbolUtil {
return false;
}
public static boolean isImplicitRead(@NotNull PsiVariable variable) {
return isImplicitRead(variable.getProject(), variable, null);
}
public static boolean isImplicitRead(@NotNull Project project, @NotNull PsiVariable element, @Nullable ProgressIndicator progress) {
for(ImplicitUsageProvider provider: Extensions.getExtensions(ImplicitUsageProvider.EP_NAME)) {
checkCanceled(progress);
@@ -69,6 +73,10 @@ public class UnusedSymbolUtil {
return isInjected(project, element);
}
public static boolean isImplicitWrite(@NotNull PsiVariable variable) {
return isImplicitWrite(variable.getProject(), variable, null);
}
public static boolean isImplicitWrite(@NotNull Project project,
@NotNull PsiVariable element,
@Nullable ProgressIndicator progress) {