private static void addToArrayConversion(@NotNull PsiFile file,
                                           final PsiElement element,
                                           final String prefix,
                                           final @NonNls String expressionString,
                                           @NonNls String presentableString,
                                           final Consumer<? super LookupElement> result,
                                           PsiElement qualifier) {
    final boolean callSpace = CodeStyle.getLanguageSettings(file).SPACE_WITHIN_METHOD_CALL_PARENTHESES;
    final PsiExpression conversion;
    try {
      conversion = createExpression(
        getQualifierText(qualifier) + prefix + ".toArray(" +
        getSpace(callSpace) + expressionString + getSpace(callSpace) + ")", element);
    }
    catch (IncorrectOperationException e) {
      return;
    }

    String[] lookupStrings = {prefix + ".toArray(" + getSpace(callSpace) + expressionString +
                              getSpace(callSpace) + ")", presentableString};
    result.consume(new ExpressionLookupItem(conversion, IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Method), prefix + ".toArray(" + presentableString + ")", lookupStrings) {
        @Override
        public void handleInsert(@NotNull InsertionContext context) {
          FeatureUsageTracker.getInstance().triggerFeatureUsed(JavaCompletionFeatures.SECOND_SMART_COMPLETION_TOAR);
          super.handleInsert(context);
        }
      });
  }
private static void addToArrayConversion(@NotNull PsiFile file,
                                           final PsiElement element,
                                           final String prefix,
                                           final @NonNls String expressionString,
                                           @NonNls String presentableString,
                                           final Consumer<? super LookupElement> result,
                                           PsiElement qualifier)