LogicalPosition (@NotNull PsiFile psiFile, @NotNull Collection<? extends JavadocParameterInfo> data, @NotNull JavadocParameterInfo anchor) { int descriptionStartColumn = -1; int parameterNameEndColumn = -1; for (JavadocParameterInfo parameterInfo : data) { parameterNameEndColumn = Math.max(parameterNameEndColumn, parameterInfo.parameterNameEndPosition.column); if (parameterInfo.parameterDescriptionStartPosition != null) { descriptionStartColumn = Math.max(descriptionStartColumn, parameterInfo.parameterDescriptionStartPosition.column); } } int column; if (getJdAlignParamComments(psiFile)) { column = Math.max(descriptionStartColumn, parameterNameEndColumn); if (column <= parameterNameEndColumn) { column = parameterNameEndColumn + 1; } } else { column = anchor.parameterNameEndPosition.column + 1; } return new LogicalPosition(anchor.parameterNameEndPosition.line, column); }