private static String getFieldText(PsiLocalVariable variable) {
    // var x is not allowed as field
    if (variable.getTypeElement().isInferredType()) {
      PsiLocalVariable copy = (PsiLocalVariable)variable.copy();
      PsiTypesUtil.replaceWithExplicitType(copy.getTypeElement());
      return copy.getText();
    }
    else {
      return variable.getText();
    }
  }
private static String getFieldText(PsiLocalVariable variable)