JComponent () { myScopeCombo = new ScopeChooserCombo(myProject, false, true, ProjectScope.getProjectFilesScopeName()); Disposer.register(myDisposable, myScopeCombo); // do not show scope chooser for local variables SearchScope useScope = PsiSearchHelper.getInstance(myProject).getUseScope(myPsiElement); if (useScope instanceof LocalSearchScope) return null; JPanel optionsPanel = new JPanel(new BorderLayout()); optionsPanel.add(myScopeCombo, BorderLayout.CENTER); JComponent separator = SeparatorFactory.createSeparator(FindBundle.message("find.scope.label"), myScopeCombo.getComboBox()); optionsPanel.add(separator, BorderLayout.NORTH); return optionsPanel; }