Skip to content

Commit 01c5b67

Browse files
committed
Disable "Select All" button for empty input
Just like other buttons on this dialog. Fixes #1046
1 parent 4d2db98 commit 01c5b67

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,7 @@ private void updateButtonState(boolean disableReplace) {
16931693
fWholeWordCheckBox.setEnabled(isWord(str) && !isRegExSearchAvailableAndChecked());
16941694

16951695
fFindNextButton.setEnabled(enable && findString);
1696+
fSelectAllButton.setEnabled(enable && findString && fTarget instanceof IFindReplaceTargetExtension4);
16961697
fReplaceSelectionButton.setEnabled(!disableReplace && enable && isEditable() && selection && (!fNeedsInitialFindBeforeReplace || !isRegExSearchAvailableAndChecked()));
16971698
fReplaceFindButton.setEnabled(!disableReplace && enable && isEditable() && findString && selection && (!fNeedsInitialFindBeforeReplace || !isRegExSearchAvailableAndChecked()));
16981699
fReplaceAllButton.setEnabled(enable && isEditable() && findString);
@@ -1834,12 +1835,8 @@ public void updateTarget(IFindReplaceTarget target, boolean isTargetEditable, bo
18341835
fGiveFocusToFindField= true;
18351836
}
18361837
initIncrementalBaseLocation();
1837-
updateButtonState();
1838-
}
1839-
1840-
if (okToUse(fSelectAllButton)) {
1841-
fSelectAllButton.setEnabled(fTarget instanceof IFindReplaceTargetExtension4);
18421838
}
1839+
updateButtonState();
18431840

18441841
setContentAssistsEnablement(isRegExSearchAvailableAndChecked());
18451842
}

0 commit comments

Comments
 (0)