private static @NotNull Collection<IntentionAction> createVariableActions(@NotNull PsiReferenceExpression refExpr) {
    Collection<IntentionAction> result = new ArrayList<>();
    boolean isQualified = refExpr.isQualified();
    VariableKind kind = getKind(refExpr);

    if (!isQualified) {
      IntentionAction createLocalFix = new CreateLocalFromUsageFix(refExpr);
      result.add(kind == VariableKind.LOCAL_VARIABLE ? PriorityIntentionActionWrapper.highPriority(createLocalFix) : createLocalFix);
    }

    List<IntentionAction> createFieldFixes = CreateFieldFromUsage.generateActions(refExpr);
    if (kind == VariableKind.FIELD) {
      createFieldFixes = ContainerUtil.map(createFieldFixes, fix -> PriorityIntentionActionWrapper.highPriority(fix));
    }
    result.addAll(createFieldFixes);

    if (!isQualified) {
      IntentionAction createParameterFix = new CreateParameterFromUsageFix(refExpr);
      result.add(kind == VariableKind.PARAMETER ? PriorityIntentionActionWrapper.highPriority(createParameterFix) : createParameterFix);
    }

    return result;
  }
private static @NotNull Collection<IntentionAction> createVariableActions(@NotNull PsiReferenceExpression refExpr)