JComponent () { final var searchPanel = createSearchPanel(); myReplacePanel = createReplacePanel(); myReplacePanel.setVisible(myReplace); myScopePanel = new ScopePanel(myProject, myDisposable); if (!myEditConfigOnly) { myScopePanel.setRecentDirectories(FindInProjectSettings.getInstance(myProject).getRecentDirectories()); myScopePanel.setScopeConsumer(scope -> { if (myConfiguration != null) { myConfiguration.getMatchOptions().setScope(scope); initValidation(); } }); } else { myScopePanel.setVisible(false); } final var centerConstraint = new GridBag() .setDefaultFill(BOTH) .setDefaultWeightX(1.0) .setDefaultWeightY(1.0); final JPanel centerPanel = new JPanel(new GridBagLayout()); centerPanel.add(searchPanel, centerConstraint.nextLine()); centerPanel.add(myReplacePanel, centerConstraint.nextLine()); centerPanel.add(myScopePanel, centerConstraint.nextLine().weighty(0.0)); myExistingTemplatesComponent = new ExistingTemplatesComponent(myProject, getContentPanel(), new ImportConfigurationAction(), new ExportConfigurationAction()); myExistingTemplatesComponent.onConfigurationSelected(this::loadConfiguration); myExistingTemplatesComponent.setConfigurationProducer(() -> getConfiguration()); myMainSplitter = new OnePixelSplitter(false, 0.2f); myMainSplitter.setFirstComponent(myExistingTemplatesComponent.getTemplatesPanel()); myMainSplitter.setSecondComponent(centerPanel); updateColors(); updateOptions(); return myMainSplitter; }