boolean (@NotNull Ref<UsageInfo[]> refUsages) { UsageInfo[] usagesIn = refUsages.get(); MultiMap<PsiElement, @Nls String> conflicts = new MultiMap<>(); AnySameNameVariables anySameNameVariables = new AnySameNameVariables(); myMethodToReplaceIn.accept(anySameNameVariables); final Pair<PsiElement, @Nls String> conflictPair = anySameNameVariables.getConflict(); if (conflictPair != null) { conflicts.putValue(conflictPair.first, conflictPair.second); } if (!myGenerateDelegate) { detectAccessibilityConflicts(usagesIn, conflicts); if (myMethodToReplaceIn == myMethodToSearchFor) { PsiRecordComponent recordComponent = JavaPsiRecordUtil.getRecordComponentForAccessor(myMethodToReplaceIn); if (recordComponent != null) { String message = JavaRefactoringBundle.message("0.will.no.longer.be.record.component.accessor", RefactoringUIUtil.getDescription(myMethodToReplaceIn, true), RefactoringUIUtil.getDescription(recordComponent, true)); conflicts.putValue(myMethodToReplaceIn, message); } else if (JavaPsiRecordUtil.isCanonicalConstructor(myMethodToReplaceIn)) { String message = JavaRefactoringBundle.message("0.will.no.longer.be.canonical.constructor"); conflicts.putValue(myMethodToReplaceIn, message); } } } if (myParameterInitializer != null && !myMethodToReplaceIn.hasModifierProperty(PsiModifier.PRIVATE)) { final AnySupers anySupers = new AnySupers(); myParameterInitializer.accept(anySupers); if (anySupers.isResult()) { for (UsageInfo usageInfo : usagesIn) { PsiElement element = usageInfo.getElement(); if (!(element instanceof PsiMethod) && !(usageInfo instanceof InternalUsageInfo)) { if (!PsiTreeUtil.isAncestor(myMethodToReplaceIn.getContainingClass(), element, false)) { String message = JavaRefactoringBundle.message("parameter.initializer.contains.0.but.not.all.calls.to.method.are.in.its.class", CommonRefactoringUtil.htmlEmphasize(PsiKeyword.SUPER)); conflicts.putValue(myParameterInitializer, message); break; } } } } } for (IntroduceParameterMethodUsagesProcessor processor : IntroduceParameterMethodUsagesProcessor.EP_NAME.getExtensions()) { processor.findConflicts(this, refUsages.get(), conflicts); } myHasConflicts = !conflicts.isEmpty(); return showConflicts(conflicts, usagesIn); }