void () { final ToolWindow findWindow = ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.FIND); final boolean available = findWindow != null && findWindow.isAvailable(); myForm.getNewTabCheckbox().setEnabled(available); myForm.getNewTabCheckbox().setSelected(FindSettings.getInstance().isShowResultsInSeparateView()); myForm.getHighlightCheckbox().setSelected(mySettings.HIGHLIGHT_RESULTS); myForm.getHighlightCheckbox().addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { updateOkAction(); } }); myForm.getUsageViewCheckbox().setSelected(mySettings.SHOW_USAGE_VIEW); myForm.getUsageViewCheckbox().addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { myForm.getNewTabCheckbox().setEnabled(available && myForm.getUsageViewCheckbox().isSelected()); updateOkAction(); } }); super.init(); }