Skip to content

Commit

Permalink
manipulation: fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T committed Feb 16, 2024
1 parent fbb9338 commit f1bf7a1
Show file tree
Hide file tree
Showing 36 changed files with 131 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @author chammer
*
* @param <E> - type that extends HelpVisitorProvider that provides HelperVisitor<V, T>
* @param <E> - type that extends HelpVisitorProvider that provides {@code HelperVisitor<V, T>}
* @param <V> - type that HelperVisitor uses as map key type
* @param <T> - type that HelperVisitor uses as map value type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public final class JavaElementLabelsCore {
public final static long ALL_POST_QUALIFIED= F_POST_QUALIFIED | M_POST_QUALIFIED | I_POST_QUALIFIED | T_POST_QUALIFIED | TP_POST_QUALIFIED | D_POST_QUALIFIED | CF_POST_QUALIFIED | CU_POST_QUALIFIED | P_POST_QUALIFIED | ROOT_POST_QUALIFIED;

/**
* Default options (M_PARAMETER_TYPES, M_APP_TYPE_PARAMETERS & T_TYPE_PARAMETERS enabled)
* Default options (M_PARAMETER_TYPES, M_APP_TYPE_PARAMETERS, T_TYPE_PARAMETERS enabled)
*/
public final static long ALL_DEFAULT= M_PARAMETER_TYPES | M_APP_TYPE_PARAMETERS | T_TYPE_PARAMETERS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public class MembersOrderPreferenceCacheCommon {
* <li><b>SM</b>: Static Methods</li>
* <li><b>SF</b>: Static Fields</li>
* </ul>
* </p>
*/
public static final String APPEARANCE_MEMBER_SORT_ORDER= "outlinesortoption"; //$NON-NLS-1$

Expand All @@ -62,7 +61,6 @@ public class MembersOrderPreferenceCacheCommon {
* <li><b>R</b>: Protected</li>
* <li><b>D</b>: Default</li>
* </ul>
* </p>
*/
public static final String APPEARANCE_VISIBILITY_SORT_ORDER= "org.eclipse.jdt.ui.visibility.order"; //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface IJavaStatusConstants {
int VALIDATE_EDIT_CHANGED_CONTENT= 10003;

/**
* Status constant indicating that a <tt>ChangeAbortException</tt> has been
* Status constant indicating that a <code>ChangeAbortException</code> has been
* caught.
*/
int CHANGE_ABORTED= 10004;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public StringMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards
}
}
/**
* Find the first occurrence of the pattern between <code>start</code)(inclusive)
* Find the first occurrence of the pattern between <code>start</code>(inclusive)
* and <code>end</code>(exclusive).
* @param text the String object to search in
* @param start the starting index of the search range, inclusive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ public static boolean canRemoveParentheses(Expression expression, ASTNode parent
* <li>The <code>infixExpression</code> must not have additional operands.</li>
* <li>The <code>rightOperand</code> node must have bindings.</li>
* </ul>
* </p>
*
* @param rightOperand the right operand in <code>infixExpression</code>
* @param infixExpression the parent infix expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class OperatorPrecedence {
* with higher precedence are executed before expressions
* with lower precedence.
* i.e. in:
* <br><code> int a= ++3--;</code></br>
* <br><code> int a= ++3--;</code><br>
*
* the precedence order is
* <ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static String getFileName(ITypeRoot typeRoot) {
}

/**
* Returns a label for Java element name. Example is 'new Test<? extends List>() { ...}'.
* Returns a label for Java element name. Example is {@code new Test<? extends List>() { ...}}.
* This method should only be used for simple element names. Use
* org.eclipse.jdt.ui.JavaElementLabels to create a label from a Java element or
* org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider for labels of bindings.
Expand All @@ -129,7 +129,7 @@ public static String getJavaElementName(String name) {
}

/**
* Returns a label for Java code snippet used in a label. Example is 'Test test= new Test<? extends List>() { ...}'.
* Returns a label for Java code snippet used in a label. Example is {@code 'Test test= new Test<? extends List>() { ...}}.
*
* @param string the Java code snippet
* @return the label for the Java code snippet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public static String removeNewLine(String message) {
* don't contain any line delimiter characters.
*
* @param input the string
* @return the string converted into an array of strings. Returns <code>
* null</code> if the input string can't be converted in an array of lines.
* @return the string converted into an array of strings. Returns {@code
* null} if the input string can't be converted in an array of lines.
*/
public static String[] convertIntoLines(String input) {
try {
Expand All @@ -160,13 +160,13 @@ public static String[] convertIntoLines(String input) {
}

/**
* Returns <code>true</code> if the given string only consists of
* white spaces according to Java. If the string is empty, <code>true
* </code> is returned.
* Returns {@code true} if the given string only consists of
* white spaces according to Java. If the string is empty, {@code true
* } is returned.
*
* @param s the string to test
* @return <code>true</code> if the string only consists of white
* spaces; otherwise <code>false</code> is returned
* @return {@code true} if the string only consists of white
* spaces; otherwise {@code false} is returned
*
* @see java.lang.Character#isWhitespace(char)
*/
Expand Down Expand Up @@ -229,7 +229,7 @@ else if (end == 0)
*
* @param line the text line
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* preferences, or {@code null} for global preferences
* @return the number of indent units
* @since 3.1
*/
Expand Down Expand Up @@ -266,12 +266,12 @@ public static int computeIndentUnits(String line, int tabWidth, int indentWidth)

/**
* Computes the visual length of the indentation of a
* <code>CharSequence</code>, counting a tab character as the size until
* {@code CharSequence}, counting a tab character as the size until
* the next tab stop and every other whitespace character as one.
*
* @param line the string to measure the indent of
* @param tabSize the visual size of a tab in space equivalents
* @return the visual length of the indentation of <code>line</code>
* @return the visual length of the indentation of {@code line}
* @since 3.1
*/
public static int measureIndentLength(CharSequence line, int tabSize) {
Expand All @@ -280,13 +280,13 @@ public static int measureIndentLength(CharSequence line, int tabSize) {

/**
* Removes the given number of indents from the line. Asserts that the given line
* has the requested number of indents. If <code>indentsToRemove <= 0</code>
* has the requested number of indents. If {@code indentsToRemove <= 0}
* the line is returned.
* @param line the line
* @param indentsToRemove the indents to remove
*
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* preferences, or {@code null} for global preferences
* @return the trimmed line
*
* @since 3.1
Expand All @@ -297,7 +297,7 @@ public static String trimIndent(String line, int indentsToRemove, IJavaProject p

/**
* Removes the given number of indents from the line. Asserts that the given line
* has the requested number of indents. If <code>indentsToRemove <= 0</code>
* has the requested number of indents. If {@code indentsToRemove <= 0}
* the line is returned.
*
* @param line the line
Expand All @@ -311,7 +311,7 @@ public static String trimIndent(String line, int indentsToRemove, ICompilationUn

/**
* Removes the given number of indents from the line. Asserts that the given line
* has the requested number of indents. If <code>indentsToRemove <= 0</code>
* has the requested number of indents. If {@code indentsToRemove <= 0}
* the line is returned.
* @param line the line
* @param indentsToRemove the indents to remove
Expand All @@ -331,7 +331,7 @@ public static String trimIndent(String line, int indentsToRemove, int tabWidth,
* @param lines the lines
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* preferences, or {@code null} for global preferences
* @since 3.1
*/
public static void trimIndentation(String[] lines, IJavaProject project) {
Expand All @@ -353,13 +353,13 @@ public static void trimIndentation(String[] lines, int tabWidth, int indentWidth

/**
* Removes the common number of indents from all lines. If a line
* only consists out of white space it is ignored. If <code>
* considerFirstLine</code> is false the first line will be ignored.
* only consists out of white space it is ignored. If {@code
* considerFirstLine} is false the first line will be ignored.
* @param lines the lines
*
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* @param considerFirstLine If <code>considerFirstLine</code> is false the first line will be ignored.
* preferences, or {@code null} for global preferences
* @param considerFirstLine If {@code considerFirstLine} is false the first line will be ignored.
* @since 3.1
*/
public static void trimIndentation(String[] lines, IJavaProject project, boolean considerFirstLine) {
Expand All @@ -368,25 +368,25 @@ public static void trimIndentation(String[] lines, IJavaProject project, boolean

/**
* Removes the common number of indents from all lines. If a line
* only consists out of white space it is ignored. If <code>
* considerFirstLine</code> is false the first line will be ignored.
* only consists out of white space it is ignored. If {@code
* considerFirstLine} is false the first line will be ignored.
*
* @param lines the lines
* @param cu the compilation unit from which to get the formatter preferences
* @param considerFirstLine If <code>considerFirstLine</code> is false the first line will be ignored.
* @param considerFirstLine If {@code considerFirstLine} is false the first line will be ignored.
*/
public static void trimIndentation(String[] lines, ICompilationUnit cu, boolean considerFirstLine) {
trimIndentation(lines, CodeFormatterUtil.getTabWidth(cu), CodeFormatterUtil.getIndentWidth(cu), considerFirstLine);
}

/**
* Removes the common number of indents from all lines. If a line
* only consists out of white space it is ignored. If <code>
* considerFirstLine</code> is false the first line will be ignored.
* only consists out of white space it is ignored. If {@code
* considerFirstLine} is false the first line will be ignored.
* @param lines the lines
* @param tabWidth the size of one tab in space equivalents
* @param indentWidth the size of the indent in space equivalents
* @param considerFirstLine If <code> considerFirstLine</code> is false the first line will be ignored.
* @param considerFirstLine If {@code considerFirstLine} is false the first line will be ignored.
* @since 3.1
*/
public static void trimIndentation(String[] lines, int tabWidth, int indentWidth, boolean considerFirstLine) {
Expand Down Expand Up @@ -423,39 +423,39 @@ public static void trimIndentation(String[] lines, int tabWidth, int indentWidth
}

/**
* Returns that part of the indentation of <code>line</code> that makes up
* Returns that part of the indentation of {@code line} that makes up
* a multiple of indentation units.
*
* @param line the line to scan
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* @return the indent part of <code>line</code>, but no odd spaces
* preferences, or {@code null} for global preferences
* @return the indent part of {@code line}, but no odd spaces
* @since 3.1
*/
public static String getIndentString(String line, IJavaProject project) {
return IndentManipulation.extractIndentString(line, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project));
}

/**
* Returns that part of the indentation of <code>line</code> that makes up
* Returns that part of the indentation of {@code line} that makes up
* a multiple of indentation units.
*
* @param line the line to scan
* @param cu the compilation unit from which to get the formatter preferences
* @return the indent part of <code>line</code>, but no odd spaces
* @return the indent part of {@code line}, but no odd spaces
*/
public static String getIndentString(String line, ICompilationUnit cu) {
return IndentManipulation.extractIndentString(line, CodeFormatterUtil.getTabWidth(cu), CodeFormatterUtil.getIndentWidth(cu));
}

/**
* Returns that part of the indentation of <code>line</code> that makes up
* Returns that part of the indentation of {@code line} that makes up
* a multiple of indentation units.
*
* @param line the line to scan
* @param tabWidth the size of one tab in space equivalents
* @param indentWidth the size of the indent in space equivalents
* @return the indent part of <code>line</code>, but no odd spaces
* @return the indent part of {@code line}, but no odd spaces
* @since 3.1
*/
public static String getIndentString(String line, int tabWidth, int indentWidth) {
Expand Down Expand Up @@ -485,7 +485,7 @@ private static int findLastNonEmptyLineIndex(String[] sourceLines) {
* @param codeIndentLevel level of indentation
*
* @param project the java project from which to get the formatter
* preferences, or <code>null</code> for global preferences
* preferences, or {@code null} for global preferences
* @param newIndent new indent
* @param lineDelim line delimiter
* @return the changed code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
* implementation is consistent with the wrapper types java.lang.Float and
* java.lang.Double.</li>
* </ul>
* </p>
*
* @since 3.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@
* which lists all selected fields and methods. What exactly is listed and how members are separated
* is determined by a format template.
* <p>
*
* <p>
* To print out items of arrays and/or limit number items printed for arrays, collections and so on,
* various methods are used according to actual jdk compatibility:
* <table border="10">
* <table border="1">
* <tr>
* <td></td>
* <th><code>java.util.List</code></th>
Expand Down Expand Up @@ -110,7 +108,7 @@
* <td>-</td>
* <td>-</td>
* <td>-</td>
* <td><code>Arrays.toString()<code></td>
* <td><code>Arrays.toString()</code></td>
* <td><code>Arrays.asList(member)</code></td>
* </tr>
* <tr>
Expand All @@ -132,7 +130,6 @@
* </table>
* Additionally, if helper method is generated it is also used for other members members (even if
* other solution could be used), as it makes the code cleaner.
* </p>
*
* @since 3.5
*/
Expand Down Expand Up @@ -247,7 +244,7 @@ protected void createMethodComment() throws CoreException {
*
* @param array if true, generated method will convert array to string, otherwise -
* <code>Collection</code>
* @return <code>arrayToString(Object[] array)</code> or </code>collectionToString(Collection
* @return <code>arrayToString(Object[] array)</code> or <code>collectionToString(Collection
* collection)</code> method
*/
protected MethodDeclaration createHelperToStringMethod(boolean array) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
* <li>Provides a result method (usually <code>toString()</code>), that is a method that takes no
* arguments and returns a String</li>
* </ul>
* </p>
* <p>
* Generated methods look like this:
*
Expand All @@ -77,8 +76,6 @@
* }
* </pre>
*
* </p>
*
* @since 3.5
*/
public class CustomBuilderGenerator extends AbstractToStringGenerator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.IfStatement;
import org.eclipse.jdt.core.dom.InfixExpression.Operator;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.Statement;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.InfixExpression.Operator;

/**
* <p>
Expand All @@ -42,8 +42,6 @@
* }
* </pre>
*
* </p>
*
* @since 3.5
*/
public class StringBuilderChainGenerator extends StringBuilderGenerator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
* }
* </pre>
*
* </p>
*
* @since 3.5
*/
public class StringBuilderGenerator extends AbstractToStringGenerator {
Expand Down
Loading

0 comments on commit f1bf7a1

Please sign in to comment.