IDEA-225712 When searching in editor `Words` option is enabled even if `Regex` option...
authorLiudmila Kornilova <kornilova203@gmail.com>
Mon, 28 Oct 2019 10:48:34 +0000 (13:48 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 7 Nov 2019 02:40:58 +0000 (02:40 +0000)
GitOrigin-RevId: 43a7312671ffd36c74f615c0d22d8bd640916dbc

platform/lang-impl/src/com/intellij/find/editorHeaderActions/TogglePreserveCaseAction.java
platform/lang-impl/src/com/intellij/find/editorHeaderActions/ToggleWholeWordsOnlyAction.java

index 7998ca295a5c406802fbdbeb20e65bd6c918740f..22aadeed5510a0edb61f86af948a55e80d9315a3 100644 (file)
@@ -28,11 +28,11 @@ public class TogglePreserveCaseAction extends EditorHeaderToggleAction {
 
   @Override
   public void update(@NotNull AnActionEvent e) {
-    super.update(e);
-
     EditorSearchSession search = e.getData(EditorSearchSession.SESSION_KEY);
     FindModel findModel = search != null ? search.getFindModel() : null;
     e.getPresentation().setEnabled(findModel != null && !findModel.isRegularExpressions());
+
+    super.update(e);
   }
 
   @Override
index 7d8ad82e10ac9c0fc7e2f320606a76e00ea8e272..663085db2284758612c536aa14bc04b18247a7bc 100644 (file)
@@ -12,11 +12,11 @@ public class ToggleWholeWordsOnlyAction extends EditorHeaderToggleAction {
 
   @Override
   public void update(@NotNull AnActionEvent e) {
-    super.update(e);
-
     SearchSession session = e.getData(SearchSession.KEY);
     e.getPresentation().setEnabled(session != null && !session.getFindModel().isRegularExpressions());
     e.getPresentation().setVisible(session != null && !session.getFindModel().isMultiline());
+
+    super.update(e);
   }
 
   @Override