mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-144857 Don't restart result when user changes 'replace' text
This commit is contained in:
@@ -266,10 +266,7 @@ public class FindPopupPanel extends JBPanel implements FindUI {
|
||||
myCbWholeWordsOnly.addItemListener(liveResultsPreviewUpdateListener);
|
||||
myCbRegularExpressions = new StateRestoringCheckBox(FindBundle.message("find.popup.regex"));
|
||||
myCbRegularExpressions.addItemListener(liveResultsPreviewUpdateListener);
|
||||
myCbFileFilter = new StateRestoringCheckBox("File mask: ");
|
||||
myCbFileFilter.setMnemonic('a');
|
||||
myCbFileFilter.setToolTipText("<html>Use file m<u>a</u>sk(s)");
|
||||
myCbFileFilter.setBorder(null);
|
||||
myCbFileFilter = new StateRestoringCheckBox(FindBundle.message("find.popup.filemask"));
|
||||
myCbFileFilter.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -319,7 +316,7 @@ public class FindPopupPanel extends JBPanel implements FindUI {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
if (PlatformDataKeys.CONTEXT_COMPONENT.getData(e.getDataContext()) == null) return;
|
||||
|
||||
|
||||
ListPopup listPopup =
|
||||
JBPopupFactory.getInstance().createActionGroupPopup(null, switchContextGroup, e.getDataContext(), false, null, 10);
|
||||
listPopup.showUnderneathOf(myFilterContextButton);
|
||||
@@ -432,8 +429,9 @@ public class FindPopupPanel extends JBPanel implements FindUI {
|
||||
myReplaceComponent.setRows(Math.max(1, Math.min(3, StringUtil.countChars(myReplaceComponent.getText(), '\n') + 1)));
|
||||
|
||||
if (myBalloon == null) return;
|
||||
|
||||
scheduleResultsUpdate();
|
||||
if (e.getDocument() == mySearchComponent.getDocument()) {
|
||||
scheduleResultsUpdate();
|
||||
}
|
||||
}
|
||||
};
|
||||
mySearchComponent.getDocument().addDocumentListener(documentAdapter);
|
||||
@@ -669,7 +667,7 @@ public class FindPopupPanel extends JBPanel implements FindUI {
|
||||
add(scopesPanel, "sx 10, pushx, growx, ax left, wrap, gaptop 4, gapbottom 4");
|
||||
add(splitter, "pushx, growx, growy, pushy, sx 10, wrap, pad 0 -4 0 4");
|
||||
add(bottomPanel, "pushx, growx, dock south, sx 10, pad 0 -4 0 4");
|
||||
|
||||
|
||||
MnemonicHelper.init(this);
|
||||
setFocusCycleRoot(true);
|
||||
}
|
||||
@@ -797,10 +795,10 @@ public class FindPopupPanel extends JBPanel implements FindUI {
|
||||
return Scope.PROJECT;
|
||||
} else
|
||||
if (model.getDirectoryName() != null) {
|
||||
return Scope.DIRECTORY;
|
||||
return Scope.DIRECTORY;
|
||||
} else
|
||||
if (model.getModuleName() != null) {
|
||||
return Scope.MODULE;
|
||||
return Scope.MODULE;
|
||||
}
|
||||
return Scope.PROJECT;
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ results.options.group=Result options
|
||||
find.popup.case.sensitive=Match &case
|
||||
find.popup.whole.words=Wo&rds
|
||||
find.popup.regex=Re&gex
|
||||
find.popup.filemask=File m&ask:
|
||||
find.popup.scope.project=In &Project
|
||||
find.popup.scope.module=&Module
|
||||
find.popup.scope.directory=&Directory
|
||||
|
||||
Reference in New Issue
Block a user