From 2203061d1f45e55431e6d94660cc939d7956a9cb Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 14 Feb 2010 21:30:44 +0000 Subject: [PATCH] if there aren't any physical accessors for groovy property, search for them anyway --- .../intellij/find/findUsages/JavaFindUsagesHandler.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/java/java-impl/src/com/intellij/find/findUsages/JavaFindUsagesHandler.java b/java/java-impl/src/com/intellij/find/findUsages/JavaFindUsagesHandler.java index 752d467718..59a0e5b3e0 100644 --- a/java/java-impl/src/com/intellij/find/findUsages/JavaFindUsagesHandler.java +++ b/java/java-impl/src/com/intellij/find/findUsages/JavaFindUsagesHandler.java @@ -172,11 +172,17 @@ public class JavaFindUsagesHandler extends FindUsagesHandler{ PsiMethod setter = PropertyUtil. findPropertySetterWithType(propertyName, field.hasModifierProperty(PsiModifier.STATIC), field.getType(), ContainerUtil.iterate(containingClass.getMethods())); - if (getter != null && getter.isPhysical() || setter != null && setter.isPhysical()) { - if (Messages.showDialog(FindBundle.message("find.field.accessors.prompt", field.getName()), - FindBundle.message("find.field.accessors.title"), - new String[]{CommonBundle.getYesButtonText(), CommonBundle.getNoButtonText()}, 0, - Messages.getQuestionIcon()) == DialogWrapper.OK_EXIT_CODE) { + if (getter != null || setter != null) { + final boolean doSearch; + if ((getter == null || !getter.isPhysical()) && (setter == null || !setter.isPhysical())) { + doSearch = true; + } else { + doSearch = Messages.showDialog(FindBundle.message("find.field.accessors.prompt", field.getName()), + FindBundle.message("find.field.accessors.title"), + new String[]{CommonBundle.getYesButtonText(), CommonBundle.getNoButtonText()}, 0, + Messages.getQuestionIcon()) == DialogWrapper.OK_EXIT_CODE; + } + if (doSearch) { final List elements = new ArrayList(); if (getter != null) { elements.addAll(Arrays.asList(SuperMethodWarningUtil.checkSuperMethods(getter, ACTION_STRING))); -- 2.11.4.GIT