Search in sources :

Example 11 with EditorSearchSession

use of com.intellij.find.EditorSearchSession in project intellij-community by JetBrains.

the class SwitchToReplace method update.

@Override
public void update(AnActionEvent e) {
    Editor editor = e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE);
    EditorSearchSession search = e.getData(EditorSearchSession.SESSION_KEY);
    e.getPresentation().setEnabled(editor != null && search != null && !ConsoleViewUtil.isConsoleViewEditor(editor));
}
Also used : EditorSearchSession(com.intellij.find.EditorSearchSession) Editor(com.intellij.openapi.editor.Editor)

Example 12 with EditorSearchSession

use of com.intellij.find.EditorSearchSession in project intellij-community by JetBrains.

the class TogglePreserveCaseAction method update.

@Override
public void update(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());
}
Also used : FindModel(com.intellij.find.FindModel) EditorSearchSession(com.intellij.find.EditorSearchSession)

Aggregations

EditorSearchSession (com.intellij.find.EditorSearchSession)12 FindModel (com.intellij.find.FindModel)4 Editor (com.intellij.openapi.editor.Editor)3 Project (com.intellij.openapi.project.Project)3 EditorWindow (com.intellij.injected.editor.EditorWindow)1