boolean (final PsiLanguageInjectionHost psiElement) { if (!isMine(psiElement)) return false; final HashMap<BaseInjection, Pair<PsiMethod, Integer>> injectionsMap = new HashMap<>(); final ArrayList<PsiElement> annotations = new ArrayList<>(); final PsiLiteralExpression host = (PsiLiteralExpression)psiElement; final Project project = host.getProject(); final Configuration configuration = Configuration.getProjectInstance(project); collectInjections(host, configuration, this, injectionsMap, annotations); if (injectionsMap.isEmpty() && annotations.isEmpty()) return false; final ArrayList<BaseInjection> originalInjections = new ArrayList<>(injectionsMap.keySet()); final List<BaseInjection> newInjections = ContainerUtil.mapNotNull(originalInjections, (NullableFunction<BaseInjection, BaseInjection>)injection -> { final Pair<PsiMethod, Integer> pair = injectionsMap.get(injection); final String placeText = getPatternStringForJavaPlace(pair.first, pair.second); final BaseInjection newInjection = injection.copy(); newInjection.setPlaceEnabled(placeText, false); return InjectorUtils.canBeRemoved(newInjection)? null : newInjection; }); configuration.replaceInjectionsWithUndo(project, host.getContainingFile(), newInjections, originalInjections, annotations); return true; }