Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/dom')
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java62
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java124
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java18
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java82
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java24
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java22
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BaseCallMessageSend.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BreakStatement.java16
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java22
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DoStatement.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExportsDirective.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IDocElement.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java26
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IModuleBinding.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IPackageBinding.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java50
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InternalASTRewrite.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java18
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePairBinding.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java62
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodMappingBinding.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleBinding.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnvironmentWithProgress.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameQualifiedType.java12
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/OpensDirective.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ProvidesDirective.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java12
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java14
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredPackageBinding.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java26
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchExpression.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TSuperConstructorInvocation.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TagElement.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TextBlock.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java16
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/UnionType.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java14
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/YieldStatement.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java72
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java36
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java22
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java236
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java30
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java10
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/imports/ImportGroupComparator.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java10
80 files changed, 649 insertions, 649 deletions
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
index 83b087580..e3f199f2c 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
@@ -135,7 +135,7 @@ public final class AST {
* @since 3.1
*/
/*package*/ static final int JLS2_INTERNAL = JLS2;
-
+
/**
* Constant for indicating the AST API that handles JLS3.
* <p>
@@ -152,7 +152,7 @@ public final class AST {
* @deprecated Clients should use the {@link #JLS_Latest} AST API instead.
*/
public static final int JLS3 = 3;
-
+
/**
* Internal synonym for {@link #JLS3}. Use to alleviate
* deprecation warnings.
@@ -176,14 +176,14 @@ public final class AST {
* @deprecated Clients should use the {@link #JLS_Latest} AST API instead.
*/
public static final int JLS4 = 4;
-
+
/**
* Internal synonym for {@link #JLS4}. Use to alleviate
* deprecation warnings.
* @since 3.10
*/
/*package*/ static final int JLS4_INTERNAL = JLS4;
-
+
/**
* Constant for indicating the AST API that handles JLS8.
* <p>
@@ -207,7 +207,7 @@ public final class AST {
* @since 3.14
*/
/*package*/ static final int JLS8_INTERNAL = JLS8;
-
+
/**
* Constant for indicating the AST API that handles JLS9.
* <p>
@@ -231,7 +231,7 @@ public final class AST {
* @since 3.14
*/
/*package*/ static final int JLS9_INTERNAL = JLS9;
-
+
/**
* Constant for indicating the AST API that handles JLS10.
* <p>
@@ -276,10 +276,10 @@ public final class AST {
/**
* Internal synonym for {@link #JLS11}. Use to alleviate
* deprecation warnings once JLS11 is deprecated
- * @since 3.14
+ * @since 3.14
*/
/*package*/ static final int JLS11_INTERNAL = JLS11;
-
+
/**
* Constant for indicating the AST API that handles JLS12.
* <p>
@@ -298,10 +298,10 @@ public final class AST {
/**
* Internal synonym for {@link #JLS12}. Use to alleviate
* deprecation warnings once JLS12 is deprecated
- * @since 3.18
+ * @since 3.18
*/
static final int JLS12_INTERNAL = JLS12;
-
+
/**
* Constant for indicating the AST API that handles JLS13.
* <p>
@@ -317,11 +317,11 @@ public final class AST {
* @since 3.20
*/
public static final int JLS13 = 13;
-
+
/**
* Internal synonym for {@link #JLS13}. Use to alleviate
* deprecation warnings once JLS13 is deprecated
- * @since 3.20
+ * @since 3.20
*/
static final int JLS13_INTERNAL = JLS13;
@@ -340,7 +340,7 @@ public final class AST {
* @since 3.22
*/
public static final int JLS14 = 14;
-
+
/**
* Internal synonym for {@link #JLS14}. Use to alleviate
* deprecation warnings once JLS14 is deprecated
@@ -351,7 +351,7 @@ public final class AST {
@SuppressWarnings("unused")
/* Used for Java doc only*/
private static final int JLS_Latest = JLS14;
-
+
/*
* Must not collide with a value for ICompilationUnit constants
*/
@@ -478,7 +478,7 @@ public final class AST {
public static AST newAST(int level) {
return new AST(level, false);
}
-
+
/**
* Creates a new Java abstract syntax tree
* (AST) following the specified set of API rules.
@@ -955,7 +955,7 @@ public final class AST {
null/*taskPriorities*/,
true/*taskCaseSensitive*/,
false/*isPreviewEnabled*/);
- break;
+ break;
case JLS9_INTERNAL :
this.apiLevel = level;
// initialize a scanner
@@ -969,7 +969,7 @@ public final class AST {
null/*taskPriorities*/,
true/*taskCaseSensitive*/,
false/*isPreviewEnabled*/);
- break;
+ break;
case JLS10_INTERNAL :
this.apiLevel = level;
// initialize a scanner
@@ -983,7 +983,7 @@ public final class AST {
null/*taskPriorities*/,
true/*taskCaseSensitive*/,
false/*isPreviewEnabled*/);
- break;
+ break;
case JLS11_INTERNAL :
this.apiLevel = level;
// initialize a scanner
@@ -1832,7 +1832,7 @@ public final class AST {
/**
* Creates an unparented creation reference node owned by this AST.
* By default, the type is unspecified (but legal), and there are no type arguments.
- *
+ *
* @return a new unparented creation reference expression node
* @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
* @since 3.10
@@ -2189,7 +2189,7 @@ public final class AST {
* Creates an unparented lambda expression node owned by this AST.
* By default, the new lambda expression has parentheses enabled, contains an empty argument
* list, and the body is an empty block.
- *
+ *
* @return a new unparented lambda expression node
* @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
* @since 3.10
@@ -2293,7 +2293,7 @@ public final class AST {
result.setConstructor(false);
result.setParent(declaringType, declaringType.getBodyDeclarationsProperty());
return result;
- }
+ }
// SH}
/**
@@ -2949,7 +2949,7 @@ public final class AST {
/**
* Creates and returns a new unparented switch expression node
- * owned by this AST. By default, the expression is unspecified, but legal,
+ * owned by this AST. By default, the expression is unspecified, but legal,
* and there are no statements or switch cases.
*
* @return a new unparented labeled switch expression node
@@ -2959,11 +2959,11 @@ public final class AST {
SwitchExpression result = new SwitchExpression(this);
return result;
}
-
+
/**
* Creates a new unparented switch case statement node owned by
- * this AST. By default, the node has no expression, but legal, and
- * switchLabeledRule is false which indicates ":".
+ * this AST. By default, the node has no expression, but legal, and
+ * switchLabeledRule is false which indicates ":".
*
* @return a new unparented switch case node
*/
@@ -3035,7 +3035,7 @@ public final class AST {
TagElement result = new TagElement(this);
return result;
}
-
+
/**
* Creates an unparented yield statement node owned by this AST. The yield statement has no
* label/identifier/expression and is not implicit.
@@ -3183,7 +3183,7 @@ public final class AST {
* Creates an unparented type method reference node owned by this AST.
* By default, the type and method name are unspecified (but legal),
* and there are no type arguments.
- *
+ *
* @return a new unparented type method reference node
* @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
* @since 3.10
@@ -3903,10 +3903,10 @@ public final class AST {
throw new UnsupportedOperationException("Operation not supported in JLS2 AST"); //$NON-NLS-1$
}
}
-
-
+
+
/**
- *
+ *
* @return If previewEnabled flag is set to <code>true</code>, return <code>true</code> else <code>false</code>
* @since 3.21
* @noreference This method is not intended to be referenced by clients.
@@ -3916,7 +3916,7 @@ public final class AST {
}
/**
- *
+ *
* @return If preview is enabled and apiLevel is latest, return <code>true</code> else <code>false</code>
* @since 3.19
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
index 688160f66..097f2b036 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
@@ -315,7 +315,7 @@ class ASTConverter {
// Convert javadoc
convert(typeDeclaration.javadoc, typeDecl);
}
-
+
protected void buildBodyDeclarations(
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration,
RecordDeclaration recordDeclaration,
@@ -351,7 +351,7 @@ class ASTConverter {
} else {
fieldsIndex++;
}
-
+
}
if (methodsIndex < methodsLength) {
nextMethodDeclaration = methods[methodsIndex];
@@ -360,11 +360,11 @@ class ASTConverter {
position = nextMethodDeclaration.declarationSourceStart;
nextDeclarationType = 1; // METHOD
}
-
- } else {
- methodsIndex++;
+
+ } else {
+ methodsIndex++;
}
-
+
}
if (membersIndex < membersLength) {
nextMemberDeclaration = members[membersIndex];
@@ -563,7 +563,7 @@ class ASTConverter {
private static void internalSetExpression(SwitchCase switchCase, Expression exp) {
switchCase.setExpression(exp);
}
- /**
+ /**
* Internal access method to SingleVariableDeclaration#setExtraDimensions() for avoiding deprecated warnings
*
* @param node
@@ -573,7 +573,7 @@ class ASTConverter {
private static void internalSetExtraDimensions(SingleVariableDeclaration node, int dimensions) {
node.setExtraDimensions(dimensions);
}
- /**
+ /**
* Internal access method to VariableDeclarationFragment#setExtraDimensions() for avoiding deprecated warnings
*
* @param node
@@ -583,7 +583,7 @@ class ASTConverter {
private static void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
node.setExtraDimensions(dimensions);
}
- /**
+ /**
* Internal access method to MethodDeclaration#setExtraDimension() for avoiding deprecated warnings
*
* @param node
@@ -593,7 +593,7 @@ class ASTConverter {
private static void internalSetExtraDimensions(MethodDeclaration node, int dimensions) {
node.setExtraDimensions(dimensions);
}
- /**
+ /**
* Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings
*
* @param node
@@ -726,7 +726,7 @@ class ASTConverter {
}
}
}
-
+
/**
* @deprecated
*/
@@ -774,7 +774,7 @@ class ASTConverter {
}
internalThownExceptions(methodDecl).add(thrownException);
} while (i < thrownExceptionsLength);
- methodHeaderEnd = thrownException.getStartPosition() + thrownException.getLength();
+ methodHeaderEnd = thrownException.getStartPosition() + thrownException.getLength();
} else {
Type thrownExceptionType;
int i = 0;
@@ -782,7 +782,7 @@ class ASTConverter {
thrownExceptionType = convertType(thrownExceptions[i++]);
methodDecl.thrownExceptionTypes().add(thrownExceptionType);
} while (i < thrownExceptionsLength);
- methodHeaderEnd = thrownExceptionType.getStartPosition() + thrownExceptionType.getLength();
+ methodHeaderEnd = thrownExceptionType.getStartPosition() + thrownExceptionType.getLength();
}
}
@@ -1658,13 +1658,13 @@ class ASTConverter {
this.scanner.setSource(source, unit.compilationResult);
CompilationUnit compilationUnit = new CompilationUnit(this.ast);
compilationUnit.setStatementsRecoveryData(unit.compilationResult.recoveryScannerData);
-
+
// Parse comments
int[][] comments = unit.comments;
if (comments != null) {
buildCommentsTable(compilationUnit, comments);
}
-
+
// handle the package declaration immediately
// There is no node corresponding to the package declaration
if (this.resolveBindings) {
@@ -1681,7 +1681,7 @@ class ASTConverter {
compilationUnit.imports().add(convertImport(imports[i]));
}
}
-
+
org.eclipse.jdt.internal.compiler.ast.ModuleDeclaration mod = unit.moduleDeclaration;
if (mod != null) {
ASTNode declaration = convertToModuleDeclaration(mod);
@@ -2418,7 +2418,7 @@ class ASTConverter {
public void convert(org.eclipse.jdt.internal.compiler.ast.Javadoc javadoc, IGetJavaDoc getJ, ISetJavaDoc setJ) {
if (getJ.getJavaDoc() == null) {
Javadoc docComment = convert(javadoc);
- if (docComment != null)
+ if (docComment != null)
setJ.setJavadoc(docComment);
}
}
@@ -2670,7 +2670,7 @@ class ASTConverter {
public Expression convert(org.eclipse.jdt.internal.compiler.ast.LambdaExpression lambda) {
if (this.ast.apiLevel < AST.JLS8_INTERNAL) {
- return createFakeNullLiteral(lambda);
+ return createFakeNullLiteral(lambda);
}
final LambdaExpression lambdaExpression = new LambdaExpression(this.ast);
if (this.resolveBindings) {
@@ -2695,10 +2695,10 @@ class ASTConverter {
}
variableDeclarationFragment.setName(simpleName);
variableDeclarationFragment.setSourceRange(start, end - start + 1);
- lambdaExpression.parameters().add(variableDeclarationFragment);
+ lambdaExpression.parameters().add(variableDeclarationFragment);
} else {
SingleVariableDeclaration singleVariableDeclaration = convert(argument);
- lambdaExpression.parameters().add(singleVariableDeclaration);
+ lambdaExpression.parameters().add(singleVariableDeclaration);
}
}
}
@@ -3106,12 +3106,12 @@ class ASTConverter {
if (this.resolveBindings) {
recordNodes(result, reference);
}
- int sourceStart = reference.sourceStart;
+ int sourceStart = reference.sourceStart;
result.setSourceRange(sourceStart, reference.sourceEnd - sourceStart + 1);
return result;
}
-
+
public ReturnStatement convert(org.eclipse.jdt.internal.compiler.ast.ReturnStatement statement) {
final ReturnStatement returnStatement = new ReturnStatement(this.ast);
returnStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1);
@@ -3283,10 +3283,10 @@ class ASTConverter {
literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
return literal;
}
-
+
public Expression convert(org.eclipse.jdt.internal.compiler.ast.SwitchExpression expression) {
if (this.ast.apiLevel < AST.JLS14) {
- return createFakeNullLiteral(expression);
+ return createFakeNullLiteral(expression);
}
SwitchExpression switchExpression = new SwitchExpression(this.ast);
if (this.resolveBindings) {
@@ -3310,7 +3310,7 @@ class ASTConverter {
}
return switchExpression;
}
-
+
public SwitchStatement convert(org.eclipse.jdt.internal.compiler.ast.SwitchStatement statement) {
SwitchStatement switchStatement = new SwitchStatement(this.ast);
switchStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1);
@@ -3342,7 +3342,7 @@ class ASTConverter {
public Expression convert(org.eclipse.jdt.internal.compiler.ast.TextBlock expression) {
if (!this.ast.isPreviewEnabled()) {
- return createFakeNullLiteral(expression);
+ return createFakeNullLiteral(expression);
}
int length = expression.sourceEnd - expression.sourceStart + 1;
int sourceStart = expression.sourceStart;
@@ -3354,7 +3354,7 @@ class ASTConverter {
literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
return literal;
}
-
+
public Expression convert(org.eclipse.jdt.internal.compiler.ast.ThisReference reference) {
if (reference.isImplicitThis()) {
// There is no source associated with an implicit this
@@ -3680,7 +3680,7 @@ class ASTConverter {
public Statement convert(org.eclipse.jdt.internal.compiler.ast.YieldStatement statement) {
if (this.ast.apiLevel < AST.JLS14) {
- return createFakeEmptyStatement(statement);
+ return createFakeEmptyStatement(statement);
}
YieldStatement yieldStatement = new YieldStatement(this.ast);
// We don't need to record Nodes
@@ -3689,7 +3689,7 @@ class ASTConverter {
yieldStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1);
return yieldStatement;
}
-
+
public ImportDeclaration convertImport(org.eclipse.jdt.internal.compiler.ast.ImportReference importReference) {
final ImportDeclaration importDeclaration = new ImportDeclaration(this.ast);
Name name = getImportName(importReference);
@@ -3842,7 +3842,7 @@ class ASTConverter {
}
return enumDeclaration2;
}
-
+
private RecordDeclaration convertToRecordDeclaration(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) {
checkCanceled();
// record declaration cannot be built if the source is not >= 14, since record is then seen as an identifier
@@ -3854,7 +3854,7 @@ class ASTConverter {
recordDeclaration.setName(typeName);
recordDeclaration.setSourceRange(typeDeclaration.declarationSourceStart, typeDeclaration.bodyEnd - typeDeclaration.declarationSourceStart + 1);
recordDeclaration.setRestrictedIdentifierStartPosition(typeDeclaration.restrictedIdentifierStart);
-
+
org.eclipse.jdt.internal.compiler.ast.TypeReference[] superInterfaces = typeDeclaration.superInterfaces;
if (superInterfaces != null) {
for (TypeReference superInterface : superInterfaces) {
@@ -3907,9 +3907,9 @@ class ASTConverter {
}
/**
- * If there is a parsing error causing a recovered module the source positions may be updated only partially.
- * See bug 518843 for a case where this issue occurred. This method provide a safety net with
- * source positions updated even in case of a recovery - if there is no recovery, the source positions will
+ * If there is a parsing error causing a recovered module the source positions may be updated only partially.
+ * See bug 518843 for a case where this issue occurred. This method provide a safety net with
+ * source positions updated even in case of a recovery - if there is no recovery, the source positions will
* be retained in-tact identical to the compile time ast module node.
*/
private int getKnownEnd(ModuleDeclaration md, int sourceEnd, int declSourceEnd) {
@@ -3965,7 +3965,7 @@ class ASTConverter {
TypeReference usesRef = usesStatement.serviceInterface;
Name name = convert(usesRef);
stmt.setName(name);
- stmt.setSourceRange(usesStatement.declarationSourceStart, usesStatement.declarationSourceEnd - usesStatement.declarationSourceStart + 1);
+ stmt.setSourceRange(usesStatement.declarationSourceStart, usesStatement.declarationSourceEnd - usesStatement.declarationSourceStart + 1);
tSet.add(stmt);
}
for (int i = 0; i < moduleDeclaration.servicesCount; ++i) {
@@ -4073,7 +4073,7 @@ class ASTConverter {
int typeEnd = type.getStartPosition() + type.getLength() - 1;
// https://bugs.eclipse.org/393719 - [compiler] inconsistent warnings on iteration variables
// compiler considers collectionExpression as within the declarationSourceEnd, DOM AST must use the shorter range to avoid overlap
- int sourceEnd = ((localDeclaration.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.IsForeachElementVariable) != 0)
+ int sourceEnd = ((localDeclaration.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.IsForeachElementVariable) != 0)
? localDeclaration.sourceEnd : localDeclaration.declarationSourceEnd;
int rightEnd = Math.max(typeEnd, sourceEnd);
/*
@@ -4214,7 +4214,7 @@ class ASTConverter {
}
}
}
-
+
private void setTypeAnnotationsAndSourceRangeOnArray(ArrayType arrayType, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) {
List dimensions = arrayType.dimensions();
Type elementType = arrayType.getElementType();
@@ -4234,7 +4234,7 @@ class ASTConverter {
end = startArray - 1;
}
arrayType.setSourceRange(start, end - start + 1);
-
+
start = startArray;
for (int i = 0; i < dimensions.size(); i++) {
Dimension currentDimension = (Dimension) dimensions.get(i);
@@ -4256,7 +4256,7 @@ class ASTConverter {
if (this.ast.apiLevel() >= AST.JLS10_INTERNAL && type.isVar()) {
SimpleName varName = (SimpleName) ((SimpleType) type).getName();
varName.setVar(true);
- recordNodes(varName, localDeclaration);
+ recordNodes(varName, localDeclaration);
}
}
if (localDeclaration.modifiersSourceStart != -1) {
@@ -4383,7 +4383,7 @@ class ASTConverter {
if (positions[0] != -1) {
simpleName.setSourceRange(positions[0], end - positions[0] + 1);
} else {
- simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
+ simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
}
switch(this.ast.apiLevel) {
@@ -4405,7 +4405,7 @@ class ASTConverter {
annotateType(simpleType, annotations);
}
int newSourceStart = simpleType.getStartPosition();
- if (newSourceStart > 0 && newSourceStart < sourceStart)
+ if (newSourceStart > 0 && newSourceStart < sourceStart)
sourceStart = newSourceStart;
final ParameterizedType parameterizedType = new ParameterizedType(this.ast);
parameterizedType.setType(simpleType);
@@ -4512,10 +4512,10 @@ class ASTConverter {
isTypeArgumentBased = false;
break;
}
- }
+ }
int start = (int) (positions[0] >>> 32);
int end = (int) positions[firstTypeIndex];
-
+
Type currentType = createBaseType(typeReference, positions, typeAnnotations, tokens, lenth, firstTypeIndex, isTypeArgumentBased);
int indexOfEnclosingType = 1;
if (typeArguments != null && (arguments = typeArguments[firstTypeIndex]) != null) {
@@ -4526,7 +4526,7 @@ class ASTConverter {
if (this.resolveBindings) {
recordNodes(parameterizedType, typeReference);
}
- Type type2 = null;
+ Type type2 = null;
for (int i = 0; i < arglen; ++i ) {
type2 = convertType(arguments[i]);
parameterizedType.typeArguments().add(type2);
@@ -4538,7 +4538,7 @@ class ASTConverter {
parameterizedType.setSourceRange(start, end - start + 1);
currentType = parameterizedType;
}
-
+
for (int i = firstTypeIndex + 1; i < lenth; ++i) {
SimpleName simpleName = new SimpleName(this.ast);
simpleName.setIdentifier(new String(tokens[i]));
@@ -4566,7 +4566,7 @@ class ASTConverter {
}
currentType = qualifiedType;
indexOfEnclosingType++;
-
+
if (typeArguments != null && (arguments = typeArguments[i]) != null) {
int arglen = arguments.length;
qualifiedType.index = indexOfEnclosingType;
@@ -4576,7 +4576,7 @@ class ASTConverter {
if (this.resolveBindings) {
recordNodes(parameterizedType, typeReference);
}
- Type type2 = null;
+ Type type2 = null;
for (int j = 0; j < arglen; ++j ) {
type2 = convertType(arguments[j]);
parameterizedType.typeArguments().add(type2);
@@ -4591,14 +4591,14 @@ class ASTConverter {
}
type = currentType;
}
- } else if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) {
+ } else if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference;
long[] positions = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).sourcePositions;
org.eclipse.jdt.internal.compiler.ast.Annotation [][] typeAnnotations = typeReference.annotations;
char [][] tokens = qualifiedTypeReference.tokens;
int lenth = tokens.length;
int firstTypeIndex = lenth;
-
+
if (typeAnnotations != null) {
for (int i = 0; i < lenth; ++i) {
if (typeAnnotations[i] != null) {
@@ -4606,7 +4606,7 @@ class ASTConverter {
break;
}
}
- }
+ }
//{ObjectTeams: revert anchored types like in MyTeam.this._OT$base.R => base.R
org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBindingOT =
((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).resolvedType;
@@ -4711,7 +4711,7 @@ class ASTConverter {
break;
}
}
- }
+ }
if (sawDiamond) {
switch(this.ast.apiLevel) {
case AST.JLS2_INTERNAL :
@@ -4750,12 +4750,12 @@ class ASTConverter {
nameQualifiedType.setQualifier(name);
nameQualifiedType.setName(createSimpleName(typeReference, positions, tokens, firstTypeIndex));
setSourceRangeAnnotationsAndRecordNodes(typeReference, nameQualifiedType, positions, typeAnnotations, firstTypeIndex, 0, firstTypeIndex);
- currentType = nameQualifiedType;
+ currentType = nameQualifiedType;
} else {
- SimpleType simpleType = this.ast.newSimpleType(name);
+ SimpleType simpleType = this.ast.newSimpleType(name);
setSourceRangeAnnotationsAndRecordNodes(typeReference, simpleType, positions, typeAnnotations, 0, 0, name.index > 0 ? name.index - 1 : 0);
currentType = createQualifiedType(typeReference, positions, typeAnnotations, tokens, firstTypeIndex, simpleType);
- if (createNameQualifiedType)
+ if (createNameQualifiedType)
currentType.setFlags(currentType.getFlags() | ASTNode.MALFORMED);
}
}
@@ -4801,7 +4801,7 @@ class ASTConverter {
}
}
- private void setSourceRangeAnnotationsAndRecordNodes(TypeReference typeReference, AnnotatableType annotatableType,
+ private void setSourceRangeAnnotationsAndRecordNodes(TypeReference typeReference, AnnotatableType annotatableType,
long[] positions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations, int index, int startIndex, int endIndex) {
int start = (int) (positions[startIndex] >>> 32);
int end = (int) positions[endIndex];
@@ -5502,7 +5502,7 @@ class ASTConverter {
/**
* This method is used to retrieve the start and end position of a name or primitive type token.
- *
+ *
* @return int[] a single dimensional array, with two elements, for the start and end positions of the name respectively
*/
protected int[] retrieveEndOfElementTypeNamePosition(int start, int end) {
@@ -5685,7 +5685,7 @@ class ASTConverter {
if (hasAnnotations) {
if (token == TerminalTokens.TokenNameLPAREN) ++lParenCount;
else if (token == TerminalTokens.TokenNameRPAREN) {
- --lParenCount;
+ --lParenCount;
continue;
}
if (lParenCount > 0) continue;
@@ -5753,7 +5753,7 @@ class ASTConverter {
}
return -1;
}
-
+
protected int retrieveProperRightBracketPosition(int bracketNumber, int start) {
return retrieveProperRightBracketPosition(bracketNumber, start, this.compilationUnitSourceLength);
}
@@ -5968,7 +5968,7 @@ class ASTConverter {
this.scanner.resetTo(enumDeclaration2.declarationSourceStart, enumDeclaration2.sourceStart);
this.setModifiers(enumDeclaration, enumDeclaration2.annotations, enumDeclaration2.sourceStart);
}
-
+
protected void setModifiers(RecordDeclaration recordDeclaration, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration recordDeclaration2) {
this.scanner.resetTo(recordDeclaration2.declarationSourceStart, recordDeclaration2.sourceStart);
this.setModifiers(recordDeclaration, recordDeclaration2.annotations, recordDeclaration2.sourceStart);
@@ -6558,7 +6558,7 @@ class ASTConverter {
/** extracts the subArrayType for a given declaration for AST levels less
* @param arrayType parent type
- * @param remainingDimensions
+ * @param remainingDimensions
* @param dimensionsToRemove
* @return an ArrayType
*/
@@ -6661,7 +6661,7 @@ class ASTConverter {
singleVariableDeclaration.setType(subarrayType);
}
checkAndSetMalformed(type, singleVariableDeclaration);
-
+
} else {
singleVariableDeclaration.setType(type);
}
@@ -6940,7 +6940,7 @@ class ASTConverter {
result.setSourceRange(start, end-start+1);
return result;
}
-
+
/**
* annotations for method mappings:
* @param mappingDecl
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
index fc9f7e44e..1f80f6d19 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
@@ -1183,9 +1183,9 @@ public class ASTMatcher {
return false;
}
InstanceofExpression o = (InstanceofExpression) other;
- return
+ return
safeSubtreeMatch(node.getLeftOperand(), o.getLeftOperand())
- && safeSubtreeMatch(node.getRightOperand(), o.getRightOperand())
+ && safeSubtreeMatch(node.getRightOperand(), o.getRightOperand())
&& ((DOMASTUtil.isInstanceofExpressionPatternSupported(node.getAST())) ? safeSubtreeMatch(node.getPatternVariable(), o.getPatternVariable())
: true);
}
@@ -1296,7 +1296,7 @@ public class ASTMatcher {
* other object is a node of the same type with structurally isomorphic
* child subtrees. Subclasses may override this method as needed.
* </p>
- *
+ *
* @param node the node
* @param other the other object, or <code>null</code>
* @return <code>true</code> if the subtree matches, or
@@ -1974,7 +1974,7 @@ public class ASTMatcher {
&& safeSubtreeListMatch(node.bodyDeclarations(), o.bodyDeclarations())
&& safeSubtreeMatch(node.recordComponents(), o.recordComponents()));
}
-
+
/**
* Returns whether the given node and the other object match.
* <p>
@@ -2277,7 +2277,7 @@ public class ASTMatcher {
* @return <code>true</code> if the subtree matches, or
* <code>false</code> if they do not match or the other object has a
* different node type or is <code>null</code>
- *
+ *
* @since 3.10
*/
public boolean match(SuperMethodReference node, Object other) {
@@ -2313,7 +2313,7 @@ public class ASTMatcher {
? safeSubtreeListMatch(node.expressions(), o.expressions())
: compareDeprecatedSwitchExpression(node, o));
}
-
+
/**
* Return whether the deprecated comment strings of the given java doc are equals.
* <p>
@@ -2331,7 +2331,7 @@ public class ASTMatcher {
* other object is a node of the same type with structurally isomorphic
* child subtrees. Subclasses may override this method as needed.
* </p>
- *
+ *
* @param node the node
* @param other the other object, or <code>null</code>
* @return <code>true</code> if the subtree matches, or
@@ -2445,7 +2445,7 @@ public class ASTMatcher {
TextBlock o = (TextBlock) other;
return safeEquals(node.getEscapedValue(), o.getEscapedValue());
}
-
+
/**
* Returns whether the given node and the other object match.
* <p>
@@ -2894,7 +2894,7 @@ public class ASTMatcher {
&& node.isUpperBound() == o.isUpperBound()
&& safeSubtreeMatch(node.getBound(), o.getBound());
}
-
+
/**
* Returns whether the given node and the other object match.
* <p>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
index 44e574ea0..daea82c91 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
@@ -131,7 +131,7 @@ public abstract class ASTNode {
/*
* ATTENTION: When doing anything to the ASTNode hierarchy, do not try to
* reinvent the wheel.
- *
+ *
* Look out for precedents with
* - the same structural property type
* - for child node properties: the same optionality (can be null / lazy initialization blurbs and impl.)
@@ -139,9 +139,9 @@ public abstract class ASTNode {
* - a similar history (added in JLSx API, below JLSx only, replaced by {@link #xx})
* ..., and copy what was done there. Most of the code and
* Javadoc in this package should look like it was created by a code generator.
- *
+ *
* In subclasses of ASTNode, order properties by order of occurrence in source.
- * In general classes that list all AST node types, order alphabetically.
+ * In general classes that list all AST node types, order alphabetically.
*/
/*
@@ -181,27 +181,27 @@ public abstract class ASTNode {
/*
* INSTRUCTIONS FOR ADDING A NEW PROPERTY TO AN AST NODE TYPE
- *
+ *
* For concrete node types, use e.g. properties of SimpleName or ClassInstanceCreation
* as templates:
- *
+ *
* 1. Copy/paste the field, property descriptor, and getter/setter.
- *
+ *
* 2. Adjust everything to the new property name and type. In the field's
* Javadoc, properly document default value, initialization, and applicable
* API levels.
- *
+ *
* 3. Add/remove @since tags as necessary.
- *
+ *
* 4. Search for references to the members in the template, and add similar
* references in corresponding places for the new property.
- *
- *
+ *
+ *
* For abstract node types, use AbstractTypeDeclaration as a template:
- *
+ *
* 1. Same steps as above, but take extra care to copy and adjust the
- * *internal*() methods as well.
- *
+ * *internal*() methods as well.
+ *
* 2. Search for references to the members in the template, and add similar
* references in corresponding places for the new property (e.g. property
* descriptor in each leaf type).
@@ -209,17 +209,17 @@ public abstract class ASTNode {
/*
* INSTRUCTIONS FOR REPLACING/DEPRECATING A PROPERTY OF AN AST NODE
- *
+ *
* To replace a simple property with a child list property, see e.g. how
* SingleVariableDeclaration replaced MODIFIERS_PROPERTY with
* MODIFIERS2_PROPERTY.
- *
+ *
* 1. Reuse the old property id.
- *
+ *
* 2. Deprecate all references to the old property, except for the old
* getter, which should compute the value from the new property in
* later API levels.
- *
+ *
* To completely replace a property, see how ClassInstanceCreation replaced
* NAME_PROPERTY with TYPE_PROPERTY.
*/
@@ -915,7 +915,7 @@ public abstract class ASTNode {
* @since 3.14
*/
public static final int REQUIRES_DIRECTIVE = 94;
-
+
/**
* Node type constant indicating a node of type
* <code>ExportsDirective</code>.
@@ -931,7 +931,7 @@ public abstract class ASTNode {
* @since 3.14
*/
public static final int OPENS_DIRECTIVE = 96;
-
+
/**
* Node type constant indicating a node of type
* <code>UsesDirective</code>.
@@ -955,7 +955,7 @@ public abstract class ASTNode {
* @since 3.14
*/
public static final int MODULE_MODIFIER = 99;
-
+
/**
* Node type constant indicating a node of type
* <code>SwitchExpression</code>.
@@ -963,7 +963,7 @@ public abstract class ASTNode {
* @since 3.18
*/
public static final int SWITCH_EXPRESSION = 100;
-
+
/**
* Node type constant indicating a node of type
* <code>YieldStatement</code>.
@@ -971,7 +971,7 @@ public abstract class ASTNode {
* @since 3.20
*/
public static final int YIELD_STATEMENT = 101;
-
+
/**
* Node type constant indicating a node of type
* <code>TextBlock</code>.
@@ -979,7 +979,7 @@ public abstract class ASTNode {
* @since 3.20
*/
public static final int TEXT_BLOCK = 102;
-
+
/**
* Node type constant indicating a node of type
* <code>RecordDeclaration</code>.
@@ -987,7 +987,7 @@ public abstract class ASTNode {
* @since 3.22
*/
public static final int RECORD_DECLARATION = 103;
-
+
//{ObjectTeams: required OT specific node type constants added
private static final int LAST_JDT = 103;
@@ -2103,7 +2103,7 @@ public abstract class ASTNode {
*/
abstract List internalStructuralPropertiesForType(int apiLevel);
-
+
/**
* Returns a list of property descriptors for this node type.
* Clients must not modify the result. This abstract method
@@ -2123,7 +2123,7 @@ public abstract class ASTNode {
List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return internalStructuralPropertiesForType(apiLevel);
}
-
+
/**
* Internal helper method that starts the building a list of
* property descriptors for the given node type.
@@ -2175,7 +2175,7 @@ public abstract class ASTNode {
* <p>
* Use this method to prevent access to new properties that have been added in JLS3.
* </p>
- *
+ *
* @exception UnsupportedOperationException if this operation is used in a JLS2 AST
* @since 3.0
*/
@@ -2191,7 +2191,7 @@ public abstract class ASTNode {
* <p>
* Use this method to prevent access to new properties that have been added in JLS4.
* </p>
- *
+ *
* @exception UnsupportedOperationException if this operation is used in a JLS2 or JLS3 AST
* @since 3.7
*/
@@ -2200,14 +2200,14 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in JLS4 and later AST"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is not used when
* building JLS2 or JLS3 or JLS4 level ASTs.
* <p>
* Use this method to prevent access to new properties that have been added in JLS8.
* </p>
- *
+ *
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
*/
@@ -2255,14 +2255,14 @@ public abstract class ASTNode {
* </p>
*
* @exception UnsupportedOperationException if this operation is used below JLS11
- * @since 3.14
+ * @since 3.14
*/
final void unsupportedBelow11() {
if (this.ast.apiLevel < AST.JLS11_INTERNAL) {
throw new UnsupportedOperationException("Operation only supported in ASTs with level JLS11 and above"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is not used when
* building JLS2, JLS3, JLS4, JLS8, JLS9,JLS10 or JLS11 level ASTs.
@@ -2272,14 +2272,14 @@ public abstract class ASTNode {
*
* @exception UnsupportedOperationException if this operation is used below JLS12
* @deprecated
- * @since 3.16
+ * @since 3.16
*/
final void unsupportedBelow12() {
if (this.ast.apiLevel < AST.JLS12_INTERNAL) {
throw new UnsupportedOperationException("Operation only supported in ASTs with level JLS12 and above"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is not used when
* building JLS2, JLS3, JLS4, JLS8, JLS9, JLS10, JLS11, JLS12 or JSL13 level ASTs.
@@ -2295,8 +2295,8 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in ASTs with level JLS14 and above"); //$NON-NLS-1$
}
}
-
-
+
+
/**
* Checks that this AST operation is not used when
* building ASTs without previewEnabled flag.
@@ -2312,7 +2312,7 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in ASTs with previewEnabled flag as true"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is only used when
* building JLS2 level ASTs.
@@ -2336,7 +2336,7 @@ public abstract class ASTNode {
* <p>
* Use this method to prevent access to deprecated properties (deprecated in JLS8).
* </p>
- *
+ *
* @exception UnsupportedOperationException if this operation is used in an AST later than JLS4
* @since 3.10
*/
@@ -2346,7 +2346,7 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in JLS2, JLS3 and JLS4 ASTs"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is only used when
* building JLS12 level ASTs.
@@ -2363,7 +2363,7 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in JLS12 AST"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is only used when
* building JLS13 level ASTs.
@@ -2379,7 +2379,7 @@ public abstract class ASTNode {
throw new UnsupportedOperationException("Operation only supported in JLS13 AST"); //$NON-NLS-1$
}
}
-
+
/**
* Checks that this AST operation is only used when
* building JLS13 level ASTs.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
index 154b1eec3..3c20e3f12 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
@@ -131,7 +131,7 @@ public class ASTParser {
* Kind constant used to request that the source be parsed
* as a parameter mapping.
*/
- public static final int K_PARAMETER_MAPPING = 0x10;
+ public static final int K_PARAMETER_MAPPING = 0x10;
// SH}
/**
@@ -160,7 +160,7 @@ public class ASTParser {
* Compiler options. Defaults to JavaCore.getOptions().
*/
private Map<String, String> compilerOptions;
-
+
/**
* The focal point for a partial AST request.
* Only used when <code>partial</code> is <code>true</code>.
@@ -812,8 +812,8 @@ public class ASTParser {
* A successful call to this method returns all settings to their
* default values so the object is ready to be reused.
* </p>
- * <p>For identifying a module-info.java file as a special file instead of an ordinary
- * Java file (Since Java 9), a call to this should be preceded by a call to
+ * <p>For identifying a module-info.java file as a special file instead of an ordinary
+ * Java file (Since Java 9), a call to this should be preceded by a call to
* {@link #setUnitName(String)} that sets the unit name as module-info.java</p>
*
* @param monitor the progress monitor used to report progress and request cancellation,
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
index a126ca168..0433fa5d8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
@@ -1344,7 +1344,7 @@ public abstract class ASTVisitor {
public boolean visit(RecordDeclaration node) {
return true;
}
-
+
/**
* Visits the given type-specific AST node.
* <p>
@@ -1541,7 +1541,7 @@ public abstract class ASTVisitor {
public boolean visit(SwitchCase node) {
return true;
}
-
+
/**
* Visits the given type-specific AST node.
* <p>
@@ -1560,7 +1560,7 @@ public abstract class ASTVisitor {
public boolean visit(SwitchExpression node) {
return true;
}
-
+
/**
* Visits the given type-specific AST node.
* <p>
@@ -1630,7 +1630,7 @@ public abstract class ASTVisitor {
public boolean visit(TextBlock node) {
return true;
}
-
+
/**
* Visits the given type-specific AST node.
* <p>
@@ -1755,7 +1755,7 @@ public abstract class ASTVisitor {
* @return <code>true</code> if the children of this node should be
* visited, and <code>false</code> if the children of this node should
* be skipped
- *
+ *
* @since 3.10
*/
public boolean visit(TypeMethodReference node) {
@@ -1912,7 +1912,7 @@ public abstract class ASTVisitor {
public boolean visit(YieldStatement node) {
return true;
}
-
+
//{ObjectTeams: visit methods for OT-specific types
/**
* Visits the given type-specific AST node.
@@ -2694,7 +2694,7 @@ public abstract class ASTVisitor {
public void endVisit(LambdaExpression node) {
// default implementation: do nothing
}
-
+
/**
* End of visit the given type-specific AST node.
* <p>
@@ -2752,8 +2752,8 @@ public abstract class ASTVisitor {
public void endVisit(RecordDeclaration node) {
// default implementation: do nothing
}
-
-
+
+
/**
* End of visit the given type-specific AST node.
* <p>
@@ -2970,7 +2970,7 @@ public abstract class ASTVisitor {
public void endVisit(TextBlock node) {
// default implementation: do nothing
}
-
+
/**
* End of visit the given type-specific AST node.
* <p>
@@ -3333,7 +3333,7 @@ public abstract class ASTVisitor {
* </p>
*
* @param node the node to visit
- *
+ *
* @since 3.10
*/
public void endVisit(TypeMethodReference node) {
@@ -3452,7 +3452,7 @@ public abstract class ASTVisitor {
public void endVisit(WildcardType node) {
// default implementation: do nothing
}
-
+
/**
* End of visit the given type-specific AST node.
* <p>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java
index e4d43309c..d15f8bc49 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java
@@ -18,7 +18,7 @@ import java.util.List;
/**
* Abstract base class of AST nodes that represent an annotatable type (added in JLS8 API).
* <p>
- * Introduced in JLS8, type references that can be annotated are represented by
+ * Introduced in JLS8, type references that can be annotated are represented by
* AnnotatableType. For the list of types extending AnnotatableType, see {@link Type}.
* </p>
* <p>
@@ -31,7 +31,7 @@ import java.util.List;
* @since 3.10
*/
public abstract class AnnotatableType extends Type {
-
+
/**
* The annotations (element type: {@link Annotation}).
* Null in JLS < 8. Added in JLS8; defaults to an empty list
@@ -90,7 +90,7 @@ public abstract class AnnotatableType extends Type {
* Syntactically, type annotations can also be part of an associated declaration node's
* <code>modifiers()</code> list.
* </p>
- *
+ *
* @return the live list of annotations (element type: {@link Annotation})
* @exception UnsupportedOperationException if this operation is used below JLS8
* @see ITypeBinding#getTypeAnnotations()
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
index 0c8fef753..eb9b58e88 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
@@ -24,10 +24,10 @@ import java.util.List;
* be an array type) and a list of dimensions, each of which may have a list of annotations.
* </p>
* <pre>
- * ArrayType:
+ * ArrayType:
* Type Dimension <b>{</b> Dimension <b>}</b>
* </pre>
- *
+ *
* In JLS4 and before, array types were expressed in a recursive manner, one dimension at a time:
* <pre>
* ArrayType:
@@ -42,7 +42,7 @@ import java.util.List;
* is an <u><code>@A</code></u>-array of<br>
* <code><u>int </u>&nbsp;&nbsp;&nbsp;&nbsp;<u> @B[] @C[]</u></code>,
* but such a component type is not representable by nested <code>ArrayType</code>s with contiguous source ranges.
- *
+ *
* @since 2.0
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -63,14 +63,14 @@ public class ArrayType extends Type {
* @since 3.10
*/
public static final ChildPropertyDescriptor ELEMENT_TYPE_PROPERTY =
- new ChildPropertyDescriptor(ArrayType.class, "elementType", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
-
+ new ChildPropertyDescriptor(ArrayType.class, "elementType", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
+
/**
* The "dimensions" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
* @since 3.10
*/
public static final ChildListPropertyDescriptor DIMENSIONS_PROPERTY =
- new ChildListPropertyDescriptor(ArrayType.class, "dimensions", Dimension.class, CYCLE_RISK); //$NON-NLS-1$
+ new ChildListPropertyDescriptor(ArrayType.class, "dimensions", Dimension.class, CYCLE_RISK); //$NON-NLS-1$
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -131,7 +131,7 @@ public class ArrayType extends Type {
* (element type: {@link Dimension}).
* Null before JLS8. Added in JLS8; defaults to a list with one element
* (see constructor).
- *
+ *
* @since 3.10
*/
private ASTNode.NodeList dimensions = null;
@@ -219,7 +219,7 @@ public class ArrayType extends Type {
ArrayType result;
if (this.ast.apiLevel < AST.JLS8_INTERNAL) {
result = new ArrayType(target);
- result.setComponentType((Type) getComponentType().clone(target));
+ result.setComponentType((Type) getComponentType().clone(target));
} else {
result = new ArrayType(target, 0);
result.setElementType((Type) getElementType().clone(target));
@@ -242,7 +242,7 @@ public class ArrayType extends Type {
if (visitChildren) {
// visit children in normal left to right reading order
if (this.ast.apiLevel < AST.JLS8_INTERNAL) {
- acceptChild(visitor, getComponentType());
+ acceptChild(visitor, getComponentType());
} else {
acceptChild(visitor, getElementType());
acceptChildren(visitor, this.dimensions);
@@ -374,7 +374,7 @@ public class ArrayType extends Type {
dimension++;
t = ((ArrayType) t).getComponentType();
}
- return dimension;
+ return dimension;
}
/**
@@ -382,7 +382,7 @@ public class ArrayType extends Type {
* <p>
* For the array type to be plausible, the list should contain at least one element.
* </p>
- *
+ *
* @return the live list of dimensions with optional annotations (element type: {@link Dimension})
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BaseCallMessageSend.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BaseCallMessageSend.java
index f1281e28b..6519e83b0 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BaseCallMessageSend.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BaseCallMessageSend.java
@@ -122,7 +122,7 @@ public class BaseCallMessageSend extends Expression implements Invocation
public ChildListPropertyDescriptor getArgumentsProperty() {
return ARGUMENTS_PROPERTY;
}
-
+
@Override
final List internalStructuralPropertiesForType(int apiLevel)
{
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
index 960059a4f..409843d3e 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
@@ -177,7 +177,7 @@ class BindingComparator {
return moduleBinding2 == null;
if (moduleBinding2 == null)
return false;
- return CharOperation.equals(moduleBinding.moduleName, moduleBinding2.moduleName);
+ return CharOperation.equals(moduleBinding.moduleName, moduleBinding2.moduleName);
}
static boolean isEqual(VariableBinding variableBinding, VariableBinding variableBinding2) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
index 4da202d82..f4310f069 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
@@ -303,7 +303,7 @@ class BindingResolver {
boolean isResolvedTypeInferredFromExpectedType(ClassInstanceCreation classInstanceCreation) {
return false;
}
-
+
/**
* Returns the compiler lookup environment used by this binding resolver.
* Returns <code>null</code> if none.
@@ -742,7 +742,7 @@ class BindingResolver {
* @param module declaration of interest
* @return the binding for the given module declaration, or
* <code>null</code> if no binding is available
- *
+ *
* @since 3.14
*/
IModuleBinding resolveModule(ModuleDeclaration module) {
@@ -918,7 +918,7 @@ class BindingResolver {
ITypeBinding resolveType(EnumDeclaration type) {
return null;
}
-
+
/**
* Resolves the given record declaration and returns the binding
* for it.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BreakStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BreakStatement.java
index 25ca48c8e..ac5165990 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BreakStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BreakStatement.java
@@ -23,7 +23,7 @@ import java.util.List;
* <pre>
* BreakStatement:
* <b>break</b> [ Identifier ] <b>;</b>
- *
+ *
* Break statement allows expression as part of Java 12 preview feature (JEP 325)
* <b>break</b> <b>{ Identifier | Expression }</b>
* </pre>
@@ -40,7 +40,7 @@ public class BreakStatement extends Statement {
*/
public static final ChildPropertyDescriptor LABEL_PROPERTY =
new ChildPropertyDescriptor(BreakStatement.class, "label", SimpleName.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* The "expression" structural property of this node type (child type: {@link Expression}). (added in JEP 325).
* @noreference This property is not intended to be referenced by clients as it is a part of Java preview feature.
@@ -56,7 +56,7 @@ public class BreakStatement extends Statement {
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS;
-
+
/**
* <code>true</code> indicates implicit and <code>false</code> indicates not implicit.
*/
@@ -83,7 +83,7 @@ public class BreakStatement extends Statement {
public static List propertyDescriptors(int apiLevel) {
return PROPERTY_DESCRIPTORS;
}
-
+
/**
* Returns a list of structural property descriptors for this node type.
* Clients must not modify the result.
@@ -106,7 +106,7 @@ public class BreakStatement extends Statement {
* The label, or <code>null</code> if none; none by default.
*/
private SimpleName optionalLabel = null;
-
+
/**
* The expression; <code>null</code> for none
*/
@@ -129,7 +129,7 @@ public class BreakStatement extends Statement {
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
if (property == LABEL_PROPERTY) {
@@ -139,7 +139,7 @@ public class BreakStatement extends Statement {
setLabel((SimpleName) child);
return null;
}
- }
+ }
if (property == EXPRESSION_PROPERTY) {
if (get) {
return getExpression();
@@ -208,7 +208,7 @@ public class BreakStatement extends Statement {
this.optionalLabel = label;
postReplaceChild(oldChild, label, LABEL_PROPERTY);
}
-
+
/**
* Returns the expression of this break statement, or <code>null</code> if
* there is none.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
index 841b7f4a2..d9090f415 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
@@ -40,12 +40,12 @@ import org.eclipse.text.edits.TextEdit;
* CompilationUnit:
* OrdinaryCompilationUnit
* ModularCompilationUnit
- *
+ *
* OrdinaryCompilationUnit:
* [ PackageDeclaration ]
* { ImportDeclaration }
* { TypeDeclaration | EnumDeclaration | AnnotationTypeDeclaration | <b>;</b> }
- *
+ *
* ModularCompilationUnit:
* {ImportDeclaration}
* ModuleDeclaration
@@ -1117,7 +1117,7 @@ public class CompilationUnit extends ASTNode {
*
* Sets internal data used to perform statements recovery.
* @param data
- *
+ *
* @since 3.5
*/
void setStatementsRecoveryData(Object data) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index d3c8444de..5147ee757 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -125,7 +125,7 @@ class CompilationUnitResolver extends Compiler {
CategorizedProblem abortProblem;
private IProgressMonitor monitor;
-
+
/**
* Set to <code>true</code> if the receiver was initialized using a java project name environment
*/
@@ -191,7 +191,7 @@ class CompilationUnitResolver extends Compiler {
SourceTypeElementInfo sourceType = (SourceTypeElementInfo) sourceTypes[0];
accept((org.eclipse.jdt.internal.compiler.env.ICompilationUnit) sourceType.getHandle().getCompilationUnit(), accessRestriction);
}
-
+
@Override
public synchronized void accept(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
super.accept(sourceUnit, accessRestriction);
@@ -582,7 +582,7 @@ class CompilationUnitResolver extends Compiler {
}
} else {
//fill the methods bodies in order for the code to be generated
- //real parse of the method....
+ //real parse of the method....
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = compilationUnitDeclaration.types;
if (types != null) {
for (int j = 0, typeLength = types.length; j < typeLength; j++) {
@@ -1282,10 +1282,10 @@ class CompilationUnitResolver extends Compiler {
}
// type checking
unit.resolve();
-
+
// flow analysis
if (analyzeCode) unit.analyseCode();
-
+
// code generation
if (generateCode) unit.generateCode();
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java
index f0fbc7e31..a4ed9f9b5 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java
@@ -18,10 +18,10 @@ import java.util.List;
/**
* Creation reference expression AST node type (added in JLS8 API).
- *
+ *
* <pre>
* CreationReference:
- * Type <b>::</b>
+ * Type <b>::</b>
* [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
* <b>new</b>
* </pre>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
index 9ad64e250..fc66de79f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
@@ -742,7 +742,7 @@ class DefaultASTVisitor extends ASTVisitor {
public boolean visit(SwitchCase node) {
return visitNode(node);
}
-
+
@Override
public boolean visit(SwitchExpression node) {
return visitNode(node);
@@ -767,7 +767,7 @@ class DefaultASTVisitor extends ASTVisitor {
public boolean visit(TextBlock node) {
return visitNode(node);
}
-
+
@Override
public boolean visit(TextElement node) {
return visitNode(node);
@@ -817,7 +817,7 @@ class DefaultASTVisitor extends ASTVisitor {
public boolean visit(UnionType node) {
return visitNode(node);
}
-
+
@Override
public boolean visit(VariableDeclarationExpression node) {
return visitNode(node);
@@ -842,7 +842,7 @@ class DefaultASTVisitor extends ASTVisitor {
public boolean visit(WildcardType node) {
return visitNode(node);
}
-
+
@Override
public boolean visit(YieldStatement node) {
return visitNode(node);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
index 0f4b7f6e4..76e7957ef 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
@@ -174,12 +174,12 @@ class DefaultBindingResolver extends BindingResolver {
* Toggle controlling whether DOM bindings should be created when missing internal compiler bindings..
*/
boolean isRecoveringBindings;
-
+
/**
* Set to <code>true</code> if initialized from a java project
*/
boolean fromJavaProject;
-
+
/**
* Constructor for DefaultBindingResolver.
*/
@@ -374,7 +374,7 @@ class DefaultBindingResolver extends BindingResolver {
TypeReference[][] typeArguments = typeReference.typeArguments;
int value = 0;
org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations = typeReference.annotations;
- int length = typeReference.tokens.length;
+ int length = typeReference.tokens.length;
for (int i = 0; i < length; ++i) {
if (value != 0 || (typeArguments != null && typeArguments[i] != null) ||
(typeAnnotations != null && typeAnnotations[i] != null )) {
@@ -1656,7 +1656,7 @@ class DefaultBindingResolver extends BindingResolver {
QualifiedSuperReference qualifiedSuperReference = (QualifiedSuperReference) node;
return this.getTypeBinding(qualifiedSuperReference.qualification.resolvedType);
} else if (node instanceof LocalDeclaration) {
- return name.getAST().apiLevel() >= AST.JLS10_INTERNAL && name instanceof SimpleName && ((SimpleName) name).isVar() ?
+ return name.getAST().apiLevel() >= AST.JLS10_INTERNAL && name instanceof SimpleName && ((SimpleName) name).isVar() ?
resolveTypeBindingForName(name) :
this.getVariableBinding(((LocalDeclaration)node).binding);
} else if (node instanceof JavadocFieldReference) {
@@ -1788,7 +1788,7 @@ class DefaultBindingResolver extends BindingResolver {
/**
* @see BindingResolver#resolveModule(ModuleDeclaration)
- * @since 3.14
+ * @since 3.14
*/
@Override
IModuleBinding resolveModule(ModuleDeclaration module) {
@@ -1879,7 +1879,7 @@ class DefaultBindingResolver extends BindingResolver {
}
return null;
}
-
+
@Override
ITypeBinding resolveType(RecordDeclaration type) {
final Object node = this.newAstToOldAst.get(type);
@@ -1898,8 +1898,8 @@ class DefaultBindingResolver extends BindingResolver {
}
return null;
}
-
-
+
+
@Override
synchronized ITypeBinding resolveType(Type type) {
@@ -2237,7 +2237,7 @@ class DefaultBindingResolver extends BindingResolver {
actualDimensions += typeBinding.getDimensions();
}
if (!(leafComponentType instanceof TypeBinding)) return null;
- org.eclipse.jdt.internal.compiler.lookup.TypeBinding leafTypeBinding =
+ org.eclipse.jdt.internal.compiler.lookup.TypeBinding leafTypeBinding =
((TypeBinding) leafComponentType).binding;
if (leafTypeBinding instanceof VoidTypeBinding) {
throw new IllegalArgumentException();
@@ -2253,7 +2253,7 @@ class DefaultBindingResolver extends BindingResolver {
actualDimensions));
}
}
-
+
private org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] insertAnnotations(
org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] annots, int dimensions) {
if (dimensions == 0 || annots == null || annots.length == 0) {
@@ -2269,7 +2269,7 @@ class DefaultBindingResolver extends BindingResolver {
}
if (dimensions < 0) dimensions = 0; // Just means there were no annotations
}
- org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] newAnnots =
+ org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] newAnnots =
new org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[annots.length - index + dimensions];
System.arraycopy(annots, index, newAnnots, dimensions, annots.length - index);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java
index 8dfea062a..fbae596c0 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java
@@ -26,7 +26,7 @@ import java.util.List;
* <li>extra dimension in the following node types:
* {@link SingleVariableDeclaration}, {@link VariableDeclarationFragment}, {@link MethodDeclaration}</li>
* </ul>
- *
+ *
* <pre>
* Dimension:
* { Annotation } <b>[]</b>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DoStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DoStatement.java
index dcfcb5eb3..1e2c5db95 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DoStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DoStatement.java
@@ -44,7 +44,7 @@ public class DoStatement extends Statement {
*/
public static final ChildPropertyDescriptor EXPRESSION_PROPERTY =
new ChildPropertyDescriptor(DoStatement.class, "expression", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -79,7 +79,7 @@ public class DoStatement extends Statement {
* The body statement; lazily initialized; defaults to an empty block.
*/
private Statement body = null;
-
+
/**
* The expression; lazily initialized; defaults to an unspecified, but
* legal, expression.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
index 0d2e1c5ae..b559ead1d 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
@@ -488,7 +488,7 @@ class DocCommentParser extends AbstractCommentParser {
} else if (length == TAG_LITERAL_LENGTH && CharOperation.equals(TAG_LITERAL, tagName)) {
this.tagValue = TAG_LITERAL_VALUE;
}
-
+
if (this.tagValue != NO_TAG_VALUE && this.tagValue != TAG_LITERAL_VALUE) {
if (this.inlineTagStarted) {
valid = parseReference();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExportsDirective.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExportsDirective.java
index b4fc31f03..f5f3f29eb 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExportsDirective.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExportsDirective.java
@@ -23,7 +23,7 @@ import java.util.List;
* </pre>
*
* @since 3.14
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java
index 0892bf33c..5cdaee377 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java
@@ -20,7 +20,7 @@ import java.util.List;
* Expression method reference AST node type (added in JLS8 API).
* <pre>
* ExpressionMethodReference:
- * Expression <b>::</b>
+ * Expression <b>::</b>
* [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
* Identifier
* </pre>
@@ -37,7 +37,7 @@ public class ExpressionMethodReference extends MethodReference {
new ChildPropertyDescriptor(ExpressionMethodReference.class, "expression", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
/**
- * The "typeArguments" structural property of this node type (element type: {@link Type})
+ * The "typeArguments" structural property of this node type (element type: {@link Type})
*/
public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY =
internalTypeArgumentsFactory(ExpressionMethodReference.class);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
index 5e212cad4..ed7c045b7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
@@ -133,7 +133,7 @@ public interface IBinding {
* <p>
* <b>Note:</b> This method only returns declaration annotations.
* <em>Type annotations</em> in the sense of JLS8 9.7.4 are <em>not</em> returned.
- * Type annotations can be retrieved via {@link ITypeBinding#getTypeAnnotations()}.
+ * Type annotations can be retrieved via {@link ITypeBinding#getTypeAnnotations()}.
* </p>
*
* @return the list of resolved declaration annotations, or the empty list if there are no
@@ -354,7 +354,7 @@ public interface IBinding {
* different clusters of bindings, the binding objects may or may
* not be different objects; in these cases, the binding keys
* are used where available.
- *
+ *
* <p>
* Note that type bindings that only differ in their {@link ITypeBinding#getTypeAnnotations() type annotations}
* have the same {@link IBinding#getKey() key}, and hence this method returns
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IDocElement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IDocElement.java
index 7e61430cc..a2e25bd64 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IDocElement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IDocElement.java
@@ -15,7 +15,7 @@
package org.eclipse.jdt.core.dom;
/**
- * Common marker interface for AST nodes that represent fragments in doc elements.
+ * Common marker interface for AST nodes that represent fragments in doc elements.
* These are node types that can legitimately be included in {@link TagElement#fragments()}.
* <pre>
* IDocElement:
@@ -25,7 +25,7 @@ package org.eclipse.jdt.core.dom;
* {@link TagElement}
* {@link TextElement}
* </pre>
- *
+ *
* @since 3.11, internal interface since 3.0
* @see TagElement#fragments()
* @noextend This interface is not intended to be extended by clients.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
index 34a8283e8..f5429a189 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
@@ -98,7 +98,7 @@ public interface IMethodBinding extends IBinding {
* <li>If the lambda expression is declared in the body of a method,
* answers the binding of that declaring method.
* </li>
- * <li>Otherwise, if the lambda expression is declared in the
+ * <li>Otherwise, if the lambda expression is declared in the
* initializer of a field, answers the binding of that declaring field.
* </li>
* <li>Otherwise, if the lambda expression is declared in a static initializer or an
@@ -147,8 +147,8 @@ public interface IMethodBinding extends IBinding {
* <p>
* <b>Note:</b> This method only returns declaration annotations.
* <em>Type annotations</em> in the sense of JLS8 9.7.4 are <em>not</em> returned.
- * Type annotations can be retrieved from a parameter type
- * via {@link ITypeBinding#getTypeAnnotations()}.
+ * Type annotations can be retrieved from a parameter type
+ * via {@link ITypeBinding#getTypeAnnotations()}.
* </p>
*
* @param paramIndex the index of the parameter of interest
@@ -184,22 +184,22 @@ public interface IMethodBinding extends IBinding {
public ITypeBinding[] getParameterTypes();
/**
- * Returns the type of this method's receiver or <code>null</code>
+ * Returns the type of this method's receiver or <code>null</code>
* if there is no receiver declared explicitly.
- *
- * @return the type of this method's receiver or <code>null</code>
+ *
+ * @return the type of this method's receiver or <code>null</code>
* if there is no receiver declared explicitly.
- *
+ *
* @since 3.10
*/
public ITypeBinding getDeclaredReceiverType();
-
+
/**
* Returns the binding for the return type of this method. Returns the
* special primitive <code>void</code> return type for constructors.
* <p>
- * For methods, the type binding that is returned contains type annotations
- * if any. For e.g. the following code would get the type annotations on a
+ * For methods, the type binding that is returned contains type annotations
+ * if any. For e.g. the following code would get the type annotations on a
* method: <br><br>
* <code> IAnnotationBinding[] annots = getReturnType().getTypeAnnotations() </code>
* </p>
@@ -384,13 +384,13 @@ public interface IMethodBinding extends IBinding {
* @since 3.1
*/
public boolean overrides(IMethodBinding method);
-
+
/**
* Returns a list of variable bindings representing the synthetic outer
- * local variables. Returns an empty array for non-lambda expressions or if
+ * local variables. Returns an empty array for non-lambda expressions or if
* this method does not have any synthetic parameters.
- *
+ *
* @return a (possibly empty) list of variable bindings for the synthetic
* outer locals of this method if this is a lambda expression, else an empty array.
* @since 3.18
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java
index f2237549b..d324ba451 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java
@@ -1,17 +1,17 @@
/**********************************************************************
* This file is part of "Object Teams Development Tooling"-Software
- *
+ *
* Copyright 2012 GK Software AG
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Please visit http://www.eclipse.org/objectteams for updates and contact.
- *
+ *
* Contributors:
* Stephan Herrmann - Initial API and implementation
**********************************************************************/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IModuleBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IModuleBinding.java
index fbd6f20bf..bb6ebd195 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IModuleBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IModuleBinding.java
@@ -38,7 +38,7 @@ public interface IModuleBinding extends IBinding {
/**
* Returns all required modules.
* <p>The resulting bindings are in no particular order.</p>
- *
+ *
* @return all required modules
*/
public abstract IModuleBinding[] getRequiredModules();
@@ -52,9 +52,9 @@ public interface IModuleBinding extends IBinding {
public abstract IPackageBinding[] getExportedPackages();
/**
- * If this module exports the given package to specific modules, returns the array of names of
+ * If this module exports the given package to specific modules, returns the array of names of
* modules, otherwise returns an empty array.
- *
+ *
* @param packageBinding a package binding for which targeted modules are declared
* @return array of names of targeted modules
*/
@@ -81,7 +81,7 @@ public interface IModuleBinding extends IBinding {
/**
* Returns the services used by this module.
* <p>The resulting bindings are in no particular order.</p>
- *
+ *
* @return array of type bindings
*/
public abstract ITypeBinding[] getUses();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IPackageBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IPackageBinding.java
index f91a7c748..d620045f7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IPackageBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IPackageBinding.java
@@ -57,7 +57,7 @@ public interface IPackageBinding extends IBinding {
* Returns the binding of the module associated with this package binding.
* @return the binding of the module associated with this package, or
* <code>null</code> if none
- *
+ *
* @since 3.14
*/
public default IModuleBinding getModule() {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
index bb5501433..ac543e67b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
@@ -102,7 +102,7 @@ public interface ITypeBinding extends IBinding {
* @since 3.1
*/
public ITypeBinding getBound();
-
+
/**
* Returns the generic type associated with this wildcard type, if it has one.
* Returns <code>null</code> if this is not a wildcard type.
@@ -123,7 +123,7 @@ public interface ITypeBinding extends IBinding {
* @since 3.5
*/
public int getRank();
-
+
/**
* Returns the binding representing the component type of this array type,
* or <code>null</code> if this is not an array type binding. The component
@@ -295,14 +295,14 @@ public interface ITypeBinding extends IBinding {
*
* <p>The module of a recovered type reference binding is the module
* associated with the package returned by {@link #getPackage()} ie either
- * the module associated with the package of the enclosing type, or,
- * if the type name is the name of a {@linkplain AST#resolveWellKnownType(String)
- * well-known type}, the module associated with the package of the matching
+ * the module associated with the package of the enclosing type, or,
+ * if the type name is the name of a {@linkplain AST#resolveWellKnownType(String)
+ * well-known type}, the module associated with the package of the matching
* well-known type.</p>
*
* @return the binding of the module associated with the package
- * in which this class, interface, enum, or annotation type is declared,
- * or <code>null</code> if this type binding represents a primitive type, an array type,
+ * in which this class, interface, enum, or annotation type is declared,
+ * or <code>null</code> if this type binding represents a primitive type, an array type,
* the null type, a type variable, a wildcard type or a capture binding.
*
* @since 3.14
@@ -323,9 +323,9 @@ public interface ITypeBinding extends IBinding {
* Returns the binding representing the element type of this array type,
* or <code>null</code> if this is not an array type binding. The element
* type of an array type is never itself an array type.
- *
+ *
* To get the type annotations on dimensions, clients should repeatedly
- * call getComponentType() and get the type annotations from there.
+ * call getComponentType() and get the type annotations from there.
*
* @return the element type binding, or <code>null</code> if this is
* not an array type
@@ -359,17 +359,17 @@ public interface ITypeBinding extends IBinding {
* @since 3.1
*/
public ITypeBinding getErasure();
-
+
/**
- * Returns the single abstract method that constitutes the single function
- * contract (aside from any redeclarations of methods of <code>java.lang.Object</code>)
- * of the receiver interface type or <code>null</code> if there is no such contract or if the receiver
+ * Returns the single abstract method that constitutes the single function
+ * contract (aside from any redeclarations of methods of <code>java.lang.Object</code>)
+ * of the receiver interface type or <code>null</code> if there is no such contract or if the receiver
* is not an interface.
* <p>
* The returned method binding may be synthetic and its {@link #getDeclaringClass() declaring type}
* may be a super interface type of this type binding.
* </p>
- *
+ *
* @return the single abstract method that represents the single function contract, or
* <code>null</code> if the receiver is not a functional interface type
*
@@ -580,19 +580,19 @@ public interface ITypeBinding extends IBinding {
public ITypeBinding getSuperclass();
/**
- * Returns the type annotations that this type reference is annotated with. Since JLS8,
- * multiple instances of type bindings may be created if they are annotated with
+ * Returns the type annotations that this type reference is annotated with. Since JLS8,
+ * multiple instances of type bindings may be created if they are annotated with
* different type use annotations.
* <p>
- * For example, the following three type references would produce three distinct type
+ * For example, the following three type references would produce three distinct type
* bindings for java.lang.String that share the same key:
* <ul>
* <li>java.lang.@Marker1 String</li>
* <li>java.lang.@Marker2 String</li>
* <li>java.lang.String</li>
* </ul>
- * To get the type annotations on dimensions, clients should repeatedly call
- * {@link #getComponentType()} and get the type annotations from there.
+ * To get the type annotations on dimensions, clients should repeatedly call
+ * {@link #getComponentType()} and get the type annotations from there.
* @return type annotations specified on this type reference, or an empty array if
* no type use annotations are found.
@@ -625,7 +625,7 @@ public interface ITypeBinding extends IBinding {
public ITypeBinding[] getTypeArguments();
/**
- * Returns the upper type bounds of this type variable, wildcard, capture, or intersectionType.
+ * Returns the upper type bounds of this type variable, wildcard, capture, or intersectionType.
* If the variable, wildcard, or capture had no explicit bound, then it returns an empty list.
* <p>
* Note that per construction, it can only contain one class or array type,
@@ -873,8 +873,8 @@ public interface ITypeBinding extends IBinding {
* Returns whether this type binding represents an intersection binding.
* <p>
* Intersection types can be derived from type parameter bounds and cast
- * expressions; they also arise in the processes of capture conversion
- * and least upper bound computation as specified in section 4.9 of
+ * expressions; they also arise in the processes of capture conversion
+ * and least upper bound computation as specified in section 4.9 of
* <em>The Java Language Specification, Java SE 8 Edition</em> (JLS8).
* </p>
* <p>
@@ -964,11 +964,11 @@ public interface ITypeBinding extends IBinding {
* of another class or interface. A local class is a subspecies of nested
* type, and mutually exclusive with member types. For anonymous
* classes, which are considered a subspecies of local classes, this method
- * returns true.
+ * returns true.
* </p>
* <p>
- * Note: This deviates from JLS3 14.3, which states that anonymous types are
- * not local types since they do not have a name. Also note that interfaces
+ * Note: This deviates from JLS3 14.3, which states that anonymous types are
+ * not local types since they do not have a name. Also note that interfaces
* and annotation types cannot be local.
* </p>
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
index edcb045c9..5e61a657b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
@@ -59,7 +59,7 @@ public class InstanceofExpression extends Expression {
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS;
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -125,7 +125,7 @@ public class InstanceofExpression extends Expression {
* but legal, simple type.
*/
private Type rightOperand = null;
-
+
/**
* The patternVariable declaration.
*/
@@ -146,7 +146,7 @@ public class InstanceofExpression extends Expression {
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return propertyDescriptors(apiLevel, previewEnabled);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InternalASTRewrite.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InternalASTRewrite.java
index a1cde5fb4..32431dc6d 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InternalASTRewrite.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InternalASTRewrite.java
@@ -46,7 +46,7 @@ class InternalASTRewrite extends NodeEventHandler {
protected final RewriteEventStore eventStore;
protected final NodeInfoStore nodeStore;
- /** ASTNode clone -> ASTNode original */
+ /** ASTNode clone -> ASTNode original */
protected final Hashtable clonedNodes;
int cloneDepth = 0;
@@ -111,7 +111,7 @@ class InternalASTRewrite extends NodeEventHandler {
/*
* A modified node cannot be considered as cloned any more.
* we can't copy the original formatting/comments and at the same time modify the node.
- *
+ *
* Workaround for https://bugs.eclipse.org/405699 is to remove such nodes from clonedNodes
* and instead mark all children as cloned (or skip them if they are not in clonedNodes).
*/
@@ -132,11 +132,11 @@ class InternalASTRewrite extends NodeEventHandler {
}
}
}
-
+
node = node.getParent();
}
}
-
+
ASTNode source = (ASTNode)this.clonedNodes.get(newChild);
if(source != null) {
if(this.cloneDepth == 0) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java
index 1046ec51d..b1312eaa6 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java
@@ -73,7 +73,7 @@ public class IntersectionType extends Type {
/**
* Creates a new unparented node for an intersection type owned by the given AST.
* By default, it has no types.<p>
- *
+ *
* N.B. This constructor is package-private.
* </p>
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java
index 7730ba02f..c283cc1d9 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java
@@ -24,14 +24,14 @@ import java.util.List;
* <b>(</b> [ Identifier { <b>,</b> Identifier } ] <b>)</b> <b>-></b> Body
* <b>(</b> [ FormalParameter { <b>,</b> FormalParameter } ] <b>)</b> <b>-></b> Body
* </pre>
- *
- *<p>
+ *
+ *<p>
* The first two forms use {@link VariableDeclarationFragment} for the parameter or parameters,
* while the third form uses {@link SingleVariableDeclaration}.</p>
*<p>The Body can be either a {@link Block} or an {@link Expression}.</p>
*
* @since 3.10
- * @noinstantiate This class is not intended to be instantiated by clients
+ * @noinstantiate This class is not intended to be instantiated by clients
*/
public class LambdaExpression extends Expression {
@@ -54,7 +54,7 @@ public class LambdaExpression extends Expression {
*/
public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY =
new ChildListPropertyDescriptor(LambdaExpression.class, "parameters", VariableDeclaration.class, CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* The "body" structural property of this node type (child type: {@link ASTNode},
* must be either a {@link Block} or an {@link Expression}).
@@ -68,7 +68,7 @@ public class LambdaExpression extends Expression {
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS_8_0;
-
+
static {
List propertyList = new ArrayList(4);
createPropertyList(LambdaExpression.class, propertyList);
@@ -77,7 +77,7 @@ public class LambdaExpression extends Expression {
addProperty(BODY_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
}
-
+
/**
* Returns a list of structural property descriptors for this node type.
* Clients must not modify the result.
@@ -92,7 +92,7 @@ public class LambdaExpression extends Expression {
/**
* Indicates whether parentheses are present or not.
- * Defaults to <code>true</code>.
+ * Defaults to <code>true</code>.
*/
private boolean hasParentheses = true;
@@ -207,7 +207,7 @@ public class LambdaExpression extends Expression {
* just a single {@link VariableDeclarationFragment}.
* ASTRewrite may ignore this property if necessary.
* </p>
- *
+ *
* @return <code>true</code> if this lambda expression has parentheses around
* its parameters and <code>false</code> otherwise
*/
@@ -249,7 +249,7 @@ public class LambdaExpression extends Expression {
/**
* Returns the body of this lambda expression.
- *
+ *
* @return the lambda expression body, which can be either a {@link Block} or an {@link Expression}
*/
public ASTNode getBody() {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePairBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePairBinding.java
index a312d1532..5241ae610 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePairBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePairBinding.java
@@ -154,7 +154,7 @@ class MemberValuePairBinding implements IMemberValuePairBinding {
this.value = NoValue;
IMethodBinding methodBinding = getMethodBinding();
if (methodBinding.getReturnType().isArray() && !this.value.getClass().isArray()) {
- this.value = new Object[] { this.value };
+ this.value = new Object[] { this.value };
}
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
index 1866c2800..616b7287a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
@@ -261,7 +261,7 @@ class MethodBinding implements IMethodBinding {
((metaTagBits & TagBits.AnnotationTargetMASK) != 0)) {
continue;
}
-
+
final IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotation);
if (annotationInstance == null) {
continue;
@@ -270,7 +270,7 @@ class MethodBinding implements IMethodBinding {
}
if (convertedAnnotationCount == length) return tempAnnotations;
if (convertedAnnotationCount == 0) return AnnotationBinding.NoAnnotations;
-
+
System.arraycopy(tempAnnotations, 0, (tempAnnotations = new IAnnotationBinding[convertedAnnotationCount]), 0, convertedAnnotationCount);
return tempAnnotations;
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
index db7c8a212..f16a75f05 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
@@ -99,7 +99,7 @@ public class MethodDeclaration extends BodyDeclaration
*/
public static final SimplePropertyDescriptor CONSTRUCTOR_PROPERTY =
new SimplePropertyDescriptor(MethodDeclaration.class, "constructor", boolean.class, MANDATORY); //$NON-NLS-1$
-
+
/**
* The "compact constructor" structural property of record node type (type: {@link Boolean}).
* @since 3.22
@@ -137,7 +137,7 @@ public class MethodDeclaration extends BodyDeclaration
*/
public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY =
new SimplePropertyDescriptor(MethodDeclaration.class, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
-
+
/**
* The "extraDimensions2" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
* @since 3.10
@@ -165,7 +165,7 @@ public class MethodDeclaration extends BodyDeclaration
*/
public static final ChildPropertyDescriptor RECEIVER_TYPE_PROPERTY =
new ChildPropertyDescriptor(MethodDeclaration.class, "receiverType", Type.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* The "receiverQualifier" structural property of this node type (child type: {@link SimpleName}) (added in JLS8 API).
* @since 3.10
@@ -227,7 +227,7 @@ public class MethodDeclaration extends BodyDeclaration
* @since 3.10
*/
private static final List PROPERTY_DESCRIPTORS_8_0;
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -288,7 +288,7 @@ public class MethodDeclaration extends BodyDeclaration
// SH}
addProperty(BODY_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(14);
createPropertyList(MethodDeclaration.class, propertyList);
addProperty(JAVADOC_PROPERTY, propertyList);
@@ -319,7 +319,7 @@ public class MethodDeclaration extends BodyDeclaration
public static List propertyDescriptors(int apiLevel) {
return propertyDescriptors(apiLevel, false);
}
-
+
/**
* Returns a list of structural property descriptors for this node type.
* Clients must not modify the result.
@@ -349,7 +349,7 @@ public class MethodDeclaration extends BodyDeclaration
* Defaults to method.
*/
private boolean isConstructor = false;
-
+
/**
* <code>true</code> for a compact constructor in a record, <code>false</code> for a method.
@@ -369,7 +369,7 @@ public class MethodDeclaration extends BodyDeclaration
* @since 3.10
*/
private Type optionalReceiverType = null;
-
+
/**
* Qualifying name of the explicit </code>this</code> parameter, or <code>null</code> if none.
* Defaults to none.
@@ -421,7 +421,7 @@ public class MethodDeclaration extends BodyDeclaration
* (element type: {@link Dimension}).
* Null before JLS8. Added in JLS8; defaults to an empty list
* (see constructor).
- *
+ *
* @since 3.10
*/
private ASTNode.NodeList extraDimensions = null;
@@ -438,7 +438,7 @@ public class MethodDeclaration extends BodyDeclaration
* The list of thrown exception Types (element type: {@link Type}).
* Null before JLS8. Added in JLS8; defaults to an empty list
* (see constructor).
- *
+ *
* @since 3.10
*/
private ASTNode.NodeList thrownExceptionTypes = null;
@@ -493,7 +493,7 @@ public class MethodDeclaration extends BodyDeclaration
final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return propertyDescriptors(apiLevel, previewEnabled);
}
-
+
@Override
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) {
if (property == MODIFIERS_PROPERTY) {
@@ -536,8 +536,8 @@ public class MethodDeclaration extends BodyDeclaration
// allow default implementation to flag the error
return super.internalGetSetBooleanProperty(property, get, value);
}
-
-
+
+
@Override
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
@@ -627,7 +627,7 @@ public class MethodDeclaration extends BodyDeclaration
}
if (property == THROWN_EXCEPTION_TYPES_PROPERTY) {
return thrownExceptionTypes();
- }
+ }
if (property == EXTRA_DIMENSIONS2_PROPERTY) {
return extraDimensions();
}
@@ -689,7 +689,7 @@ public class MethodDeclaration extends BodyDeclaration
if (this.ast.apiLevel() >= AST.JLS8_INTERNAL) {
result.thrownExceptionTypes().addAll(ASTNode.copySubtrees(target, thrownExceptionTypes()));
} else {
- result.thrownExceptions().addAll(ASTNode.copySubtrees(target, thrownExceptions()));
+ result.thrownExceptions().addAll(ASTNode.copySubtrees(target, thrownExceptions()));
}
//{ObjectTeams:
result.setGuardPredicate((GuardPredicateDeclaration)ASTNode.copySubtree(target, getGuardPredicate()));
@@ -733,9 +733,9 @@ public class MethodDeclaration extends BodyDeclaration
acceptChildren(visitor, this.parameters);
if (this.ast.apiLevel() >= AST.JLS8_INTERNAL) {
acceptChildren(visitor, this.extraDimensions);
- acceptChildren(visitor, this.thrownExceptionTypes);
+ acceptChildren(visitor, this.thrownExceptionTypes);
} else {
- acceptChildren(visitor, this.thrownExceptions);
+ acceptChildren(visitor, this.thrownExceptions);
}
acceptChild(visitor, getBody());
}
@@ -772,9 +772,9 @@ public class MethodDeclaration extends BodyDeclaration
* @since 3.22
* @noreference This method is not intended to be referenced by clients.
* @exception UnsupportedOperationException if this operation is not used in JLS14
- * @exception UnsupportedOperationException if this operation is used with previewEnabled flag as false
+ * @exception UnsupportedOperationException if this operation is used with previewEnabled flag as false
*/
-
+
public boolean isCompactConstructor() {
supportedOnlyIn14();
unsupportedWithoutPreviewError();
@@ -789,9 +789,9 @@ public class MethodDeclaration extends BodyDeclaration
* @since 3.22
* @noreference This method is not intended to be referenced by clients.
* @exception UnsupportedOperationException if this operation is not used in JLS14
- * @exception UnsupportedOperationException if this operation is used with previewEnabled flag as false
+ * @exception UnsupportedOperationException if this operation is used with previewEnabled flag as false
*/
-
+
public void setCompactConstructor(boolean isCompactConstructor) {
preValueChange(COMPACT_CONSTRUCTOR_PROPERTY);
this.isCompactConstructor = isCompactConstructor;
@@ -861,10 +861,10 @@ public class MethodDeclaration extends BodyDeclaration
}
/**
- * Returns the receiver type explicitly declared in the method or constructor
+ * Returns the receiver type explicitly declared in the method or constructor
* declaration (added in JLS8 API).
*
- * If the receiver is not explicitly declared in the method or constructor
+ * If the receiver is not explicitly declared in the method or constructor
* declaration, <code>null</code> is returned.
*
* @return the receiver type or <code>null</code> if receiver is not declared explicitly
@@ -881,7 +881,7 @@ public class MethodDeclaration extends BodyDeclaration
* <p>
* A receiver type is only legal in Java code if it appears on an instance method or on a constructor of an inner class.
* </p>
- *
+ *
* @param receiverType type of the explicit receiver parameter, or <code>null</code> if there is none
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
@@ -899,7 +899,7 @@ public class MethodDeclaration extends BodyDeclaration
* <p>
* A receiver qualifier is only legal in Java code if it appears on a constructor of an inner class.
* </p>
- *
+ *
* @return the qualifying name or <code>null</code> if a qualifier was not specified
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
@@ -908,10 +908,10 @@ public class MethodDeclaration extends BodyDeclaration
unsupportedIn2_3_4();
return this.optionalReceiverQualifier;
}
-
+
/**
* Sets the given simple name as the qualifier for the receiver (added in JLS8 API).
- *
+ *
* @param receiverQualifier explicit receiver parameter to be added to the method declaration
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
@@ -923,7 +923,7 @@ public class MethodDeclaration extends BodyDeclaration
this.optionalReceiverQualifier = receiverQualifier;
postReplaceChild(oldChild, receiverQualifier, RECEIVER_QUALIFIER_PROPERTY);
}
-
+
/**
* Returns the live ordered list of method parameter declarations for this
* method declaration.
@@ -997,7 +997,7 @@ public class MethodDeclaration extends BodyDeclaration
* @return the live list of exception types
* (element type: {@link Type})
* @exception UnsupportedOperationException if this operation is used
- * in a JLS2, JLS3 or JLS4 AST
+ * in a JLS2, JLS3 or JLS4 AST
* @since 3.10
*/
public List thrownExceptionTypes() {
@@ -1202,7 +1202,7 @@ public class MethodDeclaration extends BodyDeclaration
* @exception IllegalArgumentException if the number of dimensions is
* negative
* @exception UnsupportedOperationException if this operation is used in
- * a JLS8 or later AST
+ * a JLS8 or later AST
* @since 2.1
* @deprecated In the JLS8 API, this method is replaced by
* {@link #extraDimensions()} which contains a list of {@link Dimension} nodes.
@@ -1222,7 +1222,7 @@ public class MethodDeclaration extends BodyDeclaration
/**
* Returns the live ordered list of extra dimensions with optional annotations (added in JLS8 API).
- *
+ *
* @return the live list of extra dimensions with optional annotations (element type: {@link Dimension})
* @exception UnsupportedOperationException if this operation is used below JLS8
* @since 3.10
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodMappingBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodMappingBinding.java
index 78cb24691..430c566e5 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodMappingBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodMappingBinding.java
@@ -135,7 +135,7 @@ class MethodMappingBinding implements IMethodMappingBinding
return this.baseMethods;
}
-
+
@Override
public IVariableBinding getBaseField()
{
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java
index 6bc27c033..23206453d 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java
@@ -18,7 +18,7 @@ import java.util.List;
/**
* Abstract base class of all AST node types that represent a method reference
* expression (added in JLS8 API).
- *
+ *
* <pre>
* MethodReference:
* CreationReference
@@ -29,7 +29,7 @@ import java.util.List;
* <p>
* A method reference that is represented by a simple or qualified name,
* followed by <code>::</code>, followed by a simple name can be represented
- * as {@link ExpressionMethodReference} or as {@link TypeMethodReference}.
+ * as {@link ExpressionMethodReference} or as {@link TypeMethodReference}.
* The ASTParser currently prefers the first form.
* </p>
*
@@ -48,9 +48,9 @@ public abstract class MethodReference extends Expression {
ASTNode.NodeList typeArguments;
/**
- * Creates and returns a structural property descriptor for the "typeArguments"
+ * Creates and returns a structural property descriptor for the "typeArguments"
* property declared on the given concrete node type (element type: {@link Type}).
- *
+ *
* @return the property descriptor
*/
static final ChildListPropertyDescriptor internalTypeArgumentsFactory(Class nodeClass) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleBinding.java
index ffadbaa53..4415e0ddd 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleBinding.java
@@ -89,7 +89,7 @@ class ModuleBinding implements IModuleBinding {
@Override
public String getName() {
if (this.name == null) {
- char[] tmp = this.binding.moduleName;
+ char[] tmp = this.binding.moduleName;
return tmp != null && tmp.length != 0 ? new String(tmp) : Util.EMPTY_STRING;
}
return this.name;
@@ -116,7 +116,7 @@ class ModuleBinding implements IModuleBinding {
// TODO Auto-generated method stub
// TODO Java 9 no reference seen in jvms draft - only in sotm
// check on version change and after compiler ast implements isSynthetic return this.binding.isSynthetic();
-
+
return false;
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnvironmentWithProgress.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnvironmentWithProgress.java
index 9b0e9a204..0a29d911e 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnvironmentWithProgress.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnvironmentWithProgress.java
@@ -31,7 +31,7 @@ import org.eclipse.jdt.internal.core.NameLookup;
*/
class NameEnvironmentWithProgress extends FileSystem implements INameEnvironmentWithProgress {
IProgressMonitor monitor;
-
+
public NameEnvironmentWithProgress(Classpath[] paths, String[] initialFileNames, IProgressMonitor monitor) {
super(paths, initialFileNames, false);
setMonitor(monitor);
@@ -90,7 +90,7 @@ class NameEnvironmentWithProgress extends FileSystem implements INameEnvironment
checkCanceled();
return super.isPackage(compoundName, packageName);
}
-
+
@Override
public void setMonitor(IProgressMonitor monitor) {
this.monitor = monitor;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameQualifiedType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameQualifiedType.java
index 1785f9e6f..0c4c29ee8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameQualifiedType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameQualifiedType.java
@@ -19,12 +19,12 @@ import java.util.List;
/**
* Node for a name-qualified type (added in JLS8 API).
- *
+ *
* <pre>
* NameQualifiedType:
* Name <b>.</b> { Annotation } SimpleName
* </pre>
- *
+ *
* <p>
* The qualifier can resolve to a type or to a package.
* </p>
@@ -36,7 +36,7 @@ import java.util.List;
*
* @see SimpleType
* @see QualifiedType
- *
+ *
* @since 3.10
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -53,13 +53,13 @@ public class NameQualifiedType extends AnnotatableType {
*/
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
internalAnnotationsPropertyFactory(NameQualifiedType.class);
-
+
/**
* The "name" structural property of this node type (child type: {@link SimpleName}).
*/
public static final ChildPropertyDescriptor NAME_PROPERTY =
new ChildPropertyDescriptor(NameQualifiedType.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -90,7 +90,7 @@ public class NameQualifiedType extends AnnotatableType {
}
/**
- * The qualifier node; lazily initialized; defaults to
+ * The qualifier node; lazily initialized; defaults to
* an unspecified, but legal, simple name.
*/
private Name qualifier = null;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
index d5206d8e2..0028d3a2f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
@@ -131,7 +131,7 @@ public final class NodeFinder {
/**
* Maps a selection to an ASTNode, where the selection is defined using a source range.
* Calls <code>perform(root, range.getOffset(), range.getLength())</code>.
- *
+ *
* @param root the root node from which the search starts
* @param range the selection range
* @return the innermost node that exactly matches the selection, or the first node that contains the selection
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/OpensDirective.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/OpensDirective.java
index bb69aaef9..d83fb0842 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/OpensDirective.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/OpensDirective.java
@@ -23,7 +23,7 @@ import java.util.List;
* </pre>
*
* @since 3.14
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
index a21882c7d..44ab3860c 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
@@ -63,7 +63,7 @@ public class PackageDeclaration extends ASTNode {
public static final ChildListPropertyDescriptor MODIFIERS_PROPERTY =
new ChildListPropertyDescriptor(PackageDeclaration.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$
// SH}
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
index 6450bf5c3..18ff64f9f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
@@ -165,7 +165,7 @@ public class PrimitiveType extends AnnotatableType {
*/
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
internalAnnotationsPropertyFactory(PrimitiveType.class);
-
+
/**
* The "primitiveTypeCode" structural property of this node type (type: {@link PrimitiveType.Code}).
* @since 3.0
@@ -191,7 +191,7 @@ public class PrimitiveType extends AnnotatableType {
createPropertyList(PrimitiveType.class, propertyList);
addProperty(PRIMITIVE_TYPE_CODE_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(3);
createPropertyList(PrimitiveType.class, propertyList);
addProperty(ANNOTATIONS_PROPERTY, propertyList);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ProvidesDirective.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ProvidesDirective.java
index 8cd255189..02d993a9b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ProvidesDirective.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ProvidesDirective.java
@@ -23,7 +23,7 @@ import java.util.List;
* </pre>
*
* @since 3.14
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
index b24cffef0..4d42ddc24 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
@@ -19,7 +19,7 @@ import java.util.List;
/**
* Type node for a qualified type (added in JLS3 API).
- *
+ *
* <pre>
* QualifiedType:
* Type <b>.</b> { Annotation } SimpleName
@@ -62,10 +62,10 @@ import java.util.List;
* same rules.
* </li>
* </ul>
- *
+ *
* @see SimpleType
* @see NameQualifiedType
- *
+ *
* @since 3.1
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -88,13 +88,13 @@ public class QualifiedType extends AnnotatableType {
*/
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
internalAnnotationsPropertyFactory(QualifiedType.class);
-
+
/**
* The "name" structural property of this node type (child type: {@link SimpleName}).
*/
public static final ChildPropertyDescriptor NAME_PROPERTY =
new ChildPropertyDescriptor(QualifiedType.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -115,7 +115,7 @@ public class QualifiedType extends AnnotatableType {
addProperty(QUALIFIER_PROPERTY, propertyList);
addProperty(NAME_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(4);
createPropertyList(QualifiedType.class, propertyList);
addProperty(QUALIFIER_PROPERTY, propertyList);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
index 1ef06ce82..ca788347f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
@@ -71,7 +71,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
public static final ChildPropertyDescriptor NAME_PROPERTY =
internalNamePropertyFactory(RecordDeclaration.class);
-
+
/**
* The "superInterfaceTypes" structural property of this node type (element type: {@link Type}).
* @since 3.22
@@ -85,7 +85,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
*/
public static final ChildListPropertyDescriptor TYPE_PARAMETERS_PROPERTY =
new ChildListPropertyDescriptor(RecordDeclaration.class, "typeParameters", TypeParameter.class, NO_CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* The "recordComponents" structural property of this node type (element type: {@link SingleVariableDeclaration}).
* @since 3.22
@@ -99,7 +99,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
*/
public static final ChildListPropertyDescriptor BODY_DECLARATIONS_PROPERTY =
internalBodyDeclarationPropertyFactory(RecordDeclaration.class);
-
+
/**
* A character index into the original restricted identifier source string,
@@ -195,7 +195,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
* @since 3.22
*/
private ASTNode.NodeList superInterfaceTypes = new ASTNode.NodeList(SUPER_INTERFACE_TYPES_PROPERTY);
-
+
/**
* The parameters (element type: {@link SingleVariableDeclaration}).
* defaults to an empty list
@@ -203,7 +203,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
* @since 3.22
*/
private ASTNode.NodeList recordComponents = new ASTNode.NodeList(RECORD_COMPONENTS_PROPERTY);
-
+
/**
* Creates a new AST node for a type declaration owned by the given
@@ -231,7 +231,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return propertyDescriptors(apiLevel, previewEnabled);
@@ -373,7 +373,7 @@ public class RecordDeclaration extends AbstractTypeDeclaration {
public List superInterfaceTypes() {
return this.superInterfaceTypes;
}
-
+
/**
* Returns the live ordered list of recordComponents of record declaration.
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredPackageBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredPackageBinding.java
index 26bb449f8..5ed3ec7c1 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredPackageBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredPackageBinding.java
@@ -37,7 +37,7 @@ class RecoveredPackageBinding implements IPackageBinding {
this.binding = binding;
this.resolver = resolver;
}
-
+
@Override
public IAnnotationBinding[] getAnnotations() {
return AnnotationBinding.NoAnnotations;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
index 550d7dcaa..29adfec8e 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
@@ -181,7 +181,7 @@ class RecoveredTypeBinding implements ITypeBinding {
}
return null;
}
-
+
@Override
public ITypeBinding getErasure() {
return this;
@@ -191,7 +191,7 @@ class RecoveredTypeBinding implements ITypeBinding {
public IMethodBinding getFunctionalInterfaceMethod() {
return null;
}
-
+
@Override
public ITypeBinding[] getInterfaces() {
return TypeBinding.NO_TYPE_BINDINGS;
@@ -410,7 +410,7 @@ class RecoveredTypeBinding implements ITypeBinding {
public boolean isEnum() {
return false;
}
-
+
@Override
public boolean isRecord() {
return false;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
index f60a7367f..fdb2ee227 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
@@ -33,10 +33,10 @@ import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
* In JLS8 and later, the SimpleType may have optional annotations.
* If annotations are present, then the name must be a {@link SimpleName}.
* Annotated qualified names are represented as {@link QualifiedType} or {@link NameQualifiedType}.
- *
+ *
* @see QualifiedType
* @see NameQualifiedType
- *
+ *
* @since 2.0
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -49,7 +49,7 @@ public class SimpleType extends AnnotatableType {
*/
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
internalAnnotationsPropertyFactory(SimpleType.class);
-
+
/**
* The "name" structural property of this node type (child type: {@link Name}).
* @since 3.0
@@ -76,7 +76,7 @@ public class SimpleType extends AnnotatableType {
createPropertyList(SimpleType.class, propertyList);
addProperty(NAME_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(3);
createPropertyList(SimpleType.class, propertyList);
addProperty(ANNOTATIONS_PROPERTY, propertyList);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
index b0450636f..4acedd041 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
@@ -206,7 +206,7 @@ public class SingleVariableDeclaration extends VariableDeclaration {
* The type annotations on the varargs token (element type: {@link Annotation}).
* Null before JLS8. Added in JLS8; defaults to an empty list
* (see constructor).
- *
+ *
* @since 3.10
*/
private ASTNode.NodeList varargsAnnotations = null;
@@ -221,7 +221,7 @@ public class SingleVariableDeclaration extends VariableDeclaration {
//{ObjectTeams: emulation for declared lifting:
private SingleVariableDeclaration fakedRoleVariable;
- public static final ChildPropertyDescriptor FAKED_ROLE_VARIABLE =
+ public static final ChildPropertyDescriptor FAKED_ROLE_VARIABLE =
new ChildPropertyDescriptor(SingleVariableDeclaration.class, "fakedRoleVariable", SingleVariableDeclaration.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
SingleVariableDeclaration newFakedRoleVariable(LiftingType liftingType) {
@@ -287,7 +287,7 @@ public class SingleVariableDeclaration extends VariableDeclaration {
final ChildListPropertyDescriptor internalExtraDimensions2Property() {
return EXTRA_DIMENSIONS2_PROPERTY;
}
-
+
@Override
final ChildPropertyDescriptor internalInitializerProperty() {
return INITIALIZER_PROPERTY;
@@ -636,7 +636,7 @@ public class SingleVariableDeclaration extends VariableDeclaration {
*/
public List varargsAnnotations() {
if (this.varargsAnnotations == null) {
- unsupportedIn2_3_4();
+ unsupportedIn2_3_4();
}
return this.varargsAnnotations;
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java
index 3f9808f34..3450deb86 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java
@@ -18,14 +18,14 @@ import java.util.List;
/**
* Super method reference AST node type (added in JLS8 API).
- *
+ *
* <pre>
* SuperMethodReference:
* [ ClassName <b>.</b> ] <b>super</b> <b>::</b>
* [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
* Identifier
* </pre>
- *
+ *
* @since 3.10
* @noinstantiate This class is not intended to be instantiated by clients
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
index 52094dc6d..cfa1220eb 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
@@ -24,7 +24,7 @@ import java.util.List;
* SwitchCase:
* <b>case</b> Expression <b>:</b>
* <b>default</b> <b>:</b>
- *
+ *
* Switch case allows multiple expressions and '->' as part of Java 12 preview feature (JEP 325)
* <b>case</b> [ Expression { <b>,</b> Expression } ] <b>{ : | ->}</b>
* <b>default</b> <b>{ : | ->}</b>
@@ -51,7 +51,7 @@ public class SwitchCase extends Statement {
*/
public static final ChildListPropertyDescriptor EXPRESSIONS2_PROPERTY =
new ChildListPropertyDescriptor(SwitchCase.class, "expression", Expression.class, CYCLE_RISK); //$NON-NLS-1$);
-
+
/**
* The "switchLabeledRule" structural property of this node type (type: {@link Boolean}).
* @noreference This property is not intended to be referenced by clients as it is a part of Java preview feature.
@@ -59,14 +59,14 @@ public class SwitchCase extends Statement {
*/
public static final SimplePropertyDescriptor SWITCH_LABELED_RULE_PROPERTY =
new SimplePropertyDescriptor(SwitchCase.class, "switchLabeledRule", boolean.class, MANDATORY); //$NON-NLS-1$
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS;
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -79,7 +79,7 @@ public class SwitchCase extends Statement {
createPropertyList(SwitchCase.class, propertyList);
addProperty(EXPRESSION_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(2);
createPropertyList(SwitchCase.class, propertyList);
addProperty(EXPRESSIONS2_PROPERTY , propertyList);
@@ -110,15 +110,15 @@ public class SwitchCase extends Statement {
* @see #expressionInitialized
*/
private Expression optionalExpression = null;
-
+
/**
* <code>true</code> indicates "->" and <code>false</code> indicates ":".
*/
private boolean switchLabeledRule = false;
-
+
/**
- * The expression list; <code>empty</code> for none;
+ * The expression list; <code>empty</code> for none;
*/
private ASTNode.NodeList expressions = null;
@@ -182,7 +182,7 @@ public class SwitchCase extends Statement {
// allow default implementation to flag the error
return super.internalGetChildListProperty(property);
}
-
+
@Override
final int getNodeType0() {
return SWITCH_CASE;
@@ -244,7 +244,7 @@ public class SwitchCase extends Statement {
}
return this.optionalExpression;
}
-
+
/**
* Returns the list of expressions of this switch case, or
* <code>empty</code> if there is none (the "default:" case).
@@ -283,7 +283,7 @@ public class SwitchCase extends Statement {
this.expressionInitialized = true;
postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);
}
-
+
/**
* Sets the switchLabeledRule of this switch case as <code>true</code> or <code>false</code>.
* <code>true</code> indicates "->" and <code>false</code> indicates ":".
@@ -298,7 +298,7 @@ public class SwitchCase extends Statement {
this.switchLabeledRule = switchLabeledRule;
postValueChange(SWITCH_LABELED_RULE_PROPERTY);
}
-
+
/**
* Gets the switchLabeledRule of this switch case as <code>true</code> or <code>false</code>.
*<code>true</code> indicates "->" and <code>false</code> indicates ":".
@@ -340,6 +340,6 @@ public class SwitchCase extends Statement {
memSize()
+ (this.optionalExpression == null ? 0 : this.optionalExpression.treeSize());
}
-
+
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchExpression.java
index 3345546f2..dca6c0d8a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchExpression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchExpression.java
@@ -77,7 +77,7 @@ public class SwitchExpression extends Expression {
public static List propertyDescriptors(int apiLevel) {
return PROPERTY_DESCRIPTORS;
}
-
+
/**
* The expression; lazily initialized; defaults to a unspecified, but legal,
* expression.
@@ -112,7 +112,7 @@ public class SwitchExpression extends Expression {
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
if (property == EXPRESSION_PROPERTY) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TSuperConstructorInvocation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TSuperConstructorInvocation.java
index e268d85a2..742935d89 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TSuperConstructorInvocation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TSuperConstructorInvocation.java
@@ -102,7 +102,7 @@ public class TSuperConstructorInvocation extends Statement implements Invocation
{
super(ast);
}
-
+
@Override
public ChildListPropertyDescriptor getArgumentsProperty() {
return ARGUMENTS_PROPERTY;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TagElement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TagElement.java
index 544569fb4..10aa5e760 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TagElement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TagElement.java
@@ -112,7 +112,7 @@ public final class TagElement extends ASTNode implements IDocElement {
* Standard doc tag name (value {@value}).
*/
public static final String TAG_EXCEPTION = "@exception"; //$NON-NLS-1$
-
+
/**
* Standard doc tag name (value {@value}).
* @since 3.18
@@ -124,7 +124,7 @@ public final class TagElement extends ASTNode implements IDocElement {
* @since 3.18
*/
public static final String TAG_INDEX = "@index"; //$NON-NLS-1$
-
+
/**
* Standard inline doc tag name (value {@value}).
*/
@@ -159,7 +159,7 @@ public final class TagElement extends ASTNode implements IDocElement {
* @since 3.18
*/
public static final String TAG_PROVIDES = "@provides"; //$NON-NLS-1$
-
+
/**
* Standard doc tag name (value {@value}).
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TextBlock.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TextBlock.java
index 85d87c18e..77d11c8a9 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TextBlock.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TextBlock.java
@@ -26,7 +26,7 @@ import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
/**
* TextBolck AST node type.
*
- * These are block of String literal nodes.
+ * These are block of String literal nodes.
*
* @since 3.20
* @noinstantiate This class is not intended to be instantiated by clients.
@@ -116,7 +116,7 @@ public class TextBlock extends Expression {
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return propertyDescriptors(apiLevel, previewEnabled);
@@ -246,7 +246,7 @@ public class TextBlock extends Expression {
if (len < 7) {
throw new IllegalArgumentException();
}
-
+
int start = -1;
loop: for (int i = 3; i < len; i++) {
char c = escaped[i];
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
index a21679da5..90d5535ff 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
@@ -30,9 +30,9 @@ import java.util.List;
* <p>
* Not all node arrangements will represent legal Java constructs. In particular,
* at least one resource, catch clause, or finally block must be present.</p>
- *
+ *
* <p>A resource is either a {@link VariableDeclarationExpression} or (since JLS9) a {@link Name}.</p>
- *
+ *
* @since 2.0
* @noinstantiate This class is not intended to be instantiated by clients.
* @noextend This class is not intended to be subclassed by clients.
@@ -40,7 +40,7 @@ import java.util.List;
@SuppressWarnings({"rawtypes", "unchecked"})
public class TryStatement extends Statement {
-
+
/**
* The "resources" structural property of this node type (element type: {@link VariableDeclarationExpression}) (added in JLS4 API).
* @deprecated In the JLS9 API, this property is replaced by {@link #RESOURCES2_PROPERTY}.
@@ -83,7 +83,7 @@ public class TryStatement extends Statement {
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS;
-
+
/**
* A list of property descriptors (element type:
* {@link StructuralPropertyDescriptor}),
@@ -360,7 +360,7 @@ public class TryStatement extends Statement {
/**
* Returns the live ordered list of resources for this try statement (added in JLS4 API).
- *
+ *
* <p>A resource is either a {@link VariableDeclarationExpression} or (since JLS9) a {@link Name}.</p>
*
* @return the live list of resources (element type: {@link Expression}).
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
index a5637bed8..85ea4ea7f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
@@ -36,7 +36,7 @@ package org.eclipse.jdt.core.dom;
* ParameterizedType
* UnionType
* IntersectionType
- *
+ *
* {@link PrimitiveType}:
* { Annotation } <b>byte</b>
* { Annotation } <b>short</b>
@@ -68,7 +68,7 @@ package org.eclipse.jdt.core.dom;
* @since 2.0
*/
public abstract class Type extends ASTNode {
-
+
/**
* Creates a new AST node for a type owned by the given AST.
* <p>
@@ -218,14 +218,14 @@ public abstract class Type extends ASTNode {
public final boolean isWildcardType() {
return (this instanceof WildcardType);
}
-
+
/**
* Returns whether this type can be annotated. All sub-classes of
* {@link AnnotatableType} can be annotated.
*
* @return <code>true</code> if this type is an instance of {@link AnnotatableType}, and
* <code>false</code> otherwise
- *
+ *
* @since 3.10
*/
public boolean isAnnotatable() {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
index ba8099442..1ee31ce6a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
@@ -245,7 +245,7 @@ class TypeBinding implements ITypeBinding {
}
return null;
}
-
+
@Override
public ITypeBinding getGenericTypeOfWildcardType() {
switch (this.binding.kind()) {
@@ -258,7 +258,7 @@ class TypeBinding implements ITypeBinding {
}
return null;
}
-
+
@Override
public int getRank() {
switch (this.binding.kind()) {
@@ -270,7 +270,7 @@ class TypeBinding implements ITypeBinding {
return -1;
}
}
-
+
@Override
public ITypeBinding getComponentType() {
if (!isArray()) {
@@ -538,12 +538,12 @@ class TypeBinding implements ITypeBinding {
return this.resolver.getTypeBinding(((ParameterizedTypeBinding)this.binding).genericType());
return this.resolver.getTypeBinding(this.binding.unannotated());
}
-
+
@Override
public ITypeBinding getErasure() {
return this.resolver.getTypeBinding(this.binding.erasure());
}
-
+
@Override
public IMethodBinding getFunctionalInterfaceMethod() {
Scope scope = this.resolver.scope();
@@ -646,7 +646,7 @@ class TypeBinding implements ITypeBinding {
return this.interfaces = NO_TYPE_BINDINGS;
//{ObjectTeams: conclude try-with-resources from above
}
-// SH}
+// SH}
}
private ITypeBinding[] getIntersectingTypes() {
@@ -1186,7 +1186,7 @@ class TypeBinding implements ITypeBinding {
@Override
public boolean isAssignmentCompatible(ITypeBinding type) {
-//{ObjectTeams: prepare for calling into the compiler (isCompatibleWith(..))
+//{ObjectTeams: prepare for calling into the compiler (isCompatibleWith(..))
// save and reset flags:
Config oldConfig = Config.createOrResetConfig(this);
// orig:
@@ -1255,7 +1255,7 @@ class TypeBinding implements ITypeBinding {
public boolean isEnum() {
return this.binding.isEnum();
}
-
+
@Override
public boolean isRecord() {
return this.binding.isRecord();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
index 8cb24af82..10886f1a7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
* Type declaration AST node type. A type declaration
* is the union of a class declaration and an interface declaration.
- *
+ *
* <pre>
* TypeDeclaration:
* ClassDeclaration
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java
index 8ae7f515e..edd1efdc8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java
@@ -20,7 +20,7 @@ import java.util.List;
* Type method reference expression AST node type (added in JLS8 API).
* <pre>
* TypeMethodReference:
- * Type <b>::</b>
+ * Type <b>::</b>
* [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
* Identifier
* </pre>
@@ -54,7 +54,7 @@ public class TypeMethodReference extends MethodReference {
* or null if uninitialized.
*/
private static final List PROPERTY_DESCRIPTORS_8_0;
-
+
static {
List propertyList = new ArrayList(4);
createPropertyList(TypeMethodReference.class, propertyList);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
index c2a0e1991..d58acd415 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
@@ -20,7 +20,7 @@ import java.util.List;
/**
* Type parameter declaration node (added in JLS3 API).
- *
+ *
* <pre>
* TypeParameter:
* { ExtendedModifier } Identifier [ <b>extends</b> Type { <b>&amp;</b> Type } ]
@@ -38,7 +38,7 @@ public class TypeParameter extends ASTNode {
*/
public static final ChildListPropertyDescriptor MODIFIERS_PROPERTY =
new ChildListPropertyDescriptor(TypeParameter.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$
-
+
/**
* The "name" structural property of this node type (child type: {@link SimpleName}).
*/
@@ -81,7 +81,7 @@ public class TypeParameter extends ASTNode {
addProperty(VALUE_PARAMETER_PROPERTY, propertyList);
// SH}
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(4);
createPropertyList(TypeParameter.class, propertyList);
addProperty(MODIFIERS_PROPERTY, propertyList);
@@ -138,7 +138,7 @@ public class TypeParameter extends ASTNode {
* (see constructor).
*/
private ASTNode.NodeList modifiers = null;
-
+
/**
* Creates a new unparented node for a parameterized type owned by the
* given AST. By default, an unspecified, but legal, type variable name,
@@ -312,7 +312,7 @@ public class TypeParameter extends ASTNode {
public List typeBounds() {
return this.typeBounds;
}
-
+
/**
* Returns the live ordered list of modifiers for this TypeParameter node (added in JLS8 API).
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/UnionType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/UnionType.java
index 77de29cce..5d365bb22 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/UnionType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/UnionType.java
@@ -74,7 +74,7 @@ public class UnionType extends Type {
/**
* Creates a new unparented node for an union type owned by the given AST.
* By default, it has no types.<p>
- *
+ *
* N.B. This constructor is package-private.
* </p>
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
index f2bc37e66..919dc28c8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
@@ -336,7 +336,7 @@ class VariableBinding implements IVariableBinding {
return ((LiftingTypeReference)decl.type).fakedArgument.binding.id;
}
}
- return getVariableId();
+ return getVariableId();
}
// SH}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
index dc4ff57f0..bdf87c44a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
@@ -51,7 +51,7 @@ public abstract class VariableDeclaration extends ASTNode {
* (element type: {@link Dimension}).
* Null before JLS8. Added in JLS8; defaults to an empty list
* (see constructor).
- *
+ *
* @since 3.10
*/
ASTNode.NodeList extraDimensions = null;
@@ -82,7 +82,7 @@ public abstract class VariableDeclaration extends ASTNode {
static final SimplePropertyDescriptor internalExtraDimensionsPropertyFactory(Class nodeClass) {
return new SimplePropertyDescriptor(nodeClass, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
}
-
+
/**
* Creates and returns a structural property descriptor for the
* "extraDimensions2" property declared on the given concrete node type (element type: {@link Dimension}).
@@ -92,7 +92,7 @@ public abstract class VariableDeclaration extends ASTNode {
static final ChildListPropertyDescriptor internalExtraDimensions2PropertyFactory(Class nodeClass) {
return new ChildListPropertyDescriptor(nodeClass, "extraDimensions2", Dimension.class, CYCLE_RISK); //$NON-NLS-1$
}
-
+
/**
* Creates and returns a structural property descriptor for the
* "initializer" property declared on the given concrete node type (child type: {@link Expression}).
@@ -123,7 +123,7 @@ public abstract class VariableDeclaration extends ASTNode {
return internalNameProperty();
}
-
+
/**
* Returns the structural property descriptor for the "extraDimensions" property
* of this node (type: {@link Integer}) (below JLS8 only).
@@ -154,7 +154,7 @@ public abstract class VariableDeclaration extends ASTNode {
* @since 3.10
*/
abstract ChildListPropertyDescriptor internalExtraDimensions2Property();
-
+
/**
* Returns the structural property descriptor for the "extraDimensions" property
* of this node (element type: {@link Dimension}) (added in JLS8 API).
@@ -165,7 +165,7 @@ public abstract class VariableDeclaration extends ASTNode {
public final ChildListPropertyDescriptor getExtraDimensions2Property() {
return internalExtraDimensions2Property();
}
-
+
/**
* Returns structural property descriptor for the "initializer" property
* of this node (child type: {@link Expression}).
@@ -287,7 +287,7 @@ public abstract class VariableDeclaration extends ASTNode {
* @exception IllegalArgumentException if the number of dimensions is
* negative
* @exception UnsupportedOperationException if this operation is used in
- * a JLS8 or later AST
+ * a JLS8 or later AST
* @deprecated In the JLS8 API, this method is replaced by
* {@link #extraDimensions()} which contains a list of {@link Dimension} nodes.
* @since 2.1
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
index 909915c87..b923cbed4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
@@ -143,7 +143,7 @@ public class VariableDeclarationFragment extends VariableDeclaration {
final ChildListPropertyDescriptor internalExtraDimensions2Property() {
return EXTRA_DIMENSIONS2_PROPERTY;
}
-
+
@Override
final ChildPropertyDescriptor internalInitializerProperty() {
return INITIALIZER_PROPERTY;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
index 7af7d1aad..2627070f0 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
@@ -41,7 +41,7 @@ public class WildcardType extends AnnotatableType {
*/
public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
internalAnnotationsPropertyFactory(WildcardType.class);
-
+
/**
* The "bound" structural property of this node type (child type: {@link Type}).
*/
@@ -74,7 +74,7 @@ public class WildcardType extends AnnotatableType {
addProperty(BOUND_PROPERTY, propertyList);
addProperty(UPPER_BOUND_PROPERTY, propertyList);
PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
-
+
propertyList = new ArrayList(4);
createPropertyList(WildcardType.class, propertyList);
addProperty(ANNOTATIONS_PROPERTY, propertyList);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/YieldStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/YieldStatement.java
index abf924f64..9ab51ff2c 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/YieldStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/YieldStatement.java
@@ -47,7 +47,7 @@ public class YieldStatement extends Statement {
* <code>true</code> indicates implicit and <code>false</code> indicates not implicit.
*/
private boolean isImplicit = false;
-
+
static {
List properyList = new ArrayList(2);
createPropertyList(YieldStatement.class, properyList);
@@ -99,7 +99,7 @@ public class YieldStatement extends Statement {
final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
return propertyDescriptors(apiLevel);
}
-
+
@Override
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
if (property == EXPRESSION_PROPERTY) {
@@ -142,11 +142,11 @@ public class YieldStatement extends Statement {
if (visitChildren) {
if (this.ast.apiLevel >= AST.JLS13_INTERNAL) {
acceptChild(visitor, getExpression());
- }
+ }
}
visitor.endVisit(this);
}
-
+
/**
* Returns the expression of this Yield statement, or <code>null</code> if
* there is none.
@@ -206,7 +206,7 @@ public class YieldStatement extends Statement {
this.isImplicit = isImplicit;
}
-
+
@Override
int memSize() {
return super.memSize() + 2 * 4;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
index 556c906d3..36279d178 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
@@ -119,7 +119,7 @@ public class ASTRewrite {
* @since 3.1
*/
private TargetSourceRangeComputer targetSourceRangeComputer = null;
-
+
/**
* Primary field used in representing rewrite properties efficiently.
* If <code>null</code>, this rewrite has no properties.
@@ -128,7 +128,7 @@ public class ASTRewrite {
* If a {@link Map}, this is the table of property name-value
* mappings.
* Initially <code>null</code>.
- *
+ *
* @see #property2
*/
private Object property1 = null;
@@ -564,7 +564,7 @@ public class ASTRewrite {
Map m = (Map) this.property1;
return m.get(propertyName);
}
-
+
/**
* Returns an object that tracks the source range of the given node
* across the rewrite to its AST. Upon return, the result object reflects
@@ -624,14 +624,14 @@ public class ASTRewrite {
if (!RewriteEventStore.DEBUG) {
return;
}
-
+
if (value == null) {
if (prop.isSimpleProperty() && ((SimplePropertyDescriptor) prop).isMandatory()
|| prop.isChildProperty() && ((ChildPropertyDescriptor) prop).isMandatory()) {
String message = "Can not remove property " + prop.getId(); //$NON-NLS-1$
throw new IllegalArgumentException(message);
}
-
+
} else {
Class valueType;
if (prop.isSimpleProperty()) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
index a5d03d1dc..886077af6 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
@@ -109,7 +109,7 @@ import org.eclipse.text.edits.TextEdit;
public final class ImportRewrite {
/**
* Used to determine how a type will be used, so that unwanted annotations can be filtered,
- * which is in particular relevant for avoiding redundant null annotations in the scope of {@code @NonNullByDefault}.
+ * which is in particular relevant for avoiding redundant null annotations in the scope of {@code @NonNullByDefault}.
* This enum is a superset of org.eclipse.jdt.annotation.DefaultLocation, and roughly corresponds
* to the classification of type locations as introduced by JSR 308.
*
@@ -118,49 +118,49 @@ public final class ImportRewrite {
public enum TypeLocation {
/**
* see org.eclipse.jdt.annotation.DefaultLocation.PARAMETER
- *
+ *
* @since 3.13
*/
PARAMETER,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.RETURN_TYPE
- *
+ *
* @since 3.13
*/
RETURN_TYPE,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.FIELD
- *
+ *
* @since 3.13
*/
FIELD,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.TYPE_PARAMETER
- *
+ *
* @since 3.13
*/
TYPE_PARAMETER,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.TYPE_BOUND
- *
+ *
* @since 3.13
*/
TYPE_BOUND,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.TYPE_ARGUMENT
- *
+ *
* @since 3.13
*/
TYPE_ARGUMENT,
/**
* see org.eclipse.jdt.annotation.DefaultLocation.ARRAY_CONTENTS
- *
+ *
* @since 3.13
*/
ARRAY_CONTENTS,
@@ -169,7 +169,7 @@ public final class ImportRewrite {
* The special value {@link #LOCAL_VARIABLE} is used for local variables: their nullness is determines by flow analysis,
* so top level nullness annotations are usually not needed for local variables (unless their type is a free
* type variable). Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
LOCAL_VARIABLE,
@@ -178,25 +178,25 @@ public final class ImportRewrite {
* The special value {@link #CAST} is used for casts.
* Casts are never affected by {@code @NonNullByDefault}
* Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
CAST,
-
+
/**
* The special value {@link #INSTANCEOF} is used for {@code instanceof} expressions.
* Null annotations are not supported in this location.
* Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
INSTANCEOF,
/**
- * The special value {@link #NEW} is used for {@code new} expressions (object allocations).
+ * The special value {@link #NEW} is used for {@code new} expressions (object allocations).
* Null annotations are not supported in this location.
* Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
NEW,
@@ -205,7 +205,7 @@ public final class ImportRewrite {
* The special value {@link #RECEIVER} is used for the receiver type in a method declaration or method reference.
* Null annotations are not supported in this location.
* Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
RECEIVER,
@@ -213,7 +213,7 @@ public final class ImportRewrite {
/**
* The special value {@link #EXCEPTION} is used for exception types in catch and throws declarations, which are
* implicitly non-null. Does not correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
EXCEPTION,
@@ -222,7 +222,7 @@ public final class ImportRewrite {
* The special value {@link #OTHER} is used for locations where type annotations are illegal, like type literals
* (X.class), annotations, or as scope for static field accesses. Does not correspond to a value in
* org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
OTHER,
@@ -230,7 +230,7 @@ public final class ImportRewrite {
/**
* The special value {@link #UNKNOWN} is used for invocations that don't specify the intended type usage. Does not
* correspond to a value in org.eclipse.jdt.annotation.DefaultLocation.
- *
+ *
* @since 3.13
*/
UNKNOWN,
@@ -479,7 +479,7 @@ public final class ImportRewrite {
this.importOrder= CharOperation.NO_STRINGS;
this.importOnDemandThreshold= 99;
this.staticImportOnDemandThreshold= 99;
-
+
this.importsKindMap = new HashMap();
}
@@ -557,10 +557,10 @@ public final class ImportRewrite {
* Note: {@link #setUseContextToFilterImplicitImports(boolean)} can be used to filter implicit imports
* when a context is used.
* </p>
- *
+ *
* @param filterImplicitImports
* if <code>true</code>, implicit imports will be filtered
- *
+ *
* @see #setUseContextToFilterImplicitImports(boolean)
*/
public void setFilterImplicitImports(boolean filterImplicitImports) {
@@ -577,16 +577,16 @@ public final class ImportRewrite {
* whether an import can be filtered because the type is implicitly visible. Note that too many imports
* may be kept if this option is set and <code>addImport*(...)</code> methods are called without a context.
* </p>
- *
+ *
* @param useContextToFilterImplicitImports the given setting
- *
+ *
* @see #setFilterImplicitImports(boolean)
* @since 3.6
*/
public void setUseContextToFilterImplicitImports(boolean useContextToFilterImplicitImports) {
this.useContextToFilterImplicitImports = useContextToFilterImplicitImports;
}
-
+
private static int compareImport(char prefix, String qualifier, String name, String curr) {
if (curr.charAt(0) != prefix || !curr.endsWith(name)) {
return ImportRewriteContext.RES_NAME_UNKNOWN;
@@ -645,14 +645,14 @@ public final class ImportRewrite {
|| mainTypeName.equals(Util.concatenateName(qualifier, name, '.'))) {
return ImportRewriteContext.RES_NAME_FOUND;
}
-
+
if (this.astRoot != null) {
List<AbstractTypeDeclaration> types = this.astRoot.types();
int nTypes = types.size();
for (int i = 0; i < nTypes; i++) {
AbstractTypeDeclaration type = types.get(i);
SimpleName simpleName = type.getName();
- if (simpleName.getIdentifier().equals(name)) {
+ if (simpleName.getIdentifier().equals(name)) {
return qualifier.equals(packageName)
? ImportRewriteContext.RES_NAME_FOUND
: ImportRewriteContext.RES_NAME_CONFLICT;
@@ -697,7 +697,7 @@ public final class ImportRewrite {
* to use the default context (only using the available imports)
* @return an annotation node. The returned annotation contains unqualified type names where
* an import could be added or was already known. Type names are fully qualified if an import conflict prevented an import.
- *
+ *
* @since 3.10
*/
public Annotation addAnnotation(IAnnotationBinding annotation, AST ast, ImportRewriteContext context) {
@@ -989,7 +989,7 @@ public final class ImportRewrite {
* in the code. The type binding can be an array binding, type variable or wildcard.
* If the binding is a generic type, the type parameters are ignored. For parameterized types, also the type
* arguments are processed and imports added if necessary. Anonymous types inside type arguments are normalized to their base type, wildcard
- * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
+ * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
* the type is retained from that point with type annotations and type arguments.
* <p>
* No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead.
@@ -1012,7 +1012,7 @@ public final class ImportRewrite {
* in the code. The type binding can be an array binding, type variable or wildcard.
* If the binding is a generic type, the type parameters are ignored. For parameterized types, also the type
* arguments are processed and imports added if necessary. Anonymous types inside type arguments are normalized to their base type, wildcard
- * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
+ * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
* the type is retained from that point with type annotations and type arguments
* <p>
* No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead.
@@ -1037,7 +1037,7 @@ public final class ImportRewrite {
* in the code. The type binding can be an array binding, type variable or wildcard.
* If the binding is a generic type, the type parameters are ignored. For parameterized types, also the type
* arguments are processed and imports added if necessary. Anonymous types inside type arguments are normalized to their base type, wildcard
- * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
+ * of wildcards are ignored. If type annotations or type arguments are present at any point, the import is added up to that point and
* the type is retained from that point with type annotations and type arguments
* <p>
* No imports are added for types that are already known. If a import for a type is recorded to be removed, this record is discarded instead.
@@ -1055,7 +1055,7 @@ public final class ImportRewrite {
* or else qualified names if an import conflict prevented an import.
* @since 3.13
*/
- public Type addImport(ITypeBinding binding, AST ast, ImportRewriteContext context, TypeLocation location) {
+ public Type addImport(ITypeBinding binding, AST ast, ImportRewriteContext context, TypeLocation location) {
ITypeBinding bindingPoint = checkAnnotationAndGenerics(binding);
Type type = internalAddImport(bindingPoint == null ? binding : bindingPoint, ast, context, null, /* getBase */ true, bindingPoint != null && !bindingPoint.equals(binding) ? TypeLocation.OTHER : location);
if (bindingPoint != null && !bindingPoint.equals(binding)) {
@@ -1335,7 +1335,7 @@ public final class ImportRewrite {
* @since 3.9
*/
public boolean removeImportBase(String qualifiedName) {
- return removeEntry(BASE_PREFIX + qualifiedName);
+ return removeEntry(BASE_PREFIX + qualifiedName);
}
// SH}
@@ -1399,7 +1399,7 @@ public final class ImportRewrite {
computer.addImport(isStatic, isBase, qualifiedName);
// SH}
}
-
+
for (String removedImport : this.removedImports) {
boolean isStatic = STATIC_PREFIX == removedImport.charAt(0);
String qualifiedName = removedImport.substring(1);
@@ -1634,7 +1634,7 @@ public final class ImportRewrite {
String qualifiedName= getRawQualifiedName(normalizedBinding);
String res = qualifiedName.length() > 0 ? internalAddImport(qualifiedName, context) : getRawName(normalizedBinding);
-
+
if (annotsPresent) {
int dotIndex = res != null ? res.lastIndexOf('.') : -1;
if (dotIndex > 0) {
@@ -1693,7 +1693,7 @@ public final class ImportRewrite {
// SH}
Type type = null;
ITypeBinding normalizedBinding = null;
-
+
if (binding.isPrimitive()) {
type = ast.newPrimitiveType(PrimitiveType.toCode(binding.getName()));
normalizedBinding= binding;
@@ -1725,7 +1725,7 @@ public final class ImportRewrite {
if (getBase) {
type = createBaseType(ast, context, normalizedBinding, location);
} else {
- type = currentType != null ? (Type) ast.newQualifiedType(currentType, ast.newSimpleName(getRawName(normalizedBinding))) :
+ type = currentType != null ? (Type) ast.newQualifiedType(currentType, ast.newSimpleName(getRawName(normalizedBinding))) :
ast.newSimpleType(ast.newName(getRawName(normalizedBinding)));
type = annotateType(normalizedBinding, ast, context, type, location);
}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
index 32761d096..ca5395a56 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
@@ -52,7 +52,7 @@ public class NaiveASTFlattener extends ASTVisitor {
* @since 3.4
*/
private static final int JLS2 = AST.JLS2;
-
+
/**
* Internal synonym for {@link AST#JLS3}. Use to alleviate
* deprecation warnings.
@@ -84,7 +84,7 @@ public class NaiveASTFlattener extends ASTVisitor {
* @since 3.14
*/
private static final int JLS9 = AST.JLS9;
-
+
/**
* The string buffer into which the serialized representation of the AST is
* written.
@@ -254,7 +254,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append('>');
}
}
-
+
private void visitTypeAnnotations(AnnotatableType node) {
if (node.getAST().apiLevel() >= JLS8) {
visitAnnotationsList(node.annotations());
@@ -268,7 +268,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append(' ');
}
}
-
+
/**
* Resets this printer so that it can be used again.
*/
@@ -598,7 +598,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append(";\n");//$NON-NLS-1$
return false;
}
-
+
@Override
public boolean visit(CreationReference node) {
node.getType().accept(this);
@@ -1044,11 +1044,11 @@ public class NaiveASTFlattener extends ASTVisitor {
if (it.hasNext()) {
this.buffer.append(", ");//$NON-NLS-1$
}
- }
+ }
this.buffer.append(" ");//$NON-NLS-1$
- }
+ }
} else {
- if (!node.thrownExceptionTypes().isEmpty()) {
+ if (!node.thrownExceptionTypes().isEmpty()) {
this.buffer.append(" throws ");//$NON-NLS-1$
for (Iterator it = node.thrownExceptionTypes().iterator(); it.hasNext(); ) {
Type n = (Type) it.next();
@@ -1056,8 +1056,8 @@ public class NaiveASTFlattener extends ASTVisitor {
if (it.hasNext()) {
this.buffer.append(", ");//$NON-NLS-1$
}
- }
- this.buffer.append(" ");//$NON-NLS-1$
+ }
+ this.buffer.append(" ");//$NON-NLS-1$
}
}
if (node.getBody() == null) {
@@ -1329,7 +1329,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append("record ");//$NON-NLS-1$
node.getName().accept(this);
this.buffer.append(" ");//$NON-NLS-1$
-
+
if (!node.typeParameters().isEmpty()) {
this.buffer.append("<");//$NON-NLS-1$
for (Iterator it = node.typeParameters().iterator(); it.hasNext(); ) {
@@ -1374,7 +1374,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append("}\n");//$NON-NLS-1$
return false;
}
-
+
@Override
public boolean visit(RequiresDirective node) {
printIndent();
@@ -1547,7 +1547,7 @@ public class NaiveASTFlattener extends ASTVisitor {
/*
* @see ASTVisitor#visit(SuperMethodReference)
- *
+ *
* @since 3.10
*/
@Override
@@ -1623,14 +1623,14 @@ public class NaiveASTFlattener extends ASTVisitor {
this.indent--;
printIndent();
this.buffer.append("}\n");//$NON-NLS-1$
-
+
}
@Override
public boolean visit(SwitchExpression node) {
visitSwitchNode(node);
return false;
}
-
+
@Override
public boolean visit(SwitchStatement node) {
visitSwitchNode(node);
@@ -1694,7 +1694,7 @@ public class NaiveASTFlattener extends ASTVisitor {
this.buffer.append(node.getEscapedValue());
return false;
}
-
+
@Override
public boolean visit(TextElement node) {
this.buffer.append(node.getText());
@@ -1846,7 +1846,7 @@ public class NaiveASTFlattener extends ASTVisitor {
/*
* @see ASTVisitor#visit(TypeMethodReference)
- *
+ *
* @since 3.10
*/
@Override
@@ -1991,7 +1991,7 @@ public class NaiveASTFlattener extends ASTVisitor {
}
return false;
}
-
+
@Override
public boolean visit(YieldStatement node) {
if ((node.getAST().apiLevel() >= AST.JLS14) && node.isImplicit() && node.getExpression() == null) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
index 6f8721f35..a16c18260 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
@@ -29,9 +29,9 @@ public class SourceRangeVerifier extends ASTVisitor {
public static boolean DEBUG = false;
public static boolean DEBUG_THROW = false;
-
- private StringBuffer bugs;
-
+
+ private StringBuffer bugs;
+
/**
* Verifies proper node nesting as specified in {@link ASTParser#setKind(int)}:
* <p>
@@ -39,7 +39,7 @@ public class SourceRangeVerifier extends ASTVisitor {
* within the source range of its parent, and the source ranges of sibling
* nodes never overlap.
* </p>
- *
+ *
* @param node
* @return <code>null</code> if everything is OK; a list of errors otherwise
*/
@@ -52,11 +52,11 @@ public class SourceRangeVerifier extends ASTVisitor {
return null;
return buffer.toString();
}
-
+
@Override
public boolean preVisit2(ASTNode node) {
ASTNode previous = null;
-
+
List properties = node.structuralPropertiesForType();
for (int i = 0; i < properties.size(); i++) {
StructuralPropertyDescriptor property = (StructuralPropertyDescriptor) properties.get(i);
@@ -89,24 +89,24 @@ public class SourceRangeVerifier extends ASTVisitor {
private boolean checkChild(ASTNode parent, ASTNode previous, ASTNode child) {
if ((parent.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0
|| (child.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0)
- return false;
+ return false;
if (DOMASTUtil.isRecordDeclarationSupported(child.getAST()) && child instanceof SingleVariableDeclaration) {
if (previous != null && previous instanceof MethodDeclaration && ((MethodDeclaration)previous).isCompactConstructor()) {
return true; // For compact constructors, do not validate for parameters
}
}
-
+
int parentStart = parent.getStartPosition();
int parentEnd = parentStart + parent.getLength();
-
+
int childStart = child.getStartPosition();
int childEnd = childStart + child.getLength();
-
+
if (previous != null) {
// Turn a blind eye on a known problem ... see https://bugs.eclipse.org/391894#c4
if (child.getLocationInParent() == ArrayCreation.DIMENSIONS_PROPERTY)
return false;
-
+
int previousStart = previous.getStartPosition();
int previousEnd = previousStart + previous.getLength();
if (childStart < previousEnd) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
index 364ce8138..e61aae316 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
@@ -83,7 +83,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
/** @deprecated using deprecated code */
private static final ChildPropertyDescriptor INTERNAL_METHOD_RETURN_TYPE_PROPERTY = MethodDeclaration.RETURN_TYPE_PROPERTY;
-
+
/** @deprecated using deprecated code */
private static final SimplePropertyDescriptor INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY = MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY;
@@ -95,10 +95,10 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
/** @deprecated using deprecated code */
private static final ChildPropertyDescriptor INTERNAL_TYPE_SUPERCLASS_PROPERTY = TypeDeclaration.SUPERCLASS_PROPERTY;
-
+
/** @deprecated using deprecated code */
private static final ChildListPropertyDescriptor INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY = TypeDeclaration.SUPER_INTERFACES_PROPERTY;
-
+
/** @deprecated using deprecated code */
private static final ChildPropertyDescriptor INTERNAL_CIC_NAME_PROPERTY = ClassInstanceCreation.NAME_PROPERTY;
@@ -122,16 +122,16 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
/** @deprecated using deprecated code */
private static final ChildListPropertyDescriptor INTERNAL_TRY_STATEMENT_RESOURCES_PROPERTY = TryStatement.RESOURCES_PROPERTY;
-
+
/** @deprecated using deprecated code */
private static final ChildPropertyDescriptor INTERNAL_SWITCH_EXPRESSION_PROPERTY = SwitchCase.EXPRESSION_PROPERTY;
/** @deprecated using deprecated code */
private static final int JLS2_INTERNAL = AST.JLS2;
-
+
/** @deprecated using deprecated code */
private static final int JLS3_INTERNAL = AST.JLS3;
-
+
/** @deprecated using deprecated code */
private static final int JLS4_INTERNAL = AST.JLS4;
@@ -140,7 +140,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
/** @deprecated using deprecated code */
private static final int JLS9_INTERNAL = AST.JLS9;
-
+
TextEdit currentEdit;
final RewriteEventStore eventStore; // used from inner classes
@@ -156,17 +156,17 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
private final NodeInfoStore nodeInfos;
private final TargetSourceRangeComputer extendedSourceRangeComputer;
private final LineCommentEndOffsets lineCommentEndOffsets;
-
+
private int beforeRequiredSpaceIndex = -1;
-
+
Map options;
-
+
private RecoveryScannerData recoveryScannerData;
/**
* Constructor for ASTRewriteAnalyzer.
* <p>The given options cannot be null.</p>
- *
+ *
* @param content the content of the compilation unit to rewrite.
* @param lineInfo line information for the content of the compilation unit to rewrite.
* @param rootEdit the edit to add all generated edits to
@@ -201,9 +201,9 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
this.extendedSourceRangeComputer = extendedSourceRangeComputer;
this.lineCommentEndOffsets= new LineCommentEndOffsets(comments);
-
+
this.options = options;
-
+
this.recoveryScannerData = recoveryScannerData;
}
@@ -212,7 +212,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
CompilerOptions compilerOptions = new CompilerOptions(this.options);
Scanner scanner;
if (this.recoveryScannerData == null) {
- scanner =
+ scanner =
new Scanner(
true,/*tokenizeComments*/
false,/*tokenizeWhiteSpace*/
@@ -665,7 +665,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (separatorState == EXISTING) {
updateIndent(prevMark, currPos, i, editGroup);
}
-
+
doTextInsert(currPos, node, getNodeIndent(i), true, editGroup); // insert node
separatorState= NEW;
@@ -710,8 +710,8 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
if (currPos < newOffset) {
currPos = extendedOffset;
- }
- prevEnd = newOffset;
+ }
+ prevEnd = newOffset;
} catch (CoreException e) {
// ignore
}
@@ -726,7 +726,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (i < lastNonDelete) {
updateIndent(prevMark, currPos, i, editGroup);
}
-
+
// remove element and next separator
int end= getStartOfNextNode(nextIndex, currEnd); // start of next
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=306524
@@ -763,7 +763,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
TextEditGroup editGroup= getEditGroup(currEvent);
ASTNode changed= (ASTNode) currEvent.getNewValue();
-
+
updateIndent(prevMark, currPos, i, editGroup);
// make sure that comments between last modified source position and extended starting position of
// node to be replaced are not touched
@@ -785,7 +785,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
if (currPos < newOffset) {
currPos = extendedOffset;
- }
+ }
} catch (CoreException e) {
// ignore
}
@@ -814,7 +814,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
separatorState= EXISTING;
}
}
-
+
prevMark = currMark;
}
return currPos;
@@ -823,7 +823,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
public final int rewriteList(ASTNode parent, StructuralPropertyDescriptor property, int offset, String keyword) {
return rewriteList(parent, property, keyword, null, offset);
}
-
+
protected void updateIndent(int prevMark, int originalOffset, int nodeIndex, TextEditGroup editGroup) {
// Do nothing.
}
@@ -870,7 +870,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
case RewriteEvent.REMOVED: {
ASTNode node= (ASTNode) event.getOriginalValue();
TextEditGroup editGroup= getEditGroup(event);
-
+
// if there is a prefix, remove the prefix as well
int nodeEnd;
int len;
@@ -1052,7 +1052,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return pos;
}
-
+
private int rewriteExpressionOptionalQualifier(SwitchCase parent, StructuralPropertyDescriptor property, int startPos) {
RewriteEvent event= getEvent(parent, property);
if (event != null) {
@@ -1128,7 +1128,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
protected String getSeparatorString(int nodeIndex) {
return getSeparatorString(nodeIndex, nodeIndex + 1);
}
-
+
protected String getSeparatorString(int nodeIndex, int nextNodeIndex) {
int newLines= this.separatorLines == -1 ? getNewLines(nodeIndex) : this.separatorLines;
@@ -1202,7 +1202,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return 0;
}
-
+
@Override
protected boolean mustRemoveSeparator(int originalOffset, int nodeIndex) {
// Do not remove separator if the previous non removed node is on the same line and the next node is on another line
@@ -1210,10 +1210,10 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
while (previousNonRemovedNodeIndex >= 0 && this.list[previousNonRemovedNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
previousNonRemovedNodeIndex--;
}
-
+
if (previousNonRemovedNodeIndex > -1) {
LineInformation lineInformation = getLineInformation();
-
+
RewriteEvent prevEvent = this.list[previousNonRemovedNodeIndex];
int prevKind = prevEvent.getChangeKind();
if (prevKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
@@ -1221,23 +1221,23 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
int prevEndPosition = prevNode.getStartPosition() + prevNode.getLength();
int prevLine = lineInformation.getLineOfOffset(prevEndPosition);
int line = lineInformation.getLineOfOffset(originalOffset);
-
+
if (prevLine == line && nodeIndex + 1 < this.list.length) {
RewriteEvent nextEvent = this.list[nodeIndex + 1];
int nextKind = nextEvent.getChangeKind();
-
+
if (nextKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
ASTNode nextNode = (ASTNode) nextEvent.getOriginalValue();
int nextStartPosition = nextNode.getStartPosition();
int nextLine = lineInformation.getLineOfOffset(nextStartPosition);
-
+
return nextLine == line;
}
return false;
}
}
}
-
+
return true;
}
}
@@ -1485,7 +1485,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
currPos= offset;
} else {
- // If in the first line, there are cases (eg: catch clause) where the line will not be prefixed with
+ // If in the first line, there are cases (eg: catch clause) where the line will not be prefixed with
// proper indentation - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=350285
int lineOffset = getCurrentLineStart(formatted, offset);
String destIndentString = (lineOffset == 0)
@@ -1532,7 +1532,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return 0;
}
-
+
private void rewriteModifiers(ASTNode parent, StructuralPropertyDescriptor property, int offset) {
RewriteEvent event= getEvent(parent, property);
if (event == null || event.getChangeKind() != RewriteEvent.REPLACED) {
@@ -1630,7 +1630,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
//
// Prefix formatterPrefix = this.formatter.CASE_SEPARATION;
//
-// int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$
+// int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$
//
// try {
// int nextPos= getScanner().getNextStartOffset(endPos, false);
@@ -1654,7 +1654,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// }
// return endPos;
// }
-
+
private int rewriteModifiers2(ASTNode node, ChildListPropertyDescriptor property, int pos) {
RewriteEvent event= getEvent(node, property);
if (event == null || event.getChangeKind() == RewriteEvent.UNCHANGED) {
@@ -1676,7 +1676,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
}
- boolean isAnnotationsProperty = isVarargsAnnotationsProperty
+ boolean isAnnotationsProperty = isVarargsAnnotationsProperty
|| node instanceof AnnotatableType && property == ((AnnotatableType) node).getAnnotationsProperty();
Prefix formatterPrefix;
if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY ||
@@ -1694,7 +1694,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
formatterPrefix= this.formatter.ANNOTATION_SEPARATION;
}
- int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$
+ int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$
try {
int nextPos= getScanner().getNextStartOffset(endPos, false);
@@ -1719,7 +1719,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return endPos;
}
-
+
private int rewriteTypeAnnotations(ASTNode node, ChildListPropertyDescriptor property, int pos) {
return rewriteModifiers2(node, property, pos);
}
@@ -1778,7 +1778,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
addEdit(edit);
this.currentEdit= edit;
}
-
+
ensureSpaceBeforeReplace(node);
}
@@ -1808,10 +1808,10 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
int startPos = 0;
boolean isModuleInfo = node.getAST().apiLevel() >= JLS9_INTERNAL && node.getModule() != null;
-
+
if (!isModuleInfo) {
startPos = rewriteNode(node, CompilationUnit.PACKAGE_PROPERTY, 0, ASTRewriteFormatter.NONE);
-
+
if (getChangeKind(node, CompilationUnit.PACKAGE_PROPERTY) == RewriteEvent.INSERTED) {
doTextInsert(0, getLineDelimiter(), getEditGroup(node, CompilationUnit.PACKAGE_PROPERTY));
}
@@ -1873,7 +1873,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
pos= rewriteRequiredNode(node, TypeDeclaration.NAME_PROPERTY);
if (!isJLS2) {
- pos= rewriteOptionalTypeParameters(node, TypeDeclaration.TYPE_PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, false, true);
+ pos= rewriteOptionalTypeParameters(node, TypeDeclaration.TYPE_PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, false, true);
}
// superclass
@@ -1936,7 +1936,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
firstStart= ((ASTNode) origNodes.get(0)).getStartPosition();
}
doTextReplace(pos, firstStart - pos, keyword, getEditGroup(node, TypeDeclaration.INTERFACE_PROPERTY));
- keyword= Util.EMPTY_STRING;
+ keyword= Util.EMPTY_STRING;
pos= firstStart;
}
}
@@ -1997,7 +1997,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
}
}
-
+
private int rewriteMethodReceiver(MethodDeclaration method, int offset) throws CoreException {
offset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, offset);
if (method.getAST().apiLevel() < JLS8_INTERNAL) {
@@ -2101,7 +2101,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return i < size ? prev : null;
}
-
+
private int getPreviousTokenEndOffset(ASTNode node, int token) {
int offset = -1;
ASTNode prev = getPreviousNode(node);
@@ -2115,13 +2115,13 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return offset;
}
-
+
@Override
public boolean visit(Dimension node) {
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
-
+
boolean keywordSpace = true;
ASTNode parent = node.getParent();
if (parent.getNodeType() == ASTNode.ARRAY_TYPE) {
@@ -2179,7 +2179,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// parameters
try {
pos= rewriteMethodReceiver(node, pos);
- pos= rewriteNodeList(node, MethodDeclaration.PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ pos= rewriteNodeList(node, MethodDeclaration.PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRPAREN, pos);
ChildListPropertyDescriptor exceptionsProperty = apiLevel < JLS8_INTERNAL ? INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY : MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY;
@@ -2203,7 +2203,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
pos= rewriteNodeList(node, exceptionsProperty, pos, " throws ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
-
+
rewriteMethodBody(node, pos);
} catch (CoreException e) {
// ignore
@@ -2277,10 +2277,10 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// name
pos= rewriteRequiredNode(node, RecordDeclaration.NAME_PROPERTY);
- pos= rewriteOptionalTypeParameters(node, RecordDeclaration.TYPE_PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, false, true);
+ pos= rewriteOptionalTypeParameters(node, RecordDeclaration.TYPE_PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, false, true);
+
+ pos= rewriteNodeList(node, RecordDeclaration.RECORD_COMPONENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
- pos= rewriteNodeList(node, RecordDeclaration.RECORD_COMPONENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
-
// extended interfaces
ChildListPropertyDescriptor superInterfaceProperty= RecordDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
@@ -2288,7 +2288,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (interfaceEvent == null || interfaceEvent.getChangeKind() == RewriteEvent.UNCHANGED) {
pos= doVisit(node, superInterfaceProperty, pos);
} else {
- String keyword= " implements "; //$NON-NLS-1$
+ String keyword= " implements "; //$NON-NLS-1$
pos= rewriteNodeList(node, superInterfaceProperty, pos, keyword, ", "); //$NON-NLS-1$
}
@@ -2299,18 +2299,18 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
rewriteParagraphList(node, RecordDeclaration.BODY_DECLARATIONS_PROPERTY, startPos, startIndent, -1, 2);
return false;
}
-
+
@Override
public boolean visit(ReturnStatement node) {
try {
this.beforeRequiredSpaceIndex = getScanner().getTokenEndOffset(TerminalTokens.TokenNamereturn, node.getStartPosition());
-
+
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
-
+
ensureSpaceBeforeReplace(node);
-
+
rewriteNode(node, ReturnStatement.EXPRESSION_PROPERTY, this.beforeRequiredSpaceIndex, ASTRewriteFormatter.SPACE);
} catch (CoreException e) {
handleException(e);
@@ -2564,7 +2564,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
int startPos= getPosAfterLeftBrace(node.getStartPosition());
- rewriteNodeList(node, ArrayInitializer.EXPRESSIONS_PROPERTY, startPos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, ArrayInitializer.EXPRESSIONS_PROPERTY, startPos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
return false;
}
@@ -2590,13 +2590,13 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
public boolean visit(AssertStatement node) {
try {
this.beforeRequiredSpaceIndex = getScanner().getNextEndOffset(node.getStartPosition(), true);
-
+
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
-
+
ensureSpaceBeforeReplace(node);
-
+
int offset= rewriteRequiredNode(node, AssertStatement.EXPRESSION_PROPERTY);
rewriteNode(node, AssertStatement.MESSAGE_PROPERTY, offset, ASTRewriteFormatter.ASSERT_COMMENT);
} catch (CoreException e) {
@@ -2704,7 +2704,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (isChanged(node, ClassInstanceCreation.ARGUMENTS_PROPERTY)) {
try {
int startpos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, ClassInstanceCreation.ARGUMENTS_PROPERTY, startpos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, ClassInstanceCreation.ARGUMENTS_PROPERTY, startpos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -2745,11 +2745,11 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
int pos= node.getStartPosition();
if (node.getAST().apiLevel() >= JLS3_INTERNAL) {
- pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
+ pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
}
try {
pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -2834,7 +2834,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
return doVisitUnchangedChildren(node);
}
int pos = rewriteRequiredNode(node, ExportsDirective.NAME_PROPERTY);
- rewriteNodeList(node, ExportsDirective.MODULES_PROPERTY, pos, "to ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
+ rewriteNodeList(node, ExportsDirective.MODULES_PROPERTY, pos, "to ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
@@ -2875,7 +2875,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
pos= rewriteRequiredNode(node, FieldDeclaration.TYPE_PROPERTY);
ensureSpaceAfterReplace(node, FieldDeclaration.TYPE_PROPERTY);
- rewriteNodeList(node, FieldDeclaration.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, FieldDeclaration.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
return false;
}
@@ -2891,7 +2891,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (isChanged(node, ForStatement.INITIALIZERS_PROPERTY)) {
// position after opening parent
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- pos= rewriteNodeList(node, ForStatement.INITIALIZERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ pos= rewriteNodeList(node, ForStatement.INITIALIZERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} else {
pos= doVisit(node, ForStatement.INITIALIZERS_PROPERTY, pos);
}
@@ -2903,7 +2903,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (isChanged(node, ForStatement.UPDATERS_PROPERTY)) {
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameSEMICOLON, pos);
- pos= rewriteNodeList(node, ForStatement.UPDATERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ pos= rewriteNodeList(node, ForStatement.UPDATERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} else {
pos= doVisit(node, ForStatement.UPDATERS_PROPERTY, pos);
}
@@ -2939,7 +2939,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
try {
int tok= getScanner().readNext(pos, true); // after the closing parent
pos= (tok == TerminalTokens.TokenNameRPAREN) ? getScanner().getCurrentEndOffset() : getScanner().getCurrentStartOffset();
-
+
int indent= getIndent(node.getStartPosition());
int endPos= -1;
@@ -3041,12 +3041,12 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
Expression right= node.getRightOperand();
int pos;
-
+
RewriteEvent leftEvent= getEvent(node, InfixExpression.LEFT_OPERAND_PROPERTY);
boolean removeLeft = leftEvent != null && leftEvent.getChangeKind() == RewriteEvent.REMOVED;
RewriteEvent rightEvent= getEvent(node, InfixExpression.RIGHT_OPERAND_PROPERTY);
boolean removeRight = rightEvent != null && rightEvent.getChangeKind() == RewriteEvent.REMOVED;
-
+
if (removeLeft) {
Expression left= node.getLeftOperand();
int leftStart= getExtendedOffset(left);
@@ -3154,12 +3154,12 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
}
}
-
+
private void ensureSpaceBeforeReplace(ASTNode node) {
if (this.beforeRequiredSpaceIndex == -1) return;
-
+
List events = this.eventStore.getChangedPropertieEvents(node);
-
+
for (Iterator iterator = events.iterator(); iterator.hasNext();) {
RewriteEvent event = (RewriteEvent) iterator.next();
if (event.getChangeKind() == RewriteEvent.REPLACED && event.getOriginalValue() instanceof ASTNode) {
@@ -3170,7 +3170,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
}
}
-
+
if (this.beforeRequiredSpaceIndex < getExtendedOffset(node)) {
this.beforeRequiredSpaceIndex = -1;
}
@@ -3241,7 +3241,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
insertParentheses = true;
}
}
-
+
int pos = node.getStartPosition();
if (insertParentheses) {
doTextInsert(pos, "(", editGroup); //$NON-NLS-1$
@@ -3288,7 +3288,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
int pos= rewriteOptionalQualifier(node, MethodInvocation.EXPRESSION_PROPERTY, node.getStartPosition());
if (node.getAST().apiLevel() >= JLS3_INTERNAL) {
- pos= rewriteOptionalTypeParameters(node, MethodInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
+ pos= rewriteOptionalTypeParameters(node, MethodInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
}
pos= rewriteRequiredNode(node, MethodInvocation.NAME_PROPERTY);
@@ -3297,7 +3297,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// eval position after opening parent
try {
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, MethodInvocation.ARGUMENTS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, MethodInvocation.ARGUMENTS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -3535,14 +3535,14 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
int pos= rewriteOptionalQualifier(node, SuperConstructorInvocation.EXPRESSION_PROPERTY, node.getStartPosition());
if (node.getAST().apiLevel() >= JLS3_INTERNAL) {
- pos= rewriteOptionalTypeParameters(node, SuperConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
+ pos= rewriteOptionalTypeParameters(node, SuperConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
}
if (isChanged(node, SuperConstructorInvocation.ARGUMENTS_PROPERTY)) {
// eval position after opening parent
try {
pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, SuperConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, SuperConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -3575,7 +3575,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (isChanged(node, SuperMethodInvocation.TYPE_ARGUMENTS_PROPERTY)) {
try {
pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameDOT, pos);
- rewriteOptionalTypeParameters(node, SuperMethodInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
+ rewriteOptionalTypeParameters(node, SuperMethodInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false);
} catch (CoreException e) {
handleException(e);
}
@@ -3588,7 +3588,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// eval position after opening parent
try {
pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, SuperMethodInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, SuperMethodInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -3640,18 +3640,18 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
public SwitchListLabeledRuleRewriter(int initialIndent) {
super(initialIndent);
}
-
+
@Override
protected String getSeparatorString(int nodeIndex, int nextNodeIndex) {
boolean isSwitchLabelRule = isSwitchLabeledRule(nodeIndex, nextNodeIndex);
String spaceDelim = JavaCore.INSERT.equals(ASTRewriteAnalyzer.this.options.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ARROW_IN_SWITCH_CASE))? " ":""; //$NON-NLS-1$ //$NON-NLS-2$
String lineDelim = isSwitchLabelRule ? spaceDelim : getLineDelimiter();
-
+
StringBuffer buf= new StringBuffer(lineDelim);
buf.append(createIndentString(getNodeIndent(nextNodeIndex)));
return buf.toString();
}
-
+
@Override
protected int getNodeIndent(int nodeIndex) {
int indent= getInitialIndent();
@@ -3675,7 +3675,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return indent;
}
-
+
private boolean isSwitchLabeledRule(int nodeIndex, int nextNodeIndex) {
ASTNode curr= getNode(nodeIndex);
ASTNode next= getNode(nodeIndex +1);
@@ -3686,43 +3686,43 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
return false;
}
}
-
+
class SwitchListRewriter extends ParagraphListRewriter {
protected boolean indentSwitchStatementsCompareToCases;
public SwitchListRewriter(int initialIndent) {
super(initialIndent, 0);
- this.indentSwitchStatementsCompareToCases =
+ this.indentSwitchStatementsCompareToCases =
DefaultCodeFormatterConstants.TRUE.equals(ASTRewriteAnalyzer.this.options.get(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES));
}
@Override
protected int getNodeIndent(int nodeIndex) {
int indent= getInitialIndent();
-
+
if (this.indentSwitchStatementsCompareToCases) {
RewriteEvent event = this.list[nodeIndex];
int changeKind = event.getChangeKind();
-
+
ASTNode node;
if (changeKind == RewriteEvent.INSERTED || changeKind == RewriteEvent.REPLACED) {
node= (ASTNode)event.getNewValue();
} else {
node= (ASTNode)event.getOriginalValue();
}
-
+
if (node.getNodeType() != ASTNode.SWITCH_CASE) {
indent++;
}
}
return indent;
}
-
+
@Override
protected String getSeparatorString(int nodeIndex) {
int total = this.list.length;
-
+
int nextNodeIndex = nodeIndex + 1;
while (nextNodeIndex < total && this.list[nextNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
nextNodeIndex++;
@@ -3732,20 +3732,20 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return getSeparatorString(nodeIndex, nextNodeIndex);
}
-
+
@Override
protected void updateIndent(int prevMark, int originalOffset, int nodeIndex, TextEditGroup editGroup) {
if (prevMark != RewriteEvent.UNCHANGED && prevMark != RewriteEvent.REPLACED) return;
-
+
// Do not change indent if the previous non removed node is on the same line
int previousNonRemovedNodeIndex = nodeIndex - 1;
while (previousNonRemovedNodeIndex >= 0 && this.list[previousNonRemovedNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
previousNonRemovedNodeIndex--;
}
-
+
if (previousNonRemovedNodeIndex > -1) {
LineInformation lineInformation = getLineInformation();
-
+
RewriteEvent prevEvent = this.list[previousNonRemovedNodeIndex];
int prevKind = prevEvent.getChangeKind();
if (prevKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
@@ -3753,27 +3753,27 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
int prevEndPosition = prevNode.getStartPosition() + prevNode.getLength();
int prevLine = lineInformation.getLineOfOffset(prevEndPosition);
int line = lineInformation.getLineOfOffset(originalOffset);
-
+
if (prevLine == line) {
return;
}
}
}
-
+
int total = this.list.length;
while (nodeIndex < total && this.list[nodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
nodeIndex++;
}
-
+
int originalIndent = getIndent(originalOffset);
int newIndent = getNodeIndent(nodeIndex);
-
+
if (originalIndent != newIndent) {
-
+
int line= getLineInformation().getLineOfOffset(originalOffset);
if (line >= 0) {
int lineStart= getLineInformation().getLineOffset(line);
-
+
doTextRemove(lineStart, originalOffset - lineStart, editGroup); // remove previous indentation
doTextInsert(lineStart, createIndentString(newIndent), editGroup); // add new indentation
}
@@ -3797,7 +3797,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
if (DefaultCodeFormatterConstants.TRUE.equals(this.options.get(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH))) {
insertIndent++;
}
-
+
ParagraphListRewriter listRewriter= new SwitchListLabeledRuleRewriter(insertIndent);
StringBuffer leadString= new StringBuffer();
leadString.append(getLineDelimiter());
@@ -3811,7 +3811,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return false;
}
-
+
@Override
public boolean visit(SwitchStatement node) {
if (!hasChildrenChanges(node)) {
@@ -3872,11 +3872,11 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
public boolean visit(ThrowStatement node) {
try {
this.beforeRequiredSpaceIndex = getScanner().getTokenEndOffset(TerminalTokens.TokenNamethrow, node.getStartPosition());
-
+
if (!hasChildrenChanges(node)) {
return doVisitUnchangedChildren(node);
}
-
+
ensureSpaceBeforeReplace(node);
rewriteRequiredNode(node, ThrowStatement.EXPRESSION_PROPERTY);
@@ -3906,7 +3906,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
pos= rewriteRequiredNode(node, TryStatement.BODY_PROPERTY);
-
+
if (isChanged(node, TryStatement.CATCH_CLAUSES_PROPERTY)) {
int indent= getIndent(node.getStartPosition());
String prefix= this.formatter.CATCH_BLOCK.getPrefix(indent);
@@ -3973,7 +3973,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
rewriteModifiers2(node, VariableDeclarationExpression.MODIFIERS2_PROPERTY, pos);
}
pos= rewriteRequiredNode(node, VariableDeclarationExpression.TYPE_PROPERTY);
- rewriteNodeList(node, VariableDeclarationExpression.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, VariableDeclarationExpression.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
return false;
}
@@ -4021,7 +4021,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
pos= rewriteRequiredNode(node, VariableDeclarationStatement.TYPE_PROPERTY);
- rewriteNodeList(node, VariableDeclarationStatement.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, VariableDeclarationStatement.FRAGMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
return false;
}
@@ -4070,7 +4070,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// eval position after opening parent
try {
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, MethodRef.PARAMETERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, MethodRef.PARAMETERS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -4162,7 +4162,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
return false;
}
-
+
@Override
public boolean visit(TextElement node) {
if (!hasChildrenChanges(node)) {
@@ -4249,7 +4249,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
int nextTok= getScanner().readNext(pos, true);
boolean hasParents= (nextTok == TerminalTokens.TokenNameLPAREN);
boolean isAllRemoved= hasParents && isAllOfKind(children, RewriteEvent.REMOVED);
- String prefix= Util.EMPTY_STRING;
+ String prefix= Util.EMPTY_STRING;
if (!hasParents) {
prefix= "("; //$NON-NLS-1$
} else if (!isAllRemoved) {
@@ -4300,7 +4300,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
pos= getPosAfterLeftBrace(pos);
- String leadString= Util.EMPTY_STRING;
+ String leadString= Util.EMPTY_STRING;
RewriteEvent constEvent= getEvent(node, EnumDeclaration.ENUM_CONSTANTS_PROPERTY);
if (constEvent != null && constEvent.getChangeKind() != RewriteEvent.UNCHANGED) {
@@ -4424,7 +4424,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// eval position after opening parent
try {
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
- rewriteNodeList(node, NormalAnnotation.VALUES_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, NormalAnnotation.VALUES_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -4460,7 +4460,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
// eval position after opening parent
try {
int startOffset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLESS, pos);
- rewriteNodeList(node, ParameterizedType.TYPE_ARGUMENTS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+ rewriteNodeList(node, ParameterizedType.TYPE_ARGUMENTS_PROPERTY, startOffset, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
} catch (CoreException e) {
handleException(e);
}
@@ -4572,7 +4572,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
}
return false;
}
-
+
@Override
public boolean visit(YieldStatement node) {
if (!hasChildrenChanges(node)) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
index 327e3aa6d..3a0c71223 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
@@ -39,7 +39,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
/** @deprecated using deprecated code */
private static final ChildPropertyDescriptor INTERNAL_METHOD_RETURN_TYPE_PROPERTY = MethodDeclaration.RETURN_TYPE_PROPERTY;
-
+
/** @deprecated using deprecated code */
private static final SimplePropertyDescriptor INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY = MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY;
@@ -96,7 +96,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
/** @deprecated using deprecated code */
private static final int JLS9_INTERNAL = AST.JLS9;
-
+
public static String asString(ASTNode node, RewriteEventStore store) {
ASTRewriteFlattener flattener= new ASTRewriteFlattener(store);
node.accept(flattener);
@@ -761,15 +761,15 @@ public class ASTRewriteFlattener extends ASTVisitor {
}
}
}
-
+
visitList(node, MethodDeclaration.PARAMETERS_PROPERTY, String.valueOf(','));
this.result.append(')');
}
visitExtraDimensions(node, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
- ChildListPropertyDescriptor exceptionsProperty = node.getAST().apiLevel() < JLS8_INTERNAL ?
+ ChildListPropertyDescriptor exceptionsProperty = node.getAST().apiLevel() < JLS8_INTERNAL ?
INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY : MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY;
- visitList(node, exceptionsProperty, String.valueOf(','), " throws ", Util.EMPTY_STRING); //$NON-NLS-1$
+ visitList(node, exceptionsProperty, String.valueOf(','), " throws ", Util.EMPTY_STRING); //$NON-NLS-1$
//{ObjectTeams: predicate
ASTNode guardPredicate = getChildNode(node, MethodDeclaration.GUARD_PROPERTY);
if (guardPredicate != null) {
@@ -911,9 +911,9 @@ public class ASTRewriteFlattener extends ASTVisitor {
this.result.append("record ");//$NON-NLS-1$
getChildNode(node, RecordDeclaration.NAME_PROPERTY).accept(this);
this.result.append(' ');
-
+
visitList(node, RecordDeclaration.TYPE_PARAMETERS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>'));
-
+
this.result.append('(');
visitList(node, RecordDeclaration.RECORD_COMPONENTS_PROPERTY, String.valueOf(','));
this.result.append(')');
@@ -926,7 +926,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
this.result.append('}');
return false;
}
-
+
@Override
public boolean visit(RequiresDirective node) {
this.result.append("requires "); //$NON-NLS-1$
@@ -1055,7 +1055,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
t.accept(this);
this.result.append(it.hasNext() ? ", " : ""); //$NON-NLS-1$ //$NON-NLS-2$
}
- this.result.append(getBooleanAttribute(node, SwitchCase.SWITCH_LABELED_RULE_PROPERTY) ? " ->" : ":");//$NON-NLS-1$ //$NON-NLS-2$
+ this.result.append(getBooleanAttribute(node, SwitchCase.SWITCH_LABELED_RULE_PROPERTY) ? " ->" : ":");//$NON-NLS-1$ //$NON-NLS-2$
}
} else {
ASTNode expression= getChildNode(node, INTERNAL_SWITCH_EXPRESSION_PROPERTY);
@@ -1075,7 +1075,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
visitSwitchNode(node);
return false;
}
-
+
private void visitSwitchNode(ASTNode node) {
this.result.append("switch ("); //$NON-NLS-1$
if (node instanceof SwitchExpression) {
@@ -1092,10 +1092,10 @@ public class ASTRewriteFlattener extends ASTVisitor {
else if (node instanceof SwitchStatement) {
visitList(node, SwitchStatement.STATEMENTS_PROPERTY, null);
}
-
+
this.result.append('}');
}
-
+
@Override
public boolean visit(SwitchStatement node) {
visitSwitchNode(node);
@@ -1358,7 +1358,7 @@ public class ASTRewriteFlattener extends ASTVisitor {
this.result.append(getAttribute(node, TextBlock.ESCAPED_VALUE_PROPERTY));
return false;
}
-
+
@Override
public boolean visit(TextElement node) {
this.result.append(getAttribute(node, TextElement.TEXT_PROPERTY));
@@ -1591,13 +1591,13 @@ public class ASTRewriteFlattener extends ASTVisitor {
}
return false;
}
-
+
@Override
public boolean visit(YieldStatement node) {
if (node.getAST().apiLevel() >= AST.JLS14 && node.isImplicit() && node.getExpression() == null) {
return false;
}
-
+
this.result.append("yield"); //$NON-NLS-1$
ASTNode expression = getChildNode(node, YieldStatement.EXPRESSION_PROPERTY);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
index 3fea04d6b..4bdc21c22 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
@@ -5,7 +5,7 @@
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
- *
+ *
*
* SPDX-License-Identifier: EPL-2.0
*
@@ -135,14 +135,14 @@ public final class ASTRewriteFormatter {
public ASTRewriteFormatter(NodeInfoStore placeholders, RewriteEventStore eventStore, Map options, String lineDelimiter) {
this.placeholders= placeholders;
this.eventStore= eventStore;
-
+
this.options= options == null ? JavaCore.getOptions() : (Map) new HashMap(options);
this.options.put(
DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY,
DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT));
this.lineDelimiter= lineDelimiter;
-
+
this.tabWidth= IndentManipulation.getTabWidth(options);
this.indentWidth= IndentManipulation.getIndentWidth(options);
}
@@ -607,12 +607,12 @@ public final class ASTRewriteFormatter {
public final Prefix VARARGS= new FormattingPrefix("void foo(A ... a) { }", "A ." , CodeFormatter.K_CLASS_BODY_DECLARATIONS); //$NON-NLS-1$ //$NON-NLS-2$
public final Prefix TRY_RESOURCES = new FormattingPrefix("try (A a = new A(); B b = new B()) {}", "; B" , CodeFormatter.K_STATEMENTS); //$NON-NLS-1$ //$NON-NLS-2$
public final Prefix TRY_RESOURCES_PAREN = new FormattingPrefix("try (A a = new A(); B b = new B()) {}", "y (" , CodeFormatter.K_STATEMENTS); //$NON-NLS-1$ //$NON-NLS-2$
-
+
public final BlockContext IF_BLOCK_WITH_ELSE= new BlockFormattingPrefixSuffix("if (true)", "else{}", 8); //$NON-NLS-1$ //$NON-NLS-2$
public final BlockContext IF_BLOCK_NO_ELSE= new BlockFormattingPrefix("if (true)", 8); //$NON-NLS-1$
public final BlockContext ELSE_AFTER_STATEMENT= new BlockFormattingPrefix("if (true) foo();else ", 15); //$NON-NLS-1$
public final BlockContext ELSE_AFTER_BLOCK= new BlockFormattingPrefix("if (true) {}else ", 11); //$NON-NLS-1$
-
+
public final Prefix CASE_SEPARATION= new FormattingPrefix("case A, B", "A" , CodeFormatter.K_EXPRESSION); //$NON-NLS-1$ //$NON-NLS-2$
public final BlockContext FOR_BLOCK= new BlockFormattingPrefix("for (;;) ", 7); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
index e842dd8cb..6e60bf25f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
@@ -38,13 +38,13 @@ public final class RewriteEventStore {
* If enabled, then {@link ASTRewrite} and {@link ListRewrite}
* throw an {@link IllegalArgumentException} if a rewrite operation tries to insert an
* AST node in a place where nodes of this type are not allowed (node type not a subtype of
- * the structural property's type).
+ * the structural property's type).
* </p>
* <p>
* Disabled by default, since this hasn't been enforced from the beginning, and there are clients
* (e.g. in JDT UI refactorings) that rely on a bit of leeway here.
* E.g. the qualifier of a QualifiedName cannot be a MethodInvocation expression or a SimpleType, but
- * that's sometimes the easiest solution for such a change, and ASTRewrite has no problems with it.
+ * that's sometimes the easiest solution for such a change, and ASTRewrite has no problems with it.
* </p>
*/
public static boolean DEBUG = false;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/imports/ImportGroupComparator.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/imports/ImportGroupComparator.java
index a227dbb0d..f90387555 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/imports/ImportGroupComparator.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/imports/ImportGroupComparator.java
@@ -73,7 +73,7 @@ final class ImportGroupComparator implements Comparator<ImportName>{
this.staticImportGroupByName = staticImportGroupsByName;
giro: */
final NavigableMap<String, ImportGroup> baseImportGroupByName; // OT
-
+
IndexedImportGroups(
NavigableMap<String, ImportGroup> typeImportGroupsByName,
NavigableMap<String, ImportGroup> staticImportGroupsByName,
@@ -105,7 +105,7 @@ final class ImportGroupComparator implements Comparator<ImportName>{
if (!needsTypeMatchAll && !needsStaticMatchAll) {
:giro */
boolean needsBaseMatchAll = !importOrder.contains(BASE_MATCH_ALL);
-
+
if (!needsTypeMatchAll && !needsStaticMatchAll) {
// SH}
return importOrder;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
index 30306f841..e01136b4a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
@@ -22,7 +22,7 @@ public class DOMASTUtil {
/**
* Validates if the given <code>AST</code> supports the provided <code>nodeType</code>. This API checks for node
* types supported from JLS 14 onwards and will return <code>true></code> for nodes added before JLS14.
- *
+ *
* @param ast
* the AST to be evaluated
* @param nodeType
@@ -40,7 +40,7 @@ public class DOMASTUtil {
* Validates if the given <code>apiLevel</code> and <code>previewEnabled</code> supports the provided
* <code>nodeType</code>. This API checks for node types supported from JLS 14 onwards and will return
* <code>true></code> for nodes added before JLS14.
- *
+ *
* @param apiLevel
* the level to be checked
* @param previewEnabled
@@ -88,7 +88,7 @@ public class DOMASTUtil {
public static boolean isRecordDeclarationSupported(int apiLevel, boolean previewEnabled) {
return isNodeTypeSupportedinAST(apiLevel, previewEnabled, ASTNode.RECORD_DECLARATION);
}
-
+
public static boolean isInstanceofExpressionPatternSupported(AST ast) {
return isNodeTypeSupportedinAST(ast, ASTNode.INSTANCEOF_EXPRESSION);
}
@@ -96,7 +96,7 @@ public class DOMASTUtil {
public static boolean isInstanceofExpressionPatternSupported(int apiLevel, boolean previewEnabled) {
return isNodeTypeSupportedinAST(apiLevel, previewEnabled, ASTNode.INSTANCEOF_EXPRESSION);
}
-
+
@SuppressWarnings("deprecation")
public static void checkASTLevel(int level) {
switch (level) {
@@ -113,7 +113,7 @@ public class DOMASTUtil {
return;
}
throw new IllegalArgumentException();
-
+
}
}

Back to the top