From 6af179254757209f61d3621ac5e3b4d2f63af30f Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Wed, 30 Sep 2009 16:09:11 +0400 Subject: [PATCH] cleanup --- .../intellij/psi/controlFlow/DefUseUtil.java | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/java/java-impl/src/com/intellij/psi/controlFlow/DefUseUtil.java b/java/java-impl/src/com/intellij/psi/controlFlow/DefUseUtil.java index f8891ff215cb..8983726cdb2f 100644 --- a/java/java-impl/src/com/intellij/psi/controlFlow/DefUseUtil.java +++ b/java/java-impl/src/com/intellij/psi/controlFlow/DefUseUtil.java @@ -452,42 +452,4 @@ public class DefUseUtil { } }; - @NotNull - public static PsiElement[] getDefsRefs (final boolean defs, PsiFile file, final PsiElement target) { - if (!(target instanceof PsiIdentifier)) { - return PsiElement.EMPTY_ARRAY; - } - - if (file instanceof PsiCompiledElement) { - file = (PsiFile)((PsiCompiledElement)file).getMirror(); - } - - if (file instanceof PsiJavaFile) { - final PsiElement def; - final PsiElement refElem = target.getParent (); - if (refElem instanceof PsiReference) { - def = ((PsiReference)refElem).resolve(); - } - else { - def = refElem; - } - - if (def instanceof PsiLocalVariable || def instanceof PsiParameter) { - final PsiVariable var = (PsiVariable) def; - PsiElement p = var; - while (!(p instanceof PsiMethod)) { - final PsiElement parent = p.getParent(); - LOG.assertTrue (parent != null); - p = parent; - } - final PsiMethod method = (PsiMethod)p; - final PsiCodeBlock body = method.getBody(); - return defs - ? getDefs(body, var, refElem) - : getRefs(body, var, refElem); - } - } - return PsiElement.EMPTY_ARRAY; - } - }