boolean (@NotNull DataContext dataContext) { Editor editor = dataContext.getData(CommonDataKeys.EDITOR); ShFile file = ObjectUtils.tryCast(dataContext.getData(CommonDataKeys.PSI_FILE), ShFile.class); return editor != null && file != null && ShOccurrencesHighlightingSuppressor.isOccurrencesHighlightingEnabled(editor, file) && ShRenameAllOccurrencesHandler.INSTANCE.isEnabled(editor, editor.getCaretModel().getPrimaryCaret(), dataContext) && isRenameAvailable(editor, file) ; }