void (@NotNull AnActionEvent e) { final RemoteFileState state = myFile.getFileInfo().getState(); e.getPresentation().setEnabled(state == RemoteFileState.DOWNLOADED || state == RemoteFileState.ERROR_OCCURRED); }