From be7f6efd580345b8d1548702bb80304078c7ed14 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 26 Feb 2016 14:44:53 +0100 Subject: [PATCH] MacroUtil: remove unnecessary check (IDEA-CR-8672) --- .../com/intellij/codeInsight/template/macro/MacroUtil.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/template/macro/MacroUtil.java b/java/java-impl/src/com/intellij/codeInsight/template/macro/MacroUtil.java index 8e246d8ab5e1..2433912050ff 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/macro/MacroUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/macro/MacroUtil.java @@ -104,12 +104,7 @@ public class MacroUtil { PsiElement scope = place; boolean innermostClass = true; while (scope != null) { - if (scope instanceof PsiMethod && ((PsiMethod)scope).hasModifierProperty(PsiModifier.STATIC)) { - // Method is static, we don't want to add its enclosing class to the list of returned expressions. - // Since this loop only can potentially add enclosing classes, just break out of it. - break; - } - else if (scope instanceof PsiClass) { + if (scope instanceof PsiClass) { PsiClass aClass = (PsiClass)scope; String name = aClass.getName(); if (innermostClass) {