public static void setNewFieldVisibility(PsiField field, EncapsulateFieldsDescriptor descriptor) {
   try {
     if (descriptor.getFieldsVisibility() != null) {
       field.normalizeDeclaration();
       PsiUtil.setModifierProperty(field, descriptor.getFieldsVisibility(), true);
     }
   } catch (IncorrectOperationException e) {
     LOG.error(e);
   }
 }
  private void updateFieldVisibility() {
    if (myDescriptor.getFieldsVisibility() == null) return;

    for (FieldDescriptor descriptor : myFieldDescriptors) {
      setNewFieldVisibility(descriptor.getField(), myDescriptor);
    }
  }