JPanel () { JPanel findWhatPanel = new JPanel(); findWhatPanel.setLayout(new BoxLayout(findWhatPanel, BoxLayout.Y_AXIS)); myCbUsages = addCheckboxToPanel(JavaBundle.message("find.what.usages.checkbox"), getFindUsagesOptions().isUsages, findWhatPanel, true); PsiMethod method = (PsiMethod) getPsiElement(); PsiClass aClass = method.getContainingClass(); if (aClass == null) { myHasFindWhatPanel = false; return null; } if (!method.hasModifierProperty(PsiModifier.STATIC) && !method.hasModifierProperty(PsiModifier.PRIVATE) && !method.isConstructor()) { myCbSearchForBase = createCheckbox(JavaBundle.message("find.what.search.for.base.methods.checkbox"), getFindUsagesOptions().isSearchForBaseMethod, true); JComponent decoratedCheckbox = new ComponentPanelBuilder(myCbSearchForBase). withComment(JavaBundle.message("find.what.search.for.base.methods.checkbox.comment")).createPanel(); decoratedCheckbox.setAlignmentX(Component.LEFT_ALIGNMENT); findWhatPanel.add(decoratedCheckbox); } if (method.hasModifierProperty(PsiModifier.ABSTRACT)) { myCbImplementingMethods = addCheckboxToPanel(JavaBundle.message("find.what.implementing.methods.checkbox"), getFindUsagesOptions().isImplementingMethods, findWhatPanel, true); } else if (!(aClass instanceof PsiAnonymousClass) && !aClass.hasModifierProperty(PsiModifier.FINAL) && !method.isConstructor() && !method.hasModifierProperty(PsiModifier.FINAL) && !method.hasModifierProperty(PsiModifier.STATIC) && !method.hasModifierProperty(PsiModifier.PRIVATE)) { myCbOverridingMethods = addCheckboxToPanel(JavaBundle.message("find.what.overriding.methods.checkbox"), getFindUsagesOptions().isOverridingMethods, findWhatPanel, true); } if (ImplicitToStringSearch.isToStringMethod(method)) { myCbImplicitToString = addCheckboxToPanel(JavaBundle.message("find.what.implicit.to.string.checkbox"), getFindUsagesOptions().isImplicitToString, findWhatPanel, true); } myHasFindWhatPanel = true; return findWhatPanel; }