void () { LOG.assertTrue(myProject != null, "myProject"); final PsiField field = myProperty.myField; field.normalizeDeclaration(); final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); final PsiType fromType = field.getType(); final PsiType toType = elementFactory.createTypeFromText(myProperty.myObservableType.myText, field); try { final TypeMigrationRules rules = new TypeMigrationRules(myProject); final Set<VirtualFile> virtualFiles = ContainerUtil.map2SetNotNull(myFiles, PsiFile::getVirtualFile); rules.setBoundScope(GlobalSearchScope.filesScope(myProject, virtualFiles)); final TypeMigrationLabeler labeler = new TypeMigrationLabeler(rules, toType, myProject); labeler.getMigratedUsages(false, field); for (PsiReference reference : myReferences) { final PsiElement refElement = reference.getElement(); if (refElement instanceof PsiExpression expression) { final TypeConversionDescriptor conversion = myProperty.myObservableType.findDirectConversion(expression, toType, fromType); if (conversion != null) { TypeMigrationReplacementUtil.replaceExpression(expression, myProject, conversion, new TypeEvaluator(null, null, myProject)); } } } myProperty.convertField(); } catch (IncorrectOperationException e) { LOG.error(e); } }