boolean (ChangeInfo changeInfo, Ref<UsageInfo[]> refUsages, Project project) { if (!(changeInfo instanceof JavaChangeInfo)) return true; for (UsageInfo usageInfo : refUsages.get()) { if (usageInfo instanceof MethodCallUsageInfo methodCallUsageInfo) { if (methodCallUsageInfo.isToChangeArguments()){ final PsiElement element = methodCallUsageInfo.getElement(); if (element == null) continue; final PsiMethod caller = PsiTreeUtil.getParentOfType(element, PsiMethod.class); final boolean needDefaultValue = needDefaultValue(changeInfo, caller); if (needDefaultValue && (caller == null || !MethodSignatureUtil.isSuperMethod(methodCallUsageInfo.getReferencedMethod(), caller))) { final ParameterInfo[] parameters = changeInfo.getNewParameters(); for (ParameterInfo parameter : parameters) { final String defaultValue = parameter.getDefaultValue(); if (defaultValue == null && parameter.isNew()) { ((ParameterInfoImpl)parameter).setDefaultValue(""); if (!ApplicationManager.getApplication().isUnitTestMode()) { final PsiType type = ((ParameterInfoImpl)parameter).getTypeWrapper().getType(element); final DefaultValueChooser chooser = new DefaultValueChooser(project, parameter.getName(), PsiTypesUtil.getDefaultValueOfType(type)); if (chooser.showAndGet()) { if (chooser.feelLucky()) { parameter.setUseAnySingleVariable(true); } else { ((ParameterInfoImpl)parameter).setDefaultValue(chooser.getDefaultValue()); } } else { return false; } } } } } } } } return true; }