void (@NotNull InsertionContext context) { FeatureUsageTracker.getInstance().triggerFeatureUsed(JavaCompletionFeatures.SECOND_SMART_COMPLETION_ASLIST); int startOffset = context.getStartOffset() - qualifierText.length(); final Project project = element.getProject(); final String callSpace = getSpace( CodeStyle.getLanguageSettings(context.getFile()).SPACE_WITHIN_METHOD_CALL_PARENTHESES); final String newText = "java.util.Arrays." + methodName + "(" + callSpace + qualifierText + prefix + callSpace + ")"; context.getDocument().replaceString(startOffset, context.getTailOffset(), newText); context.commitDocument(); JavaCodeStyleManager.getInstance(project).shortenClassReferences(context.getFile(), startOffset, startOffset + CommonClassNames.JAVA_UTIL_ARRAYS.length()); }