boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!(file instanceof PyFile)) { return false; } final IntentionState state = new IntentionState(editor, file); if (state.isAvailable()) { setText(state.getText()); return true; } return false; }