enable "find" button when reopen Find dialog with empty search string and custom file mask

This commit is contained in:
Alexey Kudravtsev
2015-12-01 12:55:41 +03:00
parent 20a09b931e
commit b76b79d15f
@@ -152,6 +152,7 @@ public class FindDialog extends DialogWrapper {
init();
initByModel();
updateReplaceVisibility();
validateFindButton();
if (haveResultsPreview()) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@@ -835,11 +836,6 @@ public class FindDialog extends DialogWrapper {
findSettings.setFileMask(myModel.getFileFilter());
}
@Override
protected boolean postponeValidation() {
return true;
}
@Nullable("null means OK")
private ValidationInfo getValidationInfo(@NotNull FindModel model) {
if (myRbDirectory != null && myRbDirectory.isEnabled() && myRbDirectory.isSelected()) {
@@ -1210,7 +1206,7 @@ public class FindDialog extends DialogWrapper {
myScopeCombo = new ScopeChooserCombo();
myScopeCombo.init(myProject, true, true, FindSettings.getInstance().getDefaultScopeName(), new Condition<ScopeDescriptor>() {
//final String projectFilesScopeName = PsiBundle.message("psi.search.scope.project");
final String moduleFilesScopeName;
private final String moduleFilesScopeName;
{
String moduleScopeName = PsiBundle.message("search.scope.module", "");
final int ind = moduleScopeName.indexOf(' ');
@@ -1629,7 +1625,7 @@ public class FindDialog extends DialogWrapper {
}
private static class UsageTableCellRenderer extends JPanel implements TableCellRenderer {
private ColoredTableCellRenderer myUsageRenderer = new ColoredTableCellRenderer() {
private final ColoredTableCellRenderer myUsageRenderer = new ColoredTableCellRenderer() {
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
if (value instanceof UsageInfo2UsageAdapter) {
@@ -1644,7 +1640,7 @@ public class FindDialog extends DialogWrapper {
setBorder(null);
}
};
private ColoredTableCellRenderer myFileAndLineNumber = new ColoredTableCellRenderer() {
private final ColoredTableCellRenderer myFileAndLineNumber = new ColoredTableCellRenderer() {
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
if (value instanceof UsageInfo2UsageAdapter) {
@@ -1659,7 +1655,7 @@ public class FindDialog extends DialogWrapper {
}
};
UsageTableCellRenderer() {
private UsageTableCellRenderer() {
setLayout(new BorderLayout());
add(myUsageRenderer, BorderLayout.WEST);