boolean (@NotNull Ref<UsageInfo[]> refUsages) { for (ChangeSignatureUsageProcessor processor : ChangeSignatureUsageProcessor.EP_NAME.getExtensions()) { if (!processor.setupDefaultValues(myChangeInfo, refUsages, myProject)) return false; } final UsageInfo[] usagesIn = refUsages.get(); Set<UsageInfo> usagesSet = ContainerUtil.newHashSet(usagesIn); if (myChangeInfo instanceof JavaChangeInfoImpl && ((JavaChangeInfo)myChangeInfo).isVisibilityChanged() && ContainerUtil.exists(usagesSet, OverriderUsageInfo.class::isInstance)) { String visibility = ((JavaChangeInfo)myChangeInfo).getNewVisibility(); String oldVisibility = VisibilityUtil.getVisibilityModifier(((JavaChangeInfo)myChangeInfo).getMethod().getModifierList()); if (oldVisibility.equals(VisibilityUtil.getHighestVisibility(visibility, oldVisibility)) && (!ApplicationManager.getApplication().isUnitTestMode() && Messages.showYesNoDialog(myProject, JavaRefactoringBundle.message("dialog.message.overriding.methods.with.weaken.visibility", visibility), RefactoringBundle.message("changeSignature.refactoring.name"), Messages.getQuestionIcon()) == Messages.YES)) { ((JavaChangeInfoImpl)myChangeInfo).propagateVisibility = true; } } MultiMap<PsiElement, String> conflictDescriptions = new MultiMap<>(); collectConflictsFromExtensions(refUsages, conflictDescriptions, myChangeInfo); RenameUtil.addConflictDescriptions(usagesIn, conflictDescriptions); RenameUtil.removeConflictUsages(usagesSet); if (!conflictDescriptions.isEmpty()) { if (ApplicationManager.getApplication().isUnitTestMode()) { if (ConflictsInTestsException.isTestIgnore()) return true; throw new ConflictsInTestsException(conflictDescriptions.values()); } if (myPrepareSuccessfulSwingThreadCallback != null) { ConflictsDialogBase dialog = prepareConflictsDialog(conflictDescriptions, usagesIn); if (!dialog.showAndGet()) { if (dialog.isShowConflicts()) prepareSuccessful(); return false; } } } if (myChangeInfo.isReturnTypeChanged()) { askToRemoveCovariantOverriders(usagesSet); } refUsages.set(usagesSet.toArray(UsageInfo.EMPTY_ARRAY)); prepareSuccessful(); return true; }