Skip to content

Commit

Permalink
Merge branch 'eclipse-jdt:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahzaibIbrahim authored Mar 9, 2024
2 parents b745dc6 + cb1cc46 commit 2a539b2
Show file tree
Hide file tree
Showing 156 changed files with 2,729 additions and 724 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CodeQL call

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '15 8 * * 1'

jobs:
callCodeQLworkflow:
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/codeQLworkflow.yml@master
1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Pbuild-individual-bundles
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh """
mvn -U -e -DskipTests=false -Dmaven.repo.local=$WORKSPACE/.m2/repository \
clean verify --batch-mode --fail-at-end -Pbuild-individual-bundles \
clean verify --batch-mode --fail-at-end \
-Pbree-libs -Papi-check -Pjavadoc \
-Dmaven.test.failure.ignore=true \
-Dcompare-version-with-baselines.skip=false
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.bcoview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.ui</artifactId>
<groupId>eclipse.jdt.ui</groupId>
<version>4.31.0-SNAPSHOT</version>
<version>4.32.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.bcoview</artifactId>
Expand Down
9 changes: 9 additions & 0 deletions org.eclipse.jdt.core.manipulation/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@
</message_arguments>
</filter>
</resource>
<resource path="core extension/org/eclipse/jdt/internal/corext/fix/OneIfRatherThanDuplicateBlocksThatFallThroughFixCore.java" type="org.eclipse.jdt.internal.corext.fix.OneIfRatherThanDuplicateBlocksThatFallThroughFixCore$OneIfRatherThanDuplicateBlocksThatFallThroughFinder$SuccessiveIfVisitor$PatternNameVisitor">
<filter comment="Allow TypePattern.patternVariables() call" id="640712815">
<message_arguments>
<message_argument value="TypePattern"/>
<message_argument value="PatternNameVisitor"/>
<message_argument value="patternVariables()"/>
</message_arguments>
</filter>
</resource>
<resource path="core extension/org/eclipse/jdt/internal/corext/fix/PatternMatchingForInstanceofFixCore.java" type="org.eclipse.jdt.internal.corext.fix.PatternMatchingForInstanceofFixCore$PatternMatchingForInstanceofFixOperation">
<filter comment="Need to set pattern of TypePatter" id="640712815">
<message_arguments>
Expand Down
20 changes: 10 additions & 10 deletions org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ Automatic-Module-Name: org.eclipse.jdt.core.manipulation
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core.manipulation; singleton:=true
Bundle-Version: 1.21.0.qualifier
Bundle-Version: 1.21.100.qualifier
Bundle-Vendor: %providerName
Bundle-Activator: org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ltk.core.refactoring;bundle-version="[3.6.0,4.0.0)",
org.eclipse.jdt.core;bundle-version="[3.36.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
org.eclipse.text;bundle-version="[3.12.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="3.19.400",
org.eclipse.core.filesystem;bundle-version="1.7.200",
org.eclipse.core.filebuffers;bundle-version="3.6.300",
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.31.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.20.0,4.0.0)",
org.eclipse.ltk.core.refactoring;bundle-version="[3.14.0,4.0.0)",
org.eclipse.jdt.core;bundle-version="[3.38.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.9.0,4.0.0)",
org.eclipse.text;bundle-version="[3.14.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="3.21.0",
org.eclipse.core.filesystem;bundle-version="1.10.0",
org.eclipse.core.filebuffers;bundle-version="3.8.0",
org.eclipse.search.core;bundle-version="3.16.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.jdt.core.manipulation,
Expand Down
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 @@ -285,7 +285,7 @@ public boolean visit(MethodDeclaration node) {
for (TagElement tag : tags) {
String tagName= tag.getTagName();
if (TagElement.TAG_EXCEPTION.equals(tagName) || TagElement.TAG_THROWS.equals(tagName)) {
ASTNode name= (ASTNode) tag.fragments().get(0);
ASTNode name= tag.fragments().isEmpty() ? null : (ASTNode) tag.fragments().get(0);
if (name instanceof Name) {
if (name != fSelectedNode && Bindings.equals(fException, ((Name) name).resolveBinding())) {
fResult.add(new OccurrenceLocation(name.getStartPosition(), name.getLength(), 0, fDescription));
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
Loading

0 comments on commit 2a539b2

Please sign in to comment.