mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: don't enable "apply constraint within type hierarchy" when not searching java
This commit is contained in:
+8
-2
@@ -94,7 +94,7 @@ class EditVarConstraintsDialog extends DialogWrapper {
|
||||
|
||||
private static Project myProject;
|
||||
|
||||
EditVarConstraintsDialog(final Project project,SearchModel _model,List<Variable> _variables, boolean replaceContext, FileType fileType) {
|
||||
EditVarConstraintsDialog(final Project project, SearchModel _model, List<Variable> _variables, final FileType fileType) {
|
||||
super(project, false);
|
||||
|
||||
variables = _variables;
|
||||
@@ -102,7 +102,13 @@ class EditVarConstraintsDialog extends DialogWrapper {
|
||||
|
||||
setTitle(SSRBundle.message("editvarcontraints.edit.variables"));
|
||||
|
||||
regexp.getDocument().addDocumentListener(new MyDocumentListener(notRegexp, applyWithinTypeHierarchy, wholeWordsOnly));
|
||||
regexp.getDocument().addDocumentListener(new MyDocumentListener(notRegexp, wholeWordsOnly));
|
||||
regexp.getDocument().addDocumentListener(new DocumentAdapter() {
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent e) {
|
||||
applyWithinTypeHierarchy.setEnabled(e.getDocument().getTextLength() > 0 && fileType == StdFileTypes.JAVA);
|
||||
}
|
||||
});
|
||||
read.addChangeListener(new MyChangeListener(notRead, false));
|
||||
write.addChangeListener(new MyChangeListener(notWrite, false));
|
||||
regexprForExprType.getDocument().addDocumentListener(new MyDocumentListener(exprTypeWithinHierarchy, notExprType));
|
||||
|
||||
-1
@@ -649,7 +649,6 @@ public class SearchDialog extends DialogWrapper {
|
||||
new EditVarConstraintsDialog(
|
||||
searchContext.getProject(),
|
||||
model, getVariablesFromListeners(),
|
||||
isReplaceDialog(),
|
||||
(FileType)fileTypes.getSelectedItem()
|
||||
).show();
|
||||
initiateValidation();
|
||||
|
||||
Reference in New Issue
Block a user