From 04ac9ac21116d3f4ecb0af7a026fd07be9f4bc99 Mon Sep 17 00:00:00 2001 From: Stephan Herrmann Date: Sat, 13 Apr 2019 14:09:15 +0200 Subject: update jdt.core to S4_12_0_M1 --- org.eclipse.jdt.core/.settings/.api_filters | 14 -- org.eclipse.jdt.core/META-INF/MANIFEST.MF | 2 +- .../jdt/core/compiler/batch/BatchCompiler.java | 5 +- .../jdt/core/compiler/CategorizedProblem.java | 2 +- .../eclipse/jdt/core/compiler/CharOperation.java | 16 +- .../org/eclipse/jdt/core/compiler/IProblem.java | 2 +- .../compiler/ast/AllocationExpression.java | 10 +- .../jdt/internal/compiler/ast/MessageSend.java | 5 +- .../internal/compiler/ast/SwitchExpression.java | 4 + .../jdt/internal/compiler/ast/SwitchStatement.java | 5 +- .../compiler/lookup/BinaryTypeBinding.java | 216 +++++++++++---------- .../internal/compiler/lookup/CaptureBinding18.java | 2 + .../compiler/lookup/CompilationUnitScope.java | 14 +- .../compiler/lookup/InferenceContext18.java | 4 +- .../compiler/lookup/InferenceSubstitution.java | 2 +- .../compiler/lookup/InferenceVariable.java | 10 +- .../compiler/lookup/LookupEnvironment.java | 18 +- .../internal/compiler/lookup/ModuleBinding.java | 10 +- .../internal/compiler/lookup/PackageBinding.java | 5 +- .../compiler/lookup/ParameterizedTypeBinding.java | 22 +-- .../compiler/lookup/ProblemPackageBinding.java | 7 +- .../internal/compiler/lookup/RawTypeBinding.java | 7 + .../jdt/internal/compiler/lookup/TypeSystem.java | 11 +- .../internal/compiler/parser/JavadocParser.java | 27 ++- .../compiler/parser/JavadocTagConstants.java | 98 ++++++++-- .../jdt/internal/compiler/parser/Parser.java | 2 +- .../internal/compiler/problem/ProblemReporter.java | 5 +- .../core/compiler/lookup/OTClassScope.java | 2 +- .../dom/org/eclipse/jdt/core/dom/AST.java | 19 +- .../dom/org/eclipse/jdt/core/dom/ASTNode.java | 5 - .../dom/org/eclipse/jdt/core/dom/ASTParser.java | 12 +- .../dom/org/eclipse/jdt/core/dom/ASTVisitor.java | 2 +- .../dom/org/eclipse/jdt/core/dom/Annotation.java | 4 +- .../org/eclipse/jdt/core/dom/ArrayCreation.java | 3 +- .../org/eclipse/jdt/core/dom/BodyDeclaration.java | 4 +- .../org/eclipse/jdt/core/dom/CharacterLiteral.java | 4 +- .../jdt/core/dom/ClassInstanceCreation.java | 6 +- .../dom/org/eclipse/jdt/core/dom/Comment.java | 6 +- .../org/eclipse/jdt/core/dom/CompilationUnit.java | 4 +- .../dom/org/eclipse/jdt/core/dom/Expression.java | 2 - .../dom/org/eclipse/jdt/core/dom/FieldAccess.java | 4 +- .../dom/org/eclipse/jdt/core/dom/IBinding.java | 4 +- .../dom/org/eclipse/jdt/core/dom/ITypeBinding.java | 3 +- .../org/eclipse/jdt/core/dom/IntersectionType.java | 4 +- .../org/eclipse/jdt/core/dom/MarkerAnnotation.java | 4 +- .../org/eclipse/jdt/core/dom/MemberValuePair.java | 4 +- .../eclipse/jdt/core/dom/ModuleDeclaration.java | 4 +- .../dom/org/eclipse/jdt/core/dom/Name.java | 4 +- .../org/eclipse/jdt/core/dom/NormalAnnotation.java | 4 +- .../jdt/core/dom/SingleMemberAnnotation.java | 4 +- .../dom/org/eclipse/jdt/core/dom/Statement.java | 7 +- .../org/eclipse/jdt/core/dom/StringLiteral.java | 4 +- .../dom/org/eclipse/jdt/core/dom/SwitchCase.java | 2 - .../org/eclipse/jdt/core/dom/SwitchExpression.java | 2 - .../org/eclipse/jdt/core/dom/SwitchStatement.java | 4 +- .../dom/org/eclipse/jdt/core/dom/TagElement.java | 33 +++- .../dom/org/eclipse/jdt/core/dom/Type.java | 7 +- .../org/eclipse/jdt/core/dom/TypeParameter.java | 4 +- .../eclipse/jdt/core/dom/VariableDeclaration.java | 4 +- .../jdt/core/dom/rewrite/ImportRewrite.java | 6 +- .../dom/rewrite/TargetSourceRangeComputer.java | 7 +- .../eclipse/jdt/core/formatter/CodeFormatter.java | 6 +- .../formatter/DefaultCodeFormatterConstants.java | 24 ++- .../model/org/eclipse/jdt/core/BindingKey.java | 8 +- .../jdt/core/ClasspathContainerInitializer.java | 9 +- .../org/eclipse/jdt/core/CompletionProposal.java | 44 +---- .../org/eclipse/jdt/core/CompletionRequestor.java | 4 +- .../model/org/eclipse/jdt/core/Flags.java | 4 +- .../org/eclipse/jdt/core/IClasspathAttribute.java | 4 +- .../org/eclipse/jdt/core/IClasspathContainer.java | 3 +- .../org/eclipse/jdt/core/IClasspathEntry.java | 6 +- .../model/org/eclipse/jdt/core/ICodeAssist.java | 3 +- .../org/eclipse/jdt/core/ICompilationUnit.java | 7 +- .../org/eclipse/jdt/core/IJavaElementDelta.java | 9 +- .../model/org/eclipse/jdt/core/IJavaProject.java | 11 +- .../org/eclipse/jdt/core/IModuleDescription.java | 20 +- .../model/org/eclipse/jdt/core/IType.java | 17 +- .../org/eclipse/jdt/core/JavaConventions.java | 6 +- .../org/eclipse/jdt/core/NamingConventions.java | 7 +- .../model/org/eclipse/jdt/core/Signature.java | 29 +-- .../model/org/eclipse/jdt/core/ToolFactory.java | 14 +- .../org/eclipse/jdt/core/WorkingCopyOwner.java | 7 +- .../jdt/core/compiler/CompilationParticipant.java | 3 +- .../jdt/core/eval/ICodeSnippetRequestor.java | 4 +- .../eclipse/jdt/core/eval/IEvaluationContext.java | 9 +- .../model/org/eclipse/jdt/core/jdom/IDOMNode.java | 3 +- .../jdt/core/util/CompilationUnitSorter.java | 92 +++++---- .../jdt/core/util/ExternalAnnotationUtil.java | 6 +- .../org/eclipse/jdt/core/util/IStackMapFrame.java | 6 +- .../eclipse/jdt/internal/core/AbstractModule.java | 23 ++- .../jdt/internal/core/JavaModelManager.java | 2 +- .../jdt/internal/core/SearchableEnvironment.java | 9 + org.eclipse.jdt.core/pom.xml | 2 +- .../jdt/core/search/IJavaSearchConstants.java | 8 +- .../eclipse/jdt/core/search/ReferenceMatch.java | 7 +- .../org/eclipse/jdt/core/search/SearchEngine.java | 32 +-- .../eclipse/jdt/core/search/SearchParticipant.java | 6 +- .../org/eclipse/jdt/core/search/SearchPattern.java | 42 ++-- .../core/search/matching/MethodLocator.java | 4 +- 99 files changed, 636 insertions(+), 581 deletions(-) (limited to 'org.eclipse.jdt.core') diff --git a/org.eclipse.jdt.core/.settings/.api_filters b/org.eclipse.jdt.core/.settings/.api_filters index a0ecc9a94..26e4f5705 100644 --- a/org.eclipse.jdt.core/.settings/.api_filters +++ b/org.eclipse.jdt.core/.settings/.api_filters @@ -1,19 +1,5 @@ - - - - - - - - - - - - - - diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF index 22514bead..9d583e561 100644 --- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true -Bundle-Version: 3.17.100.OTDT_r273_qualifier +Bundle-Version: 3.18.0.OTDT_r273_qualifier Bundle-Activator: org.eclipse.jdt.core.JavaCore Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/core/compiler/batch/BatchCompiler.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/core/compiler/batch/BatchCompiler.java index 65d20e6dc..7e4ca11bf 100644 --- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/core/compiler/batch/BatchCompiler.java +++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/core/compiler/batch/BatchCompiler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -43,7 +43,6 @@ public final class BatchCompiler { *

* The specification of the command line arguments is defined by running the batch compiler's help *

BatchCompiler.compile("-help", new PrintWriter(System.out), new PrintWriter(System.err), null);
- *

* * @param commandLine the command line arguments passed to the compiler * @param outWriter the writer used to print standard messages @@ -69,7 +68,7 @@ public final class BatchCompiler { *

* The specification of the command line arguments is defined by running the batch compiler's help *

BatchCompiler.compile("-help", new PrintWriter(System.out), new PrintWriter(System.err), null);
- *

+ *

* Note that a true returned value indicates that no errors were reported, no runtime exceptions * occurred and that the compilation was not canceled. * diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java index 881870b88..41add2dcf 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java @@ -157,7 +157,7 @@ public String[] getExtraMarkerAttributeNames() { * Returns the respective values for the extra marker attributes associated to this problem when persisted into * a marker by the JavaBuilder. Each value must correspond to a matching attribute name, as defined by * {@link #getExtraMarkerAttributeNames()}. - * The values must be eligible for marker creation, as defined by IMarker#setAttributes(String[], Object[])}. + * The values must be eligible for marker creation, as defined by IMarker#setAttributes(String[], Object[])}. * @return the values of the corresponding extra marker attributes */ public Object[] getExtraMarkerAttributeValues() { diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java index 18098cfc2..5dc15d686 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -296,8 +296,8 @@ public static final char[][] arrayConcat(char[][] first, char[][] second) { * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap', * 'HatMapper' and also 'HashMapEntry'. *

- *

- * Examples:
    + * Examples: + *
      *
    1. pattern = "NPE".toCharArray() * name = "NullPointerException".toCharArray() * result => true
    2. @@ -319,7 +319,7 @@ public static final char[][] arrayConcat(char[][] first, char[][] second) { *
    3. pattern = "HM".toCharArray() * name = "HashMapEntry".toCharArray() * result => true
    4. - *
+ * * * @param pattern the given pattern * @param name the given name @@ -366,7 +366,6 @@ public static final boolean camelCaseMatch(char[] pattern, char[] name) { * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *

- *

  * Examples:
    *
  1. pattern = "NPE".toCharArray() * name = "NullPointerException".toCharArray() @@ -389,7 +388,7 @@ public static final boolean camelCaseMatch(char[] pattern, char[] name) { *
  2. pattern = "HM".toCharArray() * name = "HashMapEntry".toCharArray() * result => (samePartCount == false)
  3. - *
+ * * * @param pattern the given pattern * @param name the given name @@ -550,7 +549,6 @@ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *

- *

  * Examples:
  * 
    *
  1. pattern = "NPE".toCharArray() @@ -603,7 +601,6 @@ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int * nameEnd = 12 * result => (samePartCount == false)
  2. *
- *
* * @param pattern the given pattern * @param patternStart the start index of the pattern, inclusive @@ -1026,7 +1023,6 @@ public static final int compareTo(char[] array1, char[] array2, int start, int e * * * - *

* * @param array the given array * @param prefix the given prefix @@ -1414,7 +1410,7 @@ public static final char[] concat( * => result = { ' a' , '/', 'b' } * * - * *
  • + * 
  •   *    first = { ' a' }
      *    second = {  }
      *    separator = '/'
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
    index 8e624ba2c..6063b96d4 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
    @@ -377,7 +377,7 @@ void setSourceStart(int sourceStart);
     	int Javadoc = 0x80000000;
     	/** @since 3.14 */
     	int ModuleRelated = 0x00800000;
    -	/** @since 3.17 */
    +	/** @since 3.18 */
     	int Compliance = 0x00400000;
     
     	/**
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
    index a3c086406..6a49c0e5c 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
    @@ -1036,10 +1036,16 @@ public InferenceContext18 freshInferenceContext(Scope scope) {
     }
     @Override
     public int nameSourceStart() {
    -	return this.type.sourceStart;
    +	if (this.enumConstant != null)
    +		return this.enumConstant.sourceStart;
    +	else
    +		return this.type.sourceStart;
     }
     @Override
     public int nameSourceEnd() {
    -	return this.type.sourceEnd;
    +	if (this.enumConstant != null)
    +		return this.enumConstant.sourceEnd;
    +	else
    +		return this.type.sourceEnd;
     }
     }
    \ No newline at end of file
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
    index 52d519eb6..d266ab8e5 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
    @@ -745,9 +745,10 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f
     		&& !this.isDecapsulation)
     // SH}
     	{
    -
    +		boolean useNesting = currentScope.enclosingSourceType().isNestmateOf(codegenBinding.declaringClass) &&
    +				!(this.receiver instanceof QualifiedSuperReference);
     		// depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy)
    -		if (!currentScope.enclosingSourceType().isNestmateOf(codegenBinding.declaringClass) &&
    +		if (!useNesting &&
     				TypeBinding.notEquals(currentScope.enclosingSourceType(), codegenBinding.declaringClass)){
     			this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, false /* not super access there */);
     			currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
    index faba6e578..1130f6925 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
    @@ -160,6 +160,10 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
     		}
     	}
     	@Override
    +	protected boolean checkNullDefaultFlow() { // JLS 12 16.1.8 
    +		return !this.switchLabeledRules;
    +	}
    +	@Override
     	public Expression[] getPolyExpressions() {
     		List polys = new ArrayList<>();
     		for (Expression e : this.resultExpressions) {
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
    index a694b0a10..eebcfca75 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
    @@ -112,6 +112,9 @@ public class SwitchStatement extends Expression {
     	protected void completeNormallyCheck(BlockScope blockScope) {
     		// do nothing
     	}
    +	protected boolean checkNullDefaultFlow() {
    +		return true;
    +	}
     	@Override
     	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
     		try {
    @@ -175,7 +178,7 @@ public class SwitchStatement extends Expression {
     				this.synthetic = sourceTypeBinding.addSyntheticMethodForSwitchEnum(resolvedTypeBinding, this);
     			}
     			// if no default case, then record it may jump over the block directly to the end
    -			if (this.defaultCase == null) {
    +			if (this.defaultCase == null && checkNullDefaultFlow()) {
     				// only retain the potential initializations
     				flowInfo.addPotentialInitializationsFrom(caseInits.mergedWith(switchContext.initsOnBreak));
     				this.mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
    index fb53daf75..9b3e8b7a7 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
    @@ -878,37 +878,40 @@ private int getNullDefaultFrom(IBinaryAnnotation[] declAnnotations) {
     
     private void createFields(IBinaryField[] iFields, IBinaryType binaryType, long sourceLevel, char[][][] missingTypeNames) {
     	if (!isPrototype()) throw new IllegalStateException();
    -	this.fields = Binding.NO_FIELDS;
    -	if (iFields != null) {
    -		int size = iFields.length;
    -		if (size > 0) {
    -			FieldBinding[] fields1 = new FieldBinding[size];
    -			boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
    -			boolean hasRestrictedAccess = hasRestrictedAccess();
    -			int firstAnnotatedFieldIndex = -1;
    -			for (int i = 0; i < size; i++) {
    -				IBinaryField binaryField = iFields[i];
    -				char[] fieldSignature = use15specifics ? binaryField.getGenericSignature() : null;
    -				ITypeAnnotationWalker walker = getTypeAnnotationWalker(binaryField.getTypeAnnotations(), getNullDefaultFrom(binaryField.getAnnotations()));
    -				if (sourceLevel >= ClassFileConstants.JDK1_8) { // below 1.8, external annotations will be attached later
    -					walker = binaryType.enrichWithExternalAnnotationsFor(walker, iFields[i], this.environment);
    -				}
    -				walker = walker.toField();
    -				TypeBinding type = fieldSignature == null
    -					? this.environment.getTypeFromSignature(binaryField.getTypeName(), 0, -1, false, this, missingTypeNames, walker)
    -					: this.environment.getTypeFromTypeSignature(new SignatureWrapper(fieldSignature), Binding.NO_TYPE_VARIABLES, this, missingTypeNames, walker);
    -				FieldBinding field =
    -					new FieldBinding(
    -						binaryField.getName(),
    -						type,
    -						binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved,
    -						this,
    -						binaryField.getConstant());
    -				boolean forceStoreAnnotations = !this.environment.globalOptions.storeAnnotations
    -						&& (this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK9
    -						&& binaryField.getAnnotations() != null
    -						&& (binaryField.getTagBits() & TagBits.AnnotationDeprecated) != 0);
    -				if (firstAnnotatedFieldIndex < 0
    +	boolean save = this.environment.mayTolerateMissingType;
    +	this.environment.mayTolerateMissingType = true;
    +	try {
    +		this.fields = Binding.NO_FIELDS;
    +		if (iFields != null) {
    +			int size = iFields.length;
    +			if (size > 0) {
    +				FieldBinding[] fields1 = new FieldBinding[size];
    +				boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
    +				boolean hasRestrictedAccess = hasRestrictedAccess();
    +				int firstAnnotatedFieldIndex = -1;
    +				for (int i = 0; i < size; i++) {
    +					IBinaryField binaryField = iFields[i];
    +					char[] fieldSignature = use15specifics ? binaryField.getGenericSignature() : null;
    +					ITypeAnnotationWalker walker = getTypeAnnotationWalker(binaryField.getTypeAnnotations(), getNullDefaultFrom(binaryField.getAnnotations()));
    +					if (sourceLevel >= ClassFileConstants.JDK1_8) { // below 1.8, external annotations will be attached later
    +						walker = binaryType.enrichWithExternalAnnotationsFor(walker, iFields[i], this.environment);
    +					}
    +					walker = walker.toField();
    +					TypeBinding type = fieldSignature == null
    +						? this.environment.getTypeFromSignature(binaryField.getTypeName(), 0, -1, false, this, missingTypeNames, walker)
    +						: this.environment.getTypeFromTypeSignature(new SignatureWrapper(fieldSignature), Binding.NO_TYPE_VARIABLES, this, missingTypeNames, walker);
    +					FieldBinding field =
    +						new FieldBinding(
    +							binaryField.getName(),
    +							type,
    +							binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved,
    +							this,
    +							binaryField.getConstant());
    +					boolean forceStoreAnnotations = !this.environment.globalOptions.storeAnnotations
    +							&& (this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK9
    +							&& binaryField.getAnnotations() != null
    +							&& (binaryField.getTagBits() & TagBits.AnnotationDeprecated) != 0);
    +					if (firstAnnotatedFieldIndex < 0
     //{ObjectTeams: read annotations within roles to enable copying:
     /* orig:
     						&& (this.environment.globalOptions.storeAnnotations || forceStoreAnnotations)
    @@ -917,37 +920,40 @@ private void createFields(IBinaryField[] iFields, IBinaryType binaryType, long s
     							|| forceStoreAnnotations
     							|| this.isRole())
     // SH}
    -						&& binaryField.getAnnotations() != null) {
    -					firstAnnotatedFieldIndex = i;
    -					if (forceStoreAnnotations)
    -						storedAnnotations(true, true); // for Java 9 @Deprecated we need to force storing annotations
    -				}
    -				field.id = i; // ordinal
    -				if (use15specifics)
    -					field.tagBits |= binaryField.getTagBits();
    -				if (hasRestrictedAccess)
    -					field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
    -				if (fieldSignature != null)
    -					field.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
    -				fields1[i] = field;
    +							&& binaryField.getAnnotations() != null) {
    +						firstAnnotatedFieldIndex = i;
    +						if (forceStoreAnnotations)
    +							storedAnnotations(true, true); // for Java 9 @Deprecated we need to force storing annotations
    +					}
    +					field.id = i; // ordinal
    +					if (use15specifics)
    +						field.tagBits |= binaryField.getTagBits();
    +					if (hasRestrictedAccess)
    +						field.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
    +					if (fieldSignature != null)
    +						field.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
    +					fields1[i] = field;
     //{ObjectTeams:
    -				// field attributes:
    -				if (binaryField instanceof FieldInfo)
    -					((FieldInfo)binaryField).evaluateOTAttributes(field);
    -				// field as value parameter?
    -				if ((field.modifiers & ExtraCompilerModifiers.AccValueParam) != 0)
    -					addValueParameter(field);
    +					// field attributes:
    +					if (binaryField instanceof FieldInfo)
    +						((FieldInfo)binaryField).evaluateOTAttributes(field);
    +					// field as value parameter?
    +					if ((field.modifiers & ExtraCompilerModifiers.AccValueParam) != 0)
    +						addValueParameter(field);
     // SH}
    -			}
    -			this.fields = fields1;
    -			// second pass for reifying annotations, since may refer to fields being constructed (147875)
    -			if (firstAnnotatedFieldIndex >= 0) {
    -				for (int i = firstAnnotatedFieldIndex; i = 0) {
    +					for (int i = firstAnnotatedFieldIndex; i = 0;) {
    -			IBinaryMethod method = iMethods[i];
    -			if ((method.getModifiers() & ClassFileConstants.AccSynthetic) != 0) {
    +	boolean save = this.environment.mayTolerateMissingType;
    +	this.environment.mayTolerateMissingType = true;
    +	try {
    +		int total = 0, initialTotal = 0, iClinit = -1;
    +		int[] toSkip = null;
    +		if (iMethods != null) {
    +			total = initialTotal = iMethods.length;
    +			boolean keepBridgeMethods = sourceLevel < ClassFileConstants.JDK1_5; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=330347
    +			for (int i = total; --i >= 0;) {
    +				IBinaryMethod method = iMethods[i];
    +				if ((method.getModifiers() & ClassFileConstants.AccSynthetic) != 0) {
     //{ObjectTeams: teams and roles don't discard synthetic for the sake of copy inheritance
    -                if (isTeam() || isRole())
    -                	continue;
    +            	    if (isTeam() || isRole())
    +                		continue;
     // SH}
    -				if (keepBridgeMethods && (method.getModifiers() & ClassFileConstants.AccBridge) != 0)
    -					continue; // want to see bridge methods as real methods
    -				// discard synthetics methods
    -				if (toSkip == null) toSkip = new int[iMethods.length];
    -				toSkip[i] = -1;
    -				total--;
    -			} else if (iClinit == -1) {
    -				char[] methodName = method.getSelector();
    -				if (methodName.length == 8 && methodName[0] == Util.C_GENERIC_START) {
    -					// discard 
    -					iClinit = i;
    +					if (keepBridgeMethods && (method.getModifiers() & ClassFileConstants.AccBridge) != 0)
    +						continue; // want to see bridge methods as real methods
    +					// discard synthetics methods
    +					if (toSkip == null) toSkip = new int[iMethods.length];
    +					toSkip[i] = -1;
     					total--;
    +				} else if (iClinit == -1) {
    +					char[] methodName = method.getSelector();
    +					if (methodName.length == 8 && methodName[0] == Util.C_GENERIC_START) {
    +						// discard 
    +						iClinit = i;
    +						total--;
    +					}
     				}
     			}
     		}
    -	}
    -	if (total == 0) {
    -		this.methods = Binding.NO_METHODS;
    -		return NO_BINARY_METHODS;
    -	}
    -
    -	boolean hasRestrictedAccess = hasRestrictedAccess();
    -	MethodBinding[] methods1 = new MethodBinding[total];
    -	if (total == initialTotal) {
    -		for (int i = 0; i < initialTotal; i++) {
    -			MethodBinding method = createMethod(iMethods[i], binaryType, sourceLevel, missingTypeNames);
    -			if (hasRestrictedAccess)
    -				method.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
    -			methods1[i] = method;
    +		if (total == 0) {
    +			this.methods = Binding.NO_METHODS;
    +			return NO_BINARY_METHODS;
     		}
    -		this.methods = methods1;
    -		return iMethods;
    -	} else {
    -		IBinaryMethod[] mappedBinaryMethods = new IBinaryMethod[total];
    -		for (int i = 0, index = 0; i < initialTotal; i++) {
    -			if (iClinit != i && (toSkip == null || toSkip[i] != -1)) {
    +
    +		boolean hasRestrictedAccess = hasRestrictedAccess();
    +		MethodBinding[] methods1 = new MethodBinding[total];
    +		if (total == initialTotal) {
    +			for (int i = 0; i < initialTotal; i++) {
     				MethodBinding method = createMethod(iMethods[i], binaryType, sourceLevel, missingTypeNames);
     				if (hasRestrictedAccess)
     					method.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
    -				mappedBinaryMethods[index] = iMethods[i];
    -				methods1[index++] = method;
    +				methods1[i] = method;
     			}
    +			this.methods = methods1;
    +			return iMethods;
    +		} else {
    +			IBinaryMethod[] mappedBinaryMethods = new IBinaryMethod[total];
    +			for (int i = 0, index = 0; i < initialTotal; i++) {
    +				if (iClinit != i && (toSkip == null || toSkip[i] != -1)) {
    +					MethodBinding method = createMethod(iMethods[i], binaryType, sourceLevel, missingTypeNames);
    +					if (hasRestrictedAccess)
    +						method.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
    +					mappedBinaryMethods[index] = iMethods[i];
    +					methods1[index++] = method;
    +				}
    +			}
    +			this.methods = methods1;
    +			return mappedBinaryMethods;
     		}
    -		this.methods = methods1;
    -		return mappedBinaryMethods;
    +	} finally {
    +		this.environment.mayTolerateMissingType = save;
     	}
     }
     //{ObjectTeams: create bindings for OTRE-generated methods:
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
    index 7bf4782a9..597111471 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding18.java
    @@ -103,6 +103,8 @@ public class CaptureBinding18 extends CaptureBinding {
     				return erasures[0];
     			return this.environment.createIntersectionType18(erasures);
     		}
    +		if (this.superclass == null)
    +			return this.environment.getType(TypeConstants.JAVA_LANG_OBJECT);
     		return super.erasure();
     	}
     
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
    index cb86d339c..1ff0bb523 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
    @@ -85,12 +85,6 @@ public class CompilationUnitScope extends Scope {
     	
     	private ImportBinding[] tempImports;	// to keep a record of resolved imports while traversing all in faultInImports()
     	
    -	/**
    -	 * Flag that should be set during annotation traversal or similar runs
    -	 * to prevent caching of failures regarding imports of yet to be generated classes.
    -	 */
    -	public boolean suppressImportErrors;
    -	
     	/**
     	 * Skips import caching if unresolved imports were
     	 * found last time.
    @@ -99,7 +93,7 @@ public class CompilationUnitScope extends Scope {
     
     	boolean connectingHierarchy;
     	private ArrayList inferredInvocations;
    -	/** Cache of interned inference variables. Access only via {@link InferenceVariable#get(TypeBinding, int, InvocationSite, Scope, ReferenceBinding)}. */
    +	/** Cache of interned inference variables. Access only via {@link InferenceVariable#get(TypeBinding, int, InvocationSite, Scope, ReferenceBinding, boolean)}. */
     	Map uniqueInferenceVariables = new HashMap<>();
     //{ObjectTeams: when used as a baseimport scope, remember the original scope during this current lookup
     	public Scope originalScope;
    @@ -628,7 +622,7 @@ void faultInImports() {
     		return; // faultInImports already in progress
     	boolean unresolvedFound = false;
     	// should report unresolved only if we are not suppressing caching of failed resolutions
    -	boolean reportUnresolved = !this.suppressImportErrors;
    +	boolean reportUnresolved = !this.environment.suppressImportErrors;
     
     	if (this.typeOrPackageCache != null && !this.skipCachingImports)
     		return; // can be called when a field constant is resolved before static imports
    @@ -792,7 +786,7 @@ void faultInImports() {
     		if (!binding.onDemand && binding.resolvedImport instanceof ReferenceBinding || binding instanceof ImportConflictBinding)
     			this.typeOrPackageCache.put(binding.compoundName[binding.compoundName.length - 1], binding);
     	}
    -	this.skipCachingImports = this.suppressImportErrors && unresolvedFound;
    +	this.skipCachingImports = this.environment.suppressImportErrors && unresolvedFound;
     }
     public void faultInTypes() {
     	faultInImports();
    @@ -859,7 +853,7 @@ private Binding findImport(char[][] compoundName, int length, boolean allowDecap
     			packageBinding = (PackageBinding) binding;
     		}
     		if (packageBinding.isValidBinding() && !module.canAccess(packageBinding))
    -			return new ProblemPackageBinding(compoundName, ProblemReasons.NotAccessible);
    +			return new ProblemPackageBinding(compoundName, ProblemReasons.NotAccessible, this.environment);
     		return packageBinding;
     	}
     
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
    index a80528e34..90052785b 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java
    @@ -313,7 +313,7 @@ public class InferenceContext18 {
     		}
     		InferenceVariable[] newVariables = new InferenceVariable[len];
     		for (int i = 0; i < len; i++)
    -			newVariables[i] = InferenceVariable.get(typeVariables[i], i, this.currentInvocation, this.scope, this.object);
    +			newVariables[i] = InferenceVariable.get(typeVariables[i], i, this.currentInvocation, this.scope, this.object, true);
     		addInferenceVariables(newVariables);
     		return newVariables;
     	}
    @@ -341,7 +341,7 @@ public class InferenceContext18 {
     				newVariables[i] = (InferenceVariable) typeVariables[i]; // prevent double substitution of an already-substituted inferenceVariable
     			else
     				toAdd[numToAdd++] =
    -					newVariables[i] = InferenceVariable.get(typeVariables[i], i, this.currentInvocation, this.scope, this.object);
    +					newVariables[i] = InferenceVariable.get(typeVariables[i], i, this.currentInvocation, this.scope, this.object, false);
     		}
     		if (numToAdd > 0) {
     			int start = 0;
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
    index 1b2354557..dbf2ff903 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceSubstitution.java
    @@ -83,7 +83,7 @@ public class InferenceSubstitution extends Scope.Substitutor implements Substitu
     	public TypeBinding substitute(Substitution substitution, TypeBinding originalType) {
     		for (int i = 0; i < this.variables.length; i++) {
     			InferenceVariable variable = this.variables[i];
    -			if (isInSites(variable.site) && isSameParameter(getP(i), originalType)) {
    +			if (variable.isFromInitialSubstitution && isInSites(variable.site) && isSameParameter(getP(i), originalType)) {
     				if (this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled && originalType.hasNullTypeAnnotations())
     					return this.environment.createAnnotatedType(variable.withoutToplevelNullAnnotation(), originalType.getTypeAnnotations());
     				return variable;
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
    index 4511ae9ee..dc7585669 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceVariable.java
    @@ -65,7 +65,7 @@ public class InferenceVariable extends TypeVariableBinding {
     	 * Create or retrieve the inference variable representing the given typeParameter.
     	 * Inference variables are interned to avoid duplication due to lambda copying.
     	 */
    -	public static InferenceVariable get(TypeBinding typeParameter, int rank, InvocationSite site, Scope scope, ReferenceBinding object) {
    +	public static InferenceVariable get(TypeBinding typeParameter, int rank, InvocationSite site, Scope scope, ReferenceBinding object, boolean initial) {
     		Map uniqueInferenceVariables = scope.compilationUnitScope().uniqueInferenceVariables;
     		InferenceVariable var = null;
     		InferenceVarKey key = null;
    @@ -75,7 +75,7 @@ public class InferenceVariable extends TypeVariableBinding {
     		}
     		if (var == null) {
     			int newVarId = uniqueInferenceVariables.size();
    -			var = new InferenceVariable(typeParameter, rank, newVarId, site, scope.environment(), object);
    +			var = new InferenceVariable(typeParameter, rank, newVarId, site, scope.environment(), object, initial);
     			if (key != null)
     				uniqueInferenceVariables.put(key, var);
     		}
    @@ -88,10 +88,13 @@ public class InferenceVariable extends TypeVariableBinding {
     	long nullHints; // one of TagBits.{AnnotationNonNull,AnnotationNullable} may steer inference into inferring nullness as well; set both bits to request avoidance.
     	private InferenceVariable prototype;
     	int varId; // this is used for constructing a source name like T#0.
    +	public boolean isFromInitialSubstitution; 	// further ivars created during 18.5.2 (for capture bounds) set this to false 
    +												// to mark that they don't participate in any theta substitution
     	
    -	private InferenceVariable(TypeBinding typeParameter, int parameterRank, int iVarId, InvocationSite site, LookupEnvironment environment, ReferenceBinding object) {
    +	private InferenceVariable(TypeBinding typeParameter, int parameterRank, int iVarId, InvocationSite site, LookupEnvironment environment, ReferenceBinding object, boolean initial) {
     		this(typeParameter, parameterRank, site, makeName(typeParameter, iVarId), environment, object);
     		this.varId = iVarId;
    +		this.isFromInitialSubstitution = initial;
     	}
     	private static char[] makeName(TypeBinding typeParameter, int iVarId) {
     		if (typeParameter.getClass() == TypeVariableBinding.class) {
    @@ -126,6 +129,7 @@ public class InferenceVariable extends TypeVariableBinding {
     		clone.tagBits = this.tagBits;
     		clone.nullHints = this.nullHints;
     		clone.varId = this.varId;
    +		clone.isFromInitialSubstitution = this.isFromInitialSubstitution;
     		clone.prototype = this;
     		return clone;
     	}
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
    index 6c8c01b53..b107b44a6 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
    @@ -188,6 +188,12 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {
     	/** Global access to the outermost active inference context as the universe for inference variable interning. */
     	InferenceContext18 currentInferenceContext;
     
    +	/**
    +	 * Flag that should be set during annotation traversal or similar runs
    +	 * to prevent caching of failures regarding imports of yet to be generated classes.
    +	 */
    +	public boolean suppressImportErrors;			// per module
    +
     	final static int BUILD_FIELDS_AND_METHODS = 4;
     	final static int BUILD_TYPE_HIERARCHY = 1;
     	final static int CHECK_AND_SET_IMPORTS = 2;
    @@ -196,7 +202,7 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {
     	final static int ROLES_LINKED = 5;
     // SH}
     
    -	static final ProblemPackageBinding TheNotFoundPackage = new ProblemPackageBinding(CharOperation.NO_CHAR, NotFound);
    +	static final ProblemPackageBinding TheNotFoundPackage = new ProblemPackageBinding(CharOperation.NO_CHAR, NotFound, null/*not perfect*/);
     	static final ProblemReferenceBinding TheNotFoundType = new ProblemReferenceBinding(CharOperation.NO_CHAR_CHAR, null, NotFound);
     	static final ModuleBinding TheNotFoundModule = new ModuleBinding(CharOperation.NO_CHAR);
     
    @@ -766,12 +772,13 @@ void internalCompleteTypeBindings(CompilationUnitDeclaration parsedUnit, int req
     // SH}
     	if (parsedUnit.scope == null) return; // parsing errors were too severe
     	LookupEnvironment rootEnv = this.root;
    +	CompilationUnitDeclaration previousUnitBeingCompleted = rootEnv.unitBeingCompleted;
     	(rootEnv.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
     	parsedUnit.scope.connectTypeHierarchy();
     	parsedUnit.scope.checkParameterizedTypes();
     	if (buildFieldsAndMethods)
     		parsedUnit.scope.buildFieldsAndMethods();
    -	rootEnv.unitBeingCompleted = null;
    +	rootEnv.unitBeingCompleted = previousUnitBeingCompleted;
     }
     
     /*
    @@ -2199,6 +2206,9 @@ TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean i
     }
     
     private TypeBinding annotateType(TypeBinding binding, ITypeAnnotationWalker walker, char[][][] missingTypeNames) {
    +	if (walker == ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
    +		return binding;
    +	}
     	int depth = binding.depth() + 1;
     	if (depth > 1) {
     		// need to count non-static nesting levels, resolved binding required for precision
    @@ -2307,13 +2317,13 @@ public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariab
     
     	// type must be a ReferenceBinding at this point, cannot be a BaseTypeBinding or ArrayTypeBinding
     	ReferenceBinding actualType = (ReferenceBinding) type;
    -	if (actualType instanceof UnresolvedReferenceBinding)
    +	if (walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER && actualType instanceof UnresolvedReferenceBinding)
     		if (actualType.depth() > 0)
     			actualType = (ReferenceBinding) BinaryTypeBinding.resolveType(actualType, this, false /* no raw conversion */); // must resolve member types before asking for enclosingType
     	ReferenceBinding actualEnclosing = actualType.enclosingType();
     
     	ITypeAnnotationWalker savedWalker = walker;
    -	if(actualType.depth() > 0) {
    +	if(walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER && actualType.depth() > 0) {
     		int nonStaticNestingLevels = countNonStaticNestingLevels(actualType);
     		for (int i = 0; i < nonStaticNestingLevels; i++) {
     			walker = walker.toNextNestedType();
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
    index d972ad3db..953bcebc3 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
    @@ -101,6 +101,10 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
     			return ANY;
     		}
     		@Override
    +		public char[] nameForCUCheck() {
    +			return UNNAMED;
    +		}
    +		@Override
     		public char[] readableName() {
     			return UNNAMED_READABLE_NAME;
     		}
    @@ -621,7 +625,11 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
     					&& !packageMayBeIncomplete  // don't remember package that may still lack some siblings
     					&& !(parent instanceof SplitPackageBinding)) // don't store problem into SPB, because from different focus things may look differently
     			{
    -				parent.knownPackages.put(name, binding == null ? LookupEnvironment.TheNotFoundPackage : binding);
    +				if (binding == null) {
    +					parent.addNotFoundPackage(name);
    +				} else {
    +					parent.knownPackages.put(name, binding);
    +				}
     			}
     			return null;
     		}
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
    index 0d3e00164..9d8420def 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
    @@ -85,11 +85,14 @@ public PackageBinding(LookupEnvironment environment) {
     	this(CharOperation.NO_CHAR_CHAR, null, environment, environment.module);
     }
     protected void addNotFoundPackage(char[] simpleName) {
    -	this.knownPackages.put(simpleName, LookupEnvironment.TheNotFoundPackage);
    +	if (!this.environment.suppressImportErrors)
    +		this.knownPackages.put(simpleName, LookupEnvironment.TheNotFoundPackage);
     }
     //{ObjectTeams: ROFI changed visibility, was private
     void addNotFoundType(char[] simpleName) {
     // SH}
    +	if (this.environment.suppressImportErrors)
    +		return;
     	if (this.knownTypes == null)
     		this.knownTypes = new HashtableOfType(25);
     	this.knownTypes.put(simpleName, LookupEnvironment.TheNotFoundType);
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
    index 415ef3ada..846167c49 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
    @@ -101,7 +101,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
     	public ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments,  ITeamAnchor teamAnchor, ReferenceBinding enclosingType, LookupEnvironment environment){
     // orig:		
     		this.environment = environment;
    -		this.enclosingType = enclosingType; // never unresolved, never lazy per construction
    +		this.enclosingType = enclosingType; // never unresolved, but if type is an unresolved nested type, enclosingType is null here but set later in swapUnresolved.
     		if (!type.hasEnclosingInstanceContext() && arguments == null && !(this instanceof RawTypeBinding))
     // :giro
     		  if (teamAnchor == null)
    @@ -493,6 +493,9 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
     	 */
     	@Override
     	public ReferenceBinding enclosingType() {
    +		if (this.type instanceof UnresolvedReferenceBinding && ((UnresolvedReferenceBinding) this.type).depth() > 0) {
    +			((UnresolvedReferenceBinding) this.type).resolve(this.environment, false); // may set enclosingType as side effect
    +		}
     	    return this.enclosingType;
     	}
     
    @@ -835,21 +838,6 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
     		return ReferenceBinding.binarySearch(fieldName, this.fields);
     	}
     	 
    - 	/**
    -	 * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#getMemberType(char[])
    -	 */
    -	@Override
    -	public ReferenceBinding getMemberType(char[] typeName) {
    -		memberTypes(); // ensure memberTypes have been initialized... must create all at once unlike methods
    -		int typeLength = typeName.length;
    -		for (int i = this.memberTypes.length; --i >= 0;) {
    -			ReferenceBinding memberType = this.memberTypes[i];
    -			if (memberType.sourceName.length == typeLength && CharOperation.equals(memberType.sourceName, typeName))
    -				return memberType;
    -		}
    -		return null;
    -	}
    -
     	/**
     	 * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#getMethods(char[])
     	 */
    @@ -1646,7 +1634,7 @@ public class ParameterizedTypeBinding extends ReferenceBinding implements Substi
     			update = true;
     			ReferenceBinding enclosing = resolvedType.enclosingType();
     			if (enclosing != null) {
    -				this.enclosingType = (ReferenceBinding) env.convertUnresolvedBinaryToRawType(enclosing); // needed when binding unresolved member type
    +				this.enclosingType = resolvedType.isStatic() ? enclosing : (ReferenceBinding) env.convertUnresolvedBinaryToRawType(enclosing); // needed when binding unresolved member type
     			}
     		}
     		if (this.arguments != null) {
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemPackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemPackageBinding.java
    index 24053bebb..b6e6feb83 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemPackageBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemPackageBinding.java
    @@ -18,15 +18,16 @@ public class ProblemPackageBinding extends PackageBinding {
     	private int problemId;
     // NOTE: must only answer the subset of the name related to the problem
     
    -ProblemPackageBinding(char[][] compoundName, int problemId) {
    +ProblemPackageBinding(char[][] compoundName, int problemId, LookupEnvironment environment) {
     	this.compoundName = compoundName;
     	this.problemId = problemId;
    +	this.environment = environment;
     }
     //{ObjectTeams: accessible for OTClassScope:
     public
     // SH}
    -ProblemPackageBinding(char[] name, int problemId) {
    -	this(new char[][] {name}, problemId);
    +ProblemPackageBinding(char[] name, int problemId, LookupEnvironment environment) {
    +	this(new char[][] {name}, problemId, environment);
     }
     /* API
     * Answer the problem id associated with the receiver.
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
    index a46e22919..f06959247 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
    @@ -333,4 +333,11 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
     	public ReferenceBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) {
     		return this;
     	}
    +	
    +	@Override
    +	public ReferenceBinding enclosingType() {
    +		// ParameterizedTypeBinding earlier always had a resolved enclosed type, but now it does on-demand resolving.
    +		// Behaviour for RawTypeBinding should be unchanged. 
    +	    return this.enclosingType;
    +	}
     }
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
    index afd43cb86..abb522b2c 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
    @@ -112,7 +112,7 @@ public class TypeSystem {
     					this.type = resolvedType; // cannot be raw since being parameterized below
     					ReferenceBinding enclosing = resolvedType.enclosingType();
     					if (enclosing != null) {
    -						this.enclosingType = (ReferenceBinding) env.convertUnresolvedBinaryToRawType(enclosing); // needed when binding unresolved member type
    +						this.enclosingType = resolvedType.isStatic() ? enclosing : (ReferenceBinding) env.convertUnresolvedBinaryToRawType(enclosing); // needed when binding unresolved member type
     					}
     				}
     				if (this.arguments != null) {
    @@ -146,7 +146,7 @@ public class TypeSystem {
     			@Override
     			public int hashCode() {
     				final int prime=31;
    -				int hashCode = 1 + hash(this.type) + (this.enclosingType != null ? hash(this.enclosingType) : 0);
    +				int hashCode = 1 + hash(this.type);
     				for (int i = 0, length = this.arguments == null ? 0 : this.arguments.length; i < length; i++) {
     					hashCode = hashCode * prime + hash(this.arguments[i]);
     				}
    @@ -197,7 +197,7 @@ public class TypeSystem {
     				if (parameterizedType.actualType() != genericTypeToMatch) { //$IDENTITY-COMPARISON$
     					continue;
     				}
    -				if (parameterizedType.enclosingType() != enclosingTypeToMatch //$IDENTITY-COMPARISON$
    +				if (parameterizedType.enclosingType != enclosingTypeToMatch //$IDENTITY-COMPARISON$
     						|| !Util.effectivelyEqual(parameterizedType.typeArguments(), typeArgumentsToMatch)) 
     					continue;
     				if (Util.effectivelyEqual(annotations, parameterizedType.getTypeAnnotations()))
    @@ -372,6 +372,11 @@ public class TypeSystem {
     // SH}
     
     		ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
    +		// getUnannotatedType may have replaced URB by resolvedType
    +		if (enclosingType == null && genericType instanceof UnresolvedReferenceBinding
    +				&& !(unannotatedGenericType instanceof UnresolvedReferenceBinding)) {
    +			enclosingType = unannotatedGenericType.enclosingType();
    +		}
     		int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length;
     		TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength];
     		for (int i = 0; i < typeArgumentsLength; i++) {
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
    index f46424103..793a33ecc 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
    @@ -524,6 +524,9 @@ public class JavadocParser extends AbstractCommentParser {
     				if (length == TAG_AUTHOR_LENGTH && CharOperation.equals(TAG_AUTHOR, tagName, 0, length)) {
     					this.tagValue = TAG_AUTHOR_VALUE;
     					this.tagWaitingForDescription = this.tagValue;
    +				}else if (length == TAG_API_NOTE_LENGTH && CharOperation.equals(TAG_API_NOTE, tagName, 0, length)) {
    +					this.tagValue = TAG_API_NOTE_VALUE;
    +					this.tagWaitingForDescription = this.tagValue;
     				}
     				break;
     			case 'c':
    @@ -558,8 +561,18 @@ public class JavadocParser extends AbstractCommentParser {
     					}
     				}
     				break;
    +			case 'h':
    +				if (length == TAG_HIDDEN_LENGTH && CharOperation.equals(TAG_HIDDEN, tagName, 0, length)) {
    +					valid = true;
    +					this.tagValue = TAG_HIDDEN_VALUE;
    +				}
    +				break;
     			case 'i':
    -				if (length == TAG_INHERITDOC_LENGTH && CharOperation.equals(TAG_INHERITDOC, tagName, 0, length)) {
    +				if (length == TAG_INDEX_LENGTH && CharOperation.equals(TAG_INDEX, tagName, 0, length)) {
    +					valid = true;
    +					this.tagValue = TAG_INDEX_VALUE;
    +					this.tagWaitingForDescription = this.tagValue;
    +				} else if (length == TAG_INHERITDOC_LENGTH && CharOperation.equals(TAG_INHERITDOC, tagName, 0, length)) {
     					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=247037, @inheritDoc usage is illegal
     					// outside of few block tags and the main description.
     					switch (this.lastBlockTagValue) {
    @@ -585,6 +598,12 @@ public class JavadocParser extends AbstractCommentParser {
     							}
     					}
     					this.tagValue = TAG_INHERITDOC_VALUE;
    +				} else if (length == TAG_IMPL_SPEC_LENGTH && CharOperation.equals(TAG_IMPL_SPEC, tagName, 0, length)) {
    +					this.tagValue = TAG_IMPL_SPEC_VALUE;
    +					this.tagWaitingForDescription = this.tagValue;
    +				} else if (length == TAG_IMPL_NOTE_LENGTH && CharOperation.equals(TAG_IMPL_NOTE, tagName, 0, length)) {
    +					this.tagValue = TAG_IMPL_NOTE_VALUE;
    +					this.tagWaitingForDescription = this.tagValue;
     				}
     				break;
     			case 'l':
    @@ -609,8 +628,7 @@ public class JavadocParser extends AbstractCommentParser {
     					if (!this.inlineTagStarted) {
     						valid = parseParam();
     					}
    -				}
    -				if (length == TAG_PROVIDES_LENGTH && CharOperation.equals(TAG_PROVIDES, tagName, 0, length)) {
    +				} else if (length == TAG_PROVIDES_LENGTH && CharOperation.equals(TAG_PROVIDES, tagName, 0, length)) {
     					this.tagValue = TAG_PROVIDES_VALUE;
     					this.tagWaitingForDescription = this.tagValue;
     				}
    @@ -660,6 +678,9 @@ public class JavadocParser extends AbstractCommentParser {
     				} else if (length == TAG_SYSTEM_PROPERTY_LENGTH && CharOperation.equals(TAG_SYSTEM_PROPERTY, tagName, 0, length)) {
     					this.tagValue = TAG_SYSTEM_PROPERTY_VALUE;
     					this.tagWaitingForDescription = this.tagValue;
    +				} else if (length == TAG_SUMMARY_LENGTH && CharOperation.equals(TAG_SUMMARY, tagName, 0, length)) {
    +					this.tagValue = TAG_SUMMARY_VALUE;
    +					this.tagWaitingForDescription = this.tagValue;
     				}
     				break;
     			case 't':
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
    index 63dbfa580..b6373fb87 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
    @@ -48,6 +48,12 @@ public interface JavadocTagConstants {
     	public static final char[] TAG_SYSTEM_PROPERTY = "systemProperty".toCharArray(); //$NON-NLS-1$
     	public static final char[] TAG_USES = "uses".toCharArray(); //$NON-NLS-1$
     	public static final char[] TAG_PROVIDES = "provides".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_HIDDEN = "hidden".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_INDEX = "index".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_SUMMARY = "summary".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_API_NOTE = "apiNote".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_IMPL_SPEC = "implSpec".toCharArray(); //$NON-NLS-1$
    +	public static final char[] TAG_IMPL_NOTE = "implNote".toCharArray(); //$NON-NLS-1$
     
     	// tags lengthes
     	public static final int TAG_DEPRECATED_LENGTH = TAG_DEPRECATED.length;
    @@ -73,6 +79,12 @@ public interface JavadocTagConstants {
     	public static final int TAG_SYSTEM_PROPERTY_LENGTH = TAG_SYSTEM_PROPERTY.length;
     	public static final int TAG_USES_LENGTH = TAG_USES.length;
     	public static final int TAG_PROVIDES_LENGTH = TAG_PROVIDES.length;
    +	public static final int TAG_HIDDEN_LENGTH = TAG_HIDDEN.length;
    +	public static final int TAG_INDEX_LENGTH = TAG_INDEX.length;
    +	public static final int TAG_SUMMARY_LENGTH = TAG_SUMMARY.length;
    +	public static final int TAG_API_NOTE_LENGTH = TAG_API_NOTE.length;
    +	public static final int TAG_IMPL_SPEC_LENGTH = TAG_IMPL_SPEC.length;
    +	public static final int TAG_IMPL_NOTE_LENGTH = TAG_IMPL_NOTE.length;
     
     	// tags value
     	public static final int NO_TAG_VALUE = 0;
    @@ -99,12 +111,18 @@ public interface JavadocTagConstants {
     	public static final int TAG_SYSTEM_PROPERTY_VALUE=21;
     	public static final int TAG_USES_VALUE=21;
     	public static final int TAG_PROVIDES_VALUE=22;
    +	public static final int TAG_HIDDEN_VALUE = 23;
    +	public static final int TAG_INDEX_VALUE = 24;
    +	public static final int TAG_SUMMARY_VALUE = 25;
    +	public static final int TAG_API_NOTE_VALUE = 26;
    +	public static final int TAG_IMPL_SPEC_VALUE = 27;
    +	public static final int TAG_IMPL_NOTE_VALUE = 28;
     	public static final int TAG_OTHERS_VALUE = 100;
     	
     //{ObjectTeams: role tag
     	public static final char[] TAG_ROLE = "role".toCharArray(); //$NON-NLS-1$
     	public static final int TAG_ROLE_LENGTH = TAG_ROLE.length;
    -	public static final int TAG_ROLE_VALUE = 23;
    +	public static final int TAG_ROLE_VALUE = 30;
     // SH}
     
     	// Tag names array
    @@ -130,11 +148,17 @@ public interface JavadocTagConstants {
     		TAG_CODE,					/* 18 */
     		TAG_LITERAL,				/* 19 */
     		TAG_DOC_ROOT,			/* 20 */
    -		TAG_SYSTEM_PROPERTY     /* 21 */
    +		TAG_SYSTEM_PROPERTY,    /* 21 */
    +		TAG_USES,				/* 22 */
    +		TAG_PROVIDES,			/* 23 */
    +		TAG_HIDDEN,				/* 24 */
    +		TAG_INDEX,				/* 25 */
    +		TAG_SUMMARY,			/* 26 */
    +		TAG_API_NOTE,			/* 27 */
    +		TAG_IMPL_SPEC,			/* 28 */
    +		TAG_IMPL_NOTE,			/* 29 */
     //{ObjectTeams: role tag:
    -		,TAG_USES,				/* 22 */ // omission in JDT?
    -		TAG_PROVIDES,			/* 23 */ // omission in JDT?
    -		TAG_ROLE, 				/* 24 */
    +		TAG_ROLE, 				/* 30 */
     // SH}
     	};
     
    @@ -185,9 +209,9 @@ public interface JavadocTagConstants {
     		// since 1.7
     		{},
     		// since 1.8
    -		{},
    +		{TAG_API_NOTE, TAG_IMPL_SPEC, TAG_IMPL_NOTE},
     		// since 9
    -		{TAG_USES, TAG_PROVIDES},
    +		{ TAG_HIDDEN, TAG_USES, TAG_PROVIDES },
     		// since 10
     		{},
     		// since 11
    @@ -215,9 +239,9 @@ public interface JavadocTagConstants {
     		// since 1.8
     		{},
     		// since 9
    -		{},
    +		{ TAG_INDEX },
     		// since 10
    -		{},
    +		{ TAG_SUMMARY },
     		// since 11
     		{},
     		//since 12
    @@ -252,12 +276,17 @@ public interface JavadocTagConstants {
     		TAG_TYPE_INLINE,	// TAG_CODE_VALUE = 18;
     		TAG_TYPE_INLINE,	// TAG_LITERAL_VALUE = 19;
     		TAG_TYPE_INLINE,	// TAG_DOC_ROOT_VALUE = 20;
    -		TAG_TYPE_INLINE	    // TAG_DOC_ROOT_VALUE = 21
    +		TAG_TYPE_INLINE,    // TAG_DOC_ROOT_VALUE = 21
    +		TAG_TYPE_BLOCK,		// TAG_HIDDEN_VALUE = 22;
    +		TAG_TYPE_BLOCK,		// TAG_PROVIDES_VALUE = 23;
    +		TAG_TYPE_BLOCK,		// TAG_USES_VALUE = 24;
    +		TAG_TYPE_INLINE,	// TAG_INDEX_VALUE = 25;
    +		TAG_TYPE_INLINE,	// TAG_SUMMARY_VALUE = 26;
    +		TAG_TYPE_BLOCK,		// TAG_API_NOTE = 27;
    +		TAG_TYPE_BLOCK,		// TAG_IMPL_SPEC = 28;
    +		TAG_TYPE_BLOCK,		// TAG_IMPL_NOTE = 29;
     //{ObjectTeams: @role tag
    -		,
    -		TAG_TYPE_BLOCK,		// TAG_USES_VALUE = 22;		// omission in JDT
    -		TAG_TYPE_BLOCK,		// TAG_PROVIDES_VALUE = 23;	// omission in JDT
    -		TAG_TYPE_BLOCK,		// TAG_ROLE_VALUE = 24;
    +		TAG_TYPE_BLOCK,		// TAG_ROLE_VALUE = 30;
     // SH}
     	};
     	/*
    @@ -274,7 +303,13 @@ public interface JavadocTagConstants {
     		TAG_LINKPLAIN,
     		TAG_DOC_ROOT,
     		TAG_VALUE,
    -		TAG_SYSTEM_PROPERTY
    +		TAG_SYSTEM_PROPERTY,
    +		TAG_HIDDEN,
    +		TAG_INDEX,
    +		TAG_SUMMARY,
    +		TAG_API_NOTE,
    +		TAG_IMPL_SPEC,
    +		TAG_IMPL_NOTE,
     	};
     	public static final char[][] COMPILATION_UNIT_TAGS = {};
     	public static final char[][] CLASS_TAGS = {
    @@ -292,9 +327,14 @@ public interface JavadocTagConstants {
     		TAG_VALUE,
     		TAG_CODE,
     		TAG_LITERAL,
    -		TAG_SYSTEM_PROPERTY
    +		TAG_SYSTEM_PROPERTY,
    +		TAG_HIDDEN,
    +		TAG_INDEX,
    +		TAG_SUMMARY,
    +		TAG_API_NOTE,
    +		TAG_IMPL_SPEC,
    +		TAG_IMPL_NOTE,
     //{ObjectTeams: role tag:
    -		,
     		TAG_ROLE,
     // SH}
     	};
    @@ -311,7 +351,13 @@ public interface JavadocTagConstants {
     		TAG_VALUE,
     		TAG_CODE,
     		TAG_LITERAL,
    -		TAG_SYSTEM_PROPERTY
    +		TAG_SYSTEM_PROPERTY,
    +		TAG_INDEX,
    +		TAG_HIDDEN,
    +		TAG_SUMMARY,
    +		TAG_API_NOTE, 
    +		TAG_IMPL_SPEC, 
    +		TAG_IMPL_NOTE,
     	};
     	public static final char[][] METHOD_TAGS = {
     		TAG_SEE,
    @@ -330,7 +376,13 @@ public interface JavadocTagConstants {
     		TAG_VALUE,
     		TAG_CODE,
     		TAG_LITERAL,
    -		TAG_SYSTEM_PROPERTY
    +		TAG_SYSTEM_PROPERTY,
    +		TAG_HIDDEN,
    +		TAG_INDEX,
    +		TAG_SUMMARY,
    +		TAG_API_NOTE,
    +		TAG_IMPL_SPEC,
    +		TAG_IMPL_NOTE,
     	};
     	public static final char[][] MODULE_TAGS = {
     			TAG_SEE,
    @@ -347,6 +399,12 @@ public interface JavadocTagConstants {
     			TAG_CODE,
     			TAG_LITERAL,
     			TAG_USES,
    -			TAG_PROVIDES
    +			TAG_PROVIDES,
    +			TAG_HIDDEN,
    +			TAG_INDEX,
    +			TAG_SUMMARY,
    +			TAG_API_NOTE,
    +			TAG_IMPL_SPEC,
    +			TAG_IMPL_NOTE,
     		};
     }
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
    index b420fd29c..f282e999a 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
    @@ -7415,7 +7415,7 @@ protected void consumePackageDeclaration() {
     	// flush comments defined prior to import statements
     	impt.declarationEnd = this.endStatementPosition;
     	impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
    -	if (this.firstToken == TerminalTokens.TokenNameQUESTION)
    +	if (this.firstToken == TokenNameQUESTION)
     		this.unstackedAct = ACCEPT_ACTION; // force termination at goal
     }
     protected void consumePackageDeclarationName() {
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
    index af414b624..20df21071 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
    @@ -2002,10 +2002,7 @@ public void deprecatedMethod(final MethodBinding method, ASTNode location) {
     			// omit the new keyword from the warning marker
     			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
     			AllocationExpression allocationExpression = (AllocationExpression) location;
    -			if (allocationExpression.enumConstant != null) {
    -				start = allocationExpression.enumConstant.sourceStart;
    -			}
    -			start = allocationExpression.type.sourceStart;
    +			start = allocationExpression.nameSourceStart();
     		}
     	} else {
     		if (location instanceof MessageSend) {
    diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/OTClassScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/OTClassScope.java
    index 8ea4157e7..dd567da21 100644
    --- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/OTClassScope.java
    +++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/OTClassScope.java
    @@ -159,7 +159,7 @@ public class OTClassScope extends ClassScope {
     				{
     					switch (foundInParent.kind()) {
     					case Binding.PACKAGE:
    -						return new ProblemPackageBinding(compoundName, ProblemReasons.Ambiguous);
    +						return new ProblemPackageBinding(compoundName, ProblemReasons.Ambiguous, environment());
     					case Binding.TYPE:
     						return problemTypeBinding(compoundName, (TypeBinding)foundInParent, ProblemReasons.Ambiguous);
     					}
    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 897beadf2..4acd3f99e 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
    @@ -73,6 +73,7 @@ import org.eclipse.text.edits.TextEdit;
      * Compilation units created by ASTParser from a
      * source document can be serialized after arbitrary modifications
      * with minimal loss of original formatting. Here is an example:
    + * 

    *
      * Document doc = new Document("import java.util.List;\nclass X {}\n");
      * ASTParser parser = ASTParser.newParser(AST.JLS3);
    @@ -86,6 +87,7 @@ import org.eclipse.text.edits.TextEdit;
      * TextEdit edits = cu.rewrite(document, null);
      * UndoEdit undo = edits.apply(document);
      * 
    + *

    * See also {@link org.eclipse.jdt.core.dom.rewrite.ASTRewrite} for * an alternative way to describe and serialize changes to a * read-only AST. @@ -911,6 +913,7 @@ public final class AST { * "1.7" means the source code is as per JDK 1.7; * additional legal values may be added later.

  • * + *

    * Options other than the above are ignored. *

    * @@ -1127,9 +1130,10 @@ public final class AST { *
  • removing a child from a node owned by this AST,
  • *
  • setting a non-node attribute of a node owned by this AST.
  • * - *

    + *

    * Operations which do not entail creating or modifying existing nodes * do not increase the modification count. + *

    *

    * N.B. This method may be called several times in the course * of a single client operation. The only promise is that the modification @@ -1154,7 +1158,6 @@ public final class AST { *

  • removing a child from a node owned by this AST
  • *
  • setting a non-node attribute of a node owned by this AST
  • . * - *

    *

    * N.B. This method may be called several times in the course * of a single client operation. @@ -1273,8 +1276,8 @@ public final class AST { * array initializer. *

    * Examples: - * *

    +	 * 
     	 * // new String[len]
     	 * ArrayCreation ac1 = ast.newArrayCreation();
     	 * ac1.setType(
    @@ -1299,9 +1302,8 @@ public final class AST {
     	 * ac3.setInitializer(ai);
     	 * ai.expressions().add(ast.newNumberLiteral("1"));
     	 * ai.expressions().add(ast.newNumberLiteral("2"));
    -	 * 
    * - *

    + *
    * * @return a new unparented array creation expression node */ @@ -1327,6 +1329,7 @@ public final class AST { * By default, the array type has one non-annotated dimension. *

    * For JLS4 and before, the given component type may be another array type. + *

    * * @param elementType element type for API level JLS8 and later, or the * component type (possibly another array type) for levels less than JLS8 @@ -1473,14 +1476,13 @@ public final class AST { *

    * For example, the assignment expression foo = true * is generated by the following snippet: - * *

    +	 * 
     	 * Assignment e= ast.newAssignment();
     	 * e.setLeftHandSide(ast.newSimpleName("foo"));
     	 * e.setRightHandSide(ast.newBooleanLiteral(true));
    -	 * 
    * - *

    + * * * @param value the boolean value * @return a new unparented boolean literal node @@ -3579,7 +3581,6 @@ public final class AST { *
  • "java.lang.Void" (since 3.1)
  • *
  • "java.io.Serializable"
  • * - *

    * * @param name the name of a well known type * @return the corresponding type binding, or null if the 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 f6449e747..afd7819c6 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 @@ -72,7 +72,6 @@ import org.eclipse.jdt.internal.core.dom.NaiveASTFlattener; *
  • types - Type
  • *
  • type body declarations - BodyDeclaration
  • * - *

    *

    * Abstract syntax trees may be hand constructed by clients, using the * newTYPE factory methods (see AST) to @@ -1809,7 +1808,6 @@ public abstract class ASTNode { /** * Returns the location of this node within its parent, * or null if this is a root node. - *

    *

     	 * ASTNode node = ...;
     	 * ASTNode parent = node.getParent();
    @@ -1820,7 +1818,6 @@ public abstract class ASTNode {
     	 * if ((location != null) && location.isChildListProperty())
     	 *    assert ((List) parent.getStructuralProperty(location)).contains(node);
     	 * 
    - *

    *

    * Note that the relationship between an AST node and its parent node * may change over the lifetime of a node. @@ -2713,7 +2710,6 @@ public abstract class ASTNode { * is recovered from source that contains a syntax error * * Other bit positions are reserved for future use. - *

    * * @return the bitwise-or of individual flags * @see #setFlags(int) @@ -2738,7 +2734,6 @@ public abstract class ASTNode { * is recovered from source that contains a syntax error * * Other bit positions are reserved for future use. - *

    *

    * Note that the flags are not considered a structural * property of the node, and can be changed even if the 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 c2ceb2e32..fb2b8803f 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 @@ -66,6 +66,7 @@ import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError; * parser.setCompilerOptions(options); * CompilationUnit result = (CompilationUnit) parser.createAST(null); * + *

    * Once a configured parser instance has been used to create an AST, * the settings are automatically reset to their defaults, * ready for the parser instance to be reused. @@ -93,7 +94,6 @@ import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError; *

  • Whether to return a {@linkplain #setFocalPosition(int) abridged AST} * focused on the declaration containing a given source position.
  • * - *

    * * @since 3.0 * @noinstantiate This class is not intended to be instantiated by clients. @@ -523,10 +523,12 @@ public class ASTParser { *
  • {@link #K_EXPRESSION K_EXPRESSION}: The result node is a subclass of * {@link Expression Expression}. Other aspects of the expression are unspecified.
  • * + *

    * The resulting AST node is rooted under (possibly contrived) * {@link CompilationUnit CompilationUnit} node, to allow the * client to retrieve the following pieces of information * available there: + *

    *
      *
    • {@linkplain CompilationUnit#getLineNumber(int) Line number map}. Line * numbers start at 1 and only cover the subrange scanned @@ -538,6 +540,7 @@ public class ASTParser { *
    • {@linkplain CompilationUnit#getCommentList() Comment list} * for the subrange scanned.
    • *
    + *

    * The contrived nodes do not have source positions. Other aspects of the * {@link CompilationUnit CompilationUnit} node are unspecified, including * the exact arrangement of intervening nodes. @@ -866,6 +869,7 @@ public class ASTParser { * is called passing the compilation unit and the corresponding AST to requestor. * * + *

    * Note only ASTs from the given compilation units are reported * to the requestor. If additional compilation units are required to * resolve the original ones, the corresponding ASTs are not @@ -879,7 +883,6 @@ public class ASTParser { *

  • The {@linkplain #setSourceRange(int,int) source range} is (0, -1)
  • *
  • The {@linkplain #setFocalPosition(int) focal position} is not set
  • * - *

    *

    * The bindingKeys parameter specifies bindings keys * ({@link IBinding#getKey()}) that are to be looked up. These keys may @@ -955,6 +958,7 @@ public class ASTParser { * path that is passed into the given sourceFilePaths parameter. * * + *

    * Note only ASTs from the given compilation units are reported * to the requestor. If additional compilation units are required to * resolve the original ones, the corresponding ASTs are not @@ -963,12 +967,12 @@ public class ASTParser { *

    * Note also the following parser parameters are used, regardless of what * may have been specified: + *

    *
      *
    • The {@linkplain #setKind(int) parser kind} is K_COMPILATION_UNIT
    • *
    • The {@linkplain #setSourceRange(int,int) source range} is (0, -1)
    • *
    • The {@linkplain #setFocalPosition(int) focal position} is not set
    • *
    - *

    *

    * The bindingKeys parameter specifies bindings keys * ({@link IBinding#getKey()}) that are to be looked up. These keys may @@ -1056,7 +1060,6 @@ public class ASTParser { *

  • The {@linkplain #setSourceRange(int,int) source range} is (0, -1)
  • *
  • The {@linkplain #setFocalPosition(int) focal position} is not set
  • * - *

    *

    * A successful call to this method returns all settings to their * default values so the object is ready to be reused. @@ -1318,6 +1321,7 @@ public class ASTParser { *

  • {@linkplain CompilationUnit#getCommentList() Comment list} * for the subrange scanned.
  • * + *

    * The contrived nodes do not have source positions. Other aspects of the * {@link CompilationUnit CompilationUnit} node are unspecified, including * the exact arrangment of intervening nodes. 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 8a7fdc01b..1949fb0a1 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 @@ -37,7 +37,7 @@ package org.eclipse.jdt.core.dom; * false). The default implementation provided by this class does * nothing. Subclasses may reimplement this method as needed. * - *

    + *

    * In addition, there are a pair of methods for visiting AST nodes in the * abstract, regardless of node type: *

      diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java index 24e611f28..0db795695 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -15,14 +15,12 @@ package org.eclipse.jdt.core.dom; /** * Abstract base class of AST nodes that represent annotations. - *

      *

        * Annotation:
        *		NormalAnnotation
        *		MarkerAnnotation
        *		SingleMemberAnnotation
        * 
      - *

      * @since 3.1 */ @SuppressWarnings("rawtypes") diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java index 493b1724c..6cfde6788 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -35,7 +35,6 @@ import java.util.List; *
    • the dimension expressions are collected into the dimensions * list.
    • *
    - *

    * * @since 2.0 * @noinstantiate This class is not intended to be instantiated by clients. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java index 3e21d5c97..6b48ec3f9 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -22,7 +22,6 @@ import java.util.List; * that may appear in the body of some kind of class or interface declaration, * including anonymous class declarations, enumeration declarations, and * enumeration constant declarations. - *

    *

      * BodyDeclaration:
      * 		{@link AbstractTypeDeclaration}
    @@ -35,7 +34,6 @@ import java.util.List;
      * 		{@link Initializer}
      *		{@link MethodDeclaration} (for methods and constructors)
      * 
    - *

    *

    * All types of body declarations carry modifiers (and annotations), although they differ in * which modifiers are allowed. Most types of body declarations can carry a diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CharacterLiteral.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CharacterLiteral.java index 86f83d548..786e83a64 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CharacterLiteral.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CharacterLiteral.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -200,7 +200,6 @@ public class CharacterLiteral extends Expression { * s.setEscapedValue("\'x\'"); * assert s.charValue() == 'x'; * - *

    * * @return the character value without enclosing quotes and embedded * escapes @@ -300,7 +299,6 @@ public class CharacterLiteral extends Expression { * assert s.charValue() == 'x'; * assert s.getEscapedValue().equals("\'x\'"); * - *

    * * @param value the character value */ diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java index 1bfaeb66e..8d27af005 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -399,7 +399,7 @@ public class ClassInstanceCreation extends Expression { * @exception IllegalArgumentException if: *
      *
    • the node belongs to a different AST
    • - *
    • the node already has a parent
    • ` + *
    • the node already has a parent
    • *
    * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 @@ -459,7 +459,7 @@ public class ClassInstanceCreation extends Expression { * @exception IllegalArgumentException if: *
      *
    • the node belongs to a different AST
    • - *
    • the node already has a parent
    • ` + *
    • the node already has a parent
    • *
    * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Comment.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Comment.java index 75020d949..4b44887a1 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Comment.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Comment.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,14 +19,12 @@ package org.eclipse.jdt.core.dom; * line comments ({@link LineComment}), * block comments ({@link BlockComment}), and * doc comments ({@link Javadoc}). - *

    *

      * Comment:
      *     LineComment
      *     BlockComment
      *     Javadoc
      * 
    - *

    * * @since 3.0 */ @@ -109,8 +107,6 @@ public abstract class Comment extends ASTNode { /** * Returns the root AST node that this comment occurs * within, or null if none (or not recorded). - *

    - *

    * * @param root the alternate root node, or null * if 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 9cd41ab9f..841b7f4a2 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -349,6 +349,7 @@ public class CompilationUnit extends ASTNode { *
  • member value pair binding - an MemberValuePair, * or null if it represents a default value or a single member value
  • * + *

    * For parameterized or raw type bindings, the declaring node is * that of the corresponding generic type. And for parameterized or raw * method bindings, the declaring node is that of the corresponding @@ -407,7 +408,6 @@ public class CompilationUnit extends ASTNode { * that of the corresponding generic type. And for parameterized or raw * method bindings, the declaring node is that of the corresponding * generic method. - *

    * * @param key the binding key, or null * @return the corresponding node where a binding with the given diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java index eccf166d2..d0c40e2b0 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java @@ -17,7 +17,6 @@ package org.eclipse.jdt.core.dom; /** * Abstract base class of AST nodes that represent expressions. * There are several kinds of expressions. - *

    *

      * Expression:
      *    {@link Annotation},
    @@ -54,7 +53,6 @@ package org.eclipse.jdt.core.dom;
      *    {@link TypeMethodReference},
      *    {@link VariableDeclarationExpression}
      * 
    - *

    * * @since 2.0 */ diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldAccess.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldAccess.java index c53c9800d..b4fab40fc 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldAccess.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldAccess.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -29,6 +29,7 @@ import java.util.List; * Note that there are several kinds of expressions that resemble field access * expressions: qualified names, this expressions, and super field access * expressions. The following guidelines help with correct usage: + *

    *
      *
    • An expression like "foo.this" can only be represented as a this * expression (ThisExpression) containing a simple name. @@ -50,7 +51,6 @@ import java.util.List; * only be represented as field access expressions * (FieldAccess).
    • *
    - *

    * * @see QualifiedName * @see ThisExpression 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 a9274ed4e..5e212cad4 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -243,6 +243,7 @@ public interface IBinding { *
  • synthetic bindings
  • *
  • problem package bindings (since Java 9)
  • * + *

    * For all other kind of type, method, variable, annotation and package bindings, * this method returns non-null. *

    @@ -308,7 +309,6 @@ public interface IBinding { *
  • annotations - the key of the annotated element and the key of * the annotation type
  • * - *

    *

    * The key for a type binding does not contain {@link ITypeBinding#getTypeAnnotations() type annotations}, * so type bindings with different type annotations may have the same key (iff they denote the same un-annotated type). 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 28fb31b33..38f24dbce 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -591,7 +591,6 @@ public interface ITypeBinding extends IBinding { *

  • java.lang.@Marker2 String
  • *
  • java.lang.String
  • * - *

    * To get the type annotations on dimensions, clients should repeatedly call * {@link #getComponentType()} and get the type annotations from there. 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 be68171f1..1046ec51d 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2014 IBM Corporation and others. + * Copyright (c) 2013, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -21,7 +21,7 @@ import java.util.List; * Type node for an intersection type in a cast expression (added in JLS8 API). *
      * IntersectionType:
    - *    Type & Type { & Type }
    + *    Type & Type { & Type }
      * 
    *

    * This kind of node is used only inside a cast expression. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java index 89b663705..bd7a51fb8 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,12 +19,10 @@ import java.util.List; /** * Marker annotation node (added in JLS3 API). The marker annotation * "@foo" is equivalent to the normal annotation "@foo()". - *

    *

      * MarkerAnnotation:
      *   @ TypeName
      * 
    - *

    * * @since 3.1 * @noinstantiate This class is not intended to be instantiated by clients. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePair.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePair.java index c1459ff7d..b988b7d6f 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePair.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePair.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,11 +19,11 @@ import java.util.List; /** * Member value pair node (added in JLS3 API). Member value pairs appear in annotations. - *

    *

      * MemberValuePair:
      *   SimpleName = Expression
      * 
    + *

    * Within annotations, only certain kinds of expressions are meaningful, * including other annotations. *

    diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleDeclaration.java index bdad064c8..eace44eed 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleDeclaration.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ModuleDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016, 2017 IBM Corporation and others. + * Copyright (c) 2016, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -24,8 +24,6 @@ import java.util.List; * { RequiresDirective | ExportsDirective | OpensDirective | UsesDirective | ProvidesDirective } * } * - *

    - *

    * * @since 3.14 * diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Name.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Name.java index 4e41ffafb..eeb937b5d 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Name.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Name.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -18,13 +18,11 @@ package org.eclipse.jdt.core.dom; * Abstract base class for all AST nodes that represent names. * There are exactly two kinds of name: simple ones * (SimpleName) and qualified ones (QualifiedName). - *

    *

      * Name:
      *     SimpleName
      *     QualifiedName
      * 
    - *

    * * @since 2.0 * @noextend This class is not intended to be subclassed by clients. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NormalAnnotation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NormalAnnotation.java index f3c1228c7..4efea1700 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NormalAnnotation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NormalAnnotation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -18,12 +18,10 @@ import java.util.List; /** * Normal annotation node (added in JLS3 API). - *

    *

      * NormalAnnotation:
      *   @ TypeName ( [ MemberValuePair { , MemberValuePair } ] )
      * 
    - *

    * * @since 3.1 * @noinstantiate This class is not intended to be instantiated by clients. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java index d03a445fa..5ec2ffe00 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,11 +19,11 @@ import java.util.List; /** * Single member annotation node (added in JLS3 API). The single member annotation * "@foo(bar)" is equivalent to the normal annotation "@foo(value=bar)". - *

    *

      * SingleMemberAnnotation:
      *   @ TypeName ( Expression  )
      * 
    + *

    * Within annotations, only certain kinds of expressions are meaningful, * including other annotations. *

    diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java index e81e2dd79..ecb61a56a 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -112,8 +112,8 @@ public abstract class Statement extends ASTNode { *

    *

    * Examples: - * *

    +	 * 
     	 * setLeadingComment("/* traditional comment */");  // correct
     	 * setLeadingComment("missing comment delimiters");  // wrong
     	 * setLeadingComment("/* unterminated traditional comment ");  // wrong
    @@ -121,9 +121,8 @@ public abstract class Statement extends ASTNode {
     	 * setLeadingComment("// end-of-line comment\n");  // correct
     	 * setLeadingComment("// end-of-line comment without line terminator");  // correct
     	 * setLeadingComment("// broken\n end-of-line comment\n");  // wrong
    -	 * 
    * - *

    + * * * @param comment the comment string, or null if none * @exception IllegalArgumentException if the comment string is invalid diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java index 8541b6d83..fb7212264 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -201,7 +201,6 @@ public class StringLiteral extends Expression { * s.setEscapedValue("\"hello\\nworld\""); * assert s.getLiteralValue().equals("hello\nworld"); * - *

    *

    * Note that this is a convenience method that converts from the stored * string literal token returned by getEscapedLiteral. @@ -245,7 +244,6 @@ public class StringLiteral extends Expression { * assert s.getEscapedValue().equals("\"hello\\nworld\""); * assert s.getLiteralValue().equals("hello\nworld"); * - *

    *

    * Note that this is a convenience method that converts to the stored * string literal token acceptable to setEscapedLiteral. 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 444a0ef7e..94404ed18 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 @@ -20,7 +20,6 @@ import java.util.List; /** * Switch case AST node type. A switch case is a special kind of node used only * in switch statements. It is a Statement in name only. - *

    *

      * SwitchCase:
      * 		case Expression  :
    @@ -30,7 +29,6 @@ import java.util.List;
      *		case [ Expression { , Expression } ]  { : | ->}
      *		default { : | ->}
      * 
    - *

    * * @since 2.0 * @noinstantiate This class is not intended to be instantiated by clients. 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 1a899b441..135796d20 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 @@ -19,7 +19,6 @@ import java.util.List; /** * Switch expression AST node type (added in JEP 325). - *

    *

      * SwitchExpression:
      *		switch ( Expression )
    @@ -30,7 +29,6 @@ import java.util.List;
      * 
    * SwitchCase nodes are treated as a kind of * Statement. - *

    * * @since 3.18 * @noinstantiate This class is not intended to be instantiated by clients. diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchStatement.java index f3d05950e..f248dd428 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchStatement.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,7 +19,6 @@ import java.util.List; /** * Switch statement AST node type. - *

    *

      * SwitchStatement:
      *		switch ( Expression )
    @@ -30,7 +29,6 @@ import java.util.List;
      * 
    * SwitchCase nodes are treated as a kind of * Statement. - *

    * * @since 2.0 * @noinstantiate This class is not intended to be instantiated by clients. 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 fefb92777..01ebce7ea 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -112,7 +112,19 @@ 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 + */ + public static final String TAG_HIDDEN = "@hidden"; //$NON-NLS-1$ + /** + * Standard doc tag name (value {@value}). + * @since 3.18 + */ + public static final String TAG_INDEX = "@index"; //$NON-NLS-1$ + /** * Standard inline doc tag name (value {@value}). */ @@ -142,6 +154,12 @@ public final class TagElement extends ASTNode implements IDocElement { */ public static final String TAG_PARAM = "@param"; //$NON-NLS-1$ + /** + * Standard doc tag name (value {@value}). + * @since 3.18 + */ + public static final String TAG_PROVIDES = "@provides"; //$NON-NLS-1$ + /** * Standard doc tag name (value {@value}). */ @@ -172,11 +190,23 @@ public final class TagElement extends ASTNode implements IDocElement { */ public static final String TAG_SINCE = "@since"; //$NON-NLS-1$ + /** + * Standard doc tag name (value {@value}). + * @since 3.18 + */ + public static final String TAG_SUMMARY = "@summary"; //$NON-NLS-1$ + /** * Standard doc tag name (value {@value}). */ public static final String TAG_THROWS = "@throws"; //$NON-NLS-1$ + /** + * Standard doc tag name (value {@value}). + * @since 3.18 + */ + public static final String TAG_USES = "@uses"; //$NON-NLS-1$ + /** * Standard inline doc tag name (value {@value}). */ @@ -333,7 +363,6 @@ public final class TagElement extends ASTNode implements IDocElement { * The use of Name, MethodRef, and MemberRef nodes within * tag elements allows these fragments to be queried for * binding information. - *

    *

    * Adding and removing nodes from this list affects this node * dynamically. The nodes in this list may be of various 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 5310e54b2..a5637bed8 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -24,7 +24,6 @@ package org.eclipse.jdt.core.dom; * meaningful in the type argument position of a parameterized type. * UnionType got introduced in JLS4 to support common catch blocks for disjunctive types. * For JLS8, optional annotations indicated by {Annotation} got added. - *

    *

      * Type:
      *    AnnotatableType:
    @@ -63,9 +62,8 @@ package org.eclipse.jdt.core.dom;
      * {@link UnionType}:
      *    Type | Type { | Type }
      * {@link IntersectionType}:
    - *    Type & Type { & Type }
    + *    Type & Type { & Type }
      * 
    - *

    * * @since 2.0 */ @@ -158,7 +156,6 @@ public abstract class Type extends ASTNode { * either rather than make assumptions. (Note also that the first form * became possible as of JLS3; only the second form existed in the * JLS2 API.) - *

    * * @return true if this is a qualified type, and * false otherwise 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 8dfee9779..c2a0e1991 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2014 IBM Corporation and others. + * Copyright (c) 2003, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -23,7 +23,7 @@ import java.util.List; * *
      * TypeParameter:
    - *    { ExtendedModifier } Identifier [ extends Type { & Type } ]
    + *    { ExtendedModifier } Identifier [ extends Type { & Type } ]
      * 
    * * @since 3.1 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 795dbd0de..dc4ff57f0 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,13 +19,11 @@ import java.util.List; /** * Abstract base class of all AST node types that declare a single * variable. - *

    *

      * VariableDeclaration:
      *    SingleVariableDeclaration
      *    VariableDeclarationFragment
      * 
    - *

    * * @see SingleVariableDeclaration * @see VariableDeclarationFragment 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 aab7eb061..0df2a82f3 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -99,7 +99,8 @@ import org.eclipse.text.edits.TextEdit; *
    • {@link #setImportOrder(String[])} specifies the import groups and their preferred order
    • *
    • {@link #setOnDemandImportThreshold(int)} specifies the number of imports in a group needed for a on-demand import statement (star import)
    • *
    • {@link #setStaticOnDemandImportThreshold(int)} specifies the number of static imports in a group needed for a on-demand import statement (star import)
    • - *
    + * + *

    * This class is not intended to be subclassed. *

    * @since 3.2 @@ -240,7 +241,6 @@ public final class ImportRewrite { * give more information about the types visible in the scope. These types can be for example inherited inner types where it is * unnecessary to add import statements for. * - *

    *

    * This class can be implemented by clients. *

    diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/TargetSourceRangeComputer.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/TargetSourceRangeComputer.java index 26e41a055..991bf9b33 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/TargetSourceRangeComputer.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/TargetSourceRangeComputer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -107,11 +107,10 @@ public class TargetSourceRangeComputer { * immediately before or after the normal source range for the node. *

    * The returned source ranges must satisfy the following conditions: - *

    + *
      *
    • no two source ranges in an AST may be overlapping
    • *
    • a source range of a parent node must fully cover the source ranges of its children
    • - *
    - *

    + * *

    * The default implementation uses * {@link CompilationUnit#getExtendedStartPosition(ASTNode)} diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java index 2e7db123e..ade7f181d 100644 --- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java +++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -155,7 +155,7 @@ public abstract class CodeFormatter { *

  • {@link #K_STATEMENTS} (since 3.6)
  • *
  • {@link #K_MODULE_INFO} (since 3.14)
  • * - *

    + *

    * Note also that it has an effect only when one or several format comments * options for * {@link DefaultCodeFormatterConstants#FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT javadoc} @@ -206,7 +206,7 @@ public abstract class CodeFormatter { * } * } * - *

    + *

    * Note: Although we're convinced that the formatter should * always include the comments while processing a * {@link #K_COMPILATION_UNIT kind of compilation unit}, we diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java index f832f2d19..b3d3900fe 100644 --- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java +++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java @@ -337,7 +337,7 @@ public class DefaultCodeFormatterConstants { * * @see #createAlignmentValue(boolean, int, int) * @see #FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION - * @since 3.17 + * @since 3.18 */ public static final String FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION_CHAIN = JavaCore.PLUGIN_ID + ".formatter.alignment_for_conditional_expression_chain"; //$NON-NLS-1$ /** @@ -1203,9 +1203,11 @@ public class DefaultCodeFormatterConstants { * * * Note that at most one of these options can be set to {@code TRUE}: + *

      *
    • {@code FORMATTER_COMMENT_INDENT_ROOT_TAGS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_NAMES_DESCRIPTIONS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_DESCREIPTIONS_GROUPED}. + *
    * * @see #TRUE * @see #FALSE @@ -1224,9 +1226,11 @@ public class DefaultCodeFormatterConstants { * * * Note that at most one of these options can be set to {@code TRUE}: + *
      *
    • {@code FORMATTER_COMMENT_INDENT_ROOT_TAGS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_NAMES_DESCRIPTIONS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_DESCREIPTIONS_GROUPED}. + *
    * * @see #TRUE * @see #FALSE @@ -1245,9 +1249,11 @@ public class DefaultCodeFormatterConstants { * * * Note that at most one of these options can be set to {@code TRUE}: + *
      *
    • {@code FORMATTER_COMMENT_INDENT_ROOT_TAGS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_NAMES_DESCRIPTIONS}, *
    • {@code FORMATTER_COMMENT_ALIGN_TAGS_DESCREIPTIONS_GROUPED}. + *
    * * @see #TRUE * @see #FALSE @@ -1419,7 +1425,7 @@ public class DefaultCodeFormatterConstants { * void bar1() {} * void bar2() {} * } - *

    + * * *
  • If no enabling tag is found by the formatter after the disabling tag, then * the end of the snippet won't be formatted.
    @@ -1497,7 +1503,6 @@ public class DefaultCodeFormatterConstants { * *
  • * - *

    * @since 3.6 */ public static final String FORMATTER_DISABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.disabling_tag"; //$NON-NLS-1$ @@ -1556,7 +1561,7 @@ public class DefaultCodeFormatterConstants { * // @formatter:on * void bar2() {} * } - *

    + * * *
  • If a mix of disabling and enabling tags is done in the same comment, then * the formatter will only take into account the last encountered tag in the @@ -1627,7 +1632,6 @@ public class DefaultCodeFormatterConstants { * *
  • * - *

    * @since 3.6 */ public static final String FORMATTER_ENABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.enabling_tag"; //$NON-NLS-1$ @@ -2121,6 +2125,7 @@ public class DefaultCodeFormatterConstants { */ public static final String FORMATTER_INSERT_SPACE_AFTER_AND_IN_TYPE_PARAMETER = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_and_in_type_parameter"; //$NON-NLS-1$ /** + *
     	 * FORMATTER / Option to insert a space after arrow in switch case
     	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case"
     	 *     - possible values:   { INSERT, DO_NOT_INSERT }
    @@ -2132,6 +2137,7 @@ public class DefaultCodeFormatterConstants {
     	 */
     	public static final String FORMATTER_INSERT_SPACE_AFTER_ARROW_IN_SWITCH_CASE = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_arrow_in_switch_case"; //$NON-NLS-1$
     	/**
    +	 * 
     	 * FORMATTER / Option to insert a space after arrow in switch default
     	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default"
     	 *     - possible values:   { INSERT, DO_NOT_INSERT }
    @@ -2599,7 +2605,7 @@ public class DefaultCodeFormatterConstants {
     	 * 
    * @see JavaCore#INSERT * @see JavaCore#DO_NOT_INSERT - * @since 3.17 + * @since 3.18 */ public static final String FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_SWITCH_CASE_EXPRESSIONS = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_comma_in_switch_case_expressions"; //$NON-NLS-1$ /** @@ -2988,6 +2994,7 @@ public class DefaultCodeFormatterConstants { */ public static final String FORMATTER_INSERT_SPACE_BEFORE_AND_IN_TYPE_PARAMETER = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_and_in_type_parameter"; //$NON-NLS-1$ /** + *
     	 * FORMATTER / Option to insert a space before arrow in switch case
     	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case"
     	 *     - possible values:   { INSERT, DO_NOT_INSERT }
    @@ -2999,6 +3006,7 @@ public class DefaultCodeFormatterConstants {
     	 */
     	public static final String FORMATTER_INSERT_SPACE_BEFORE_ARROW_IN_SWITCH_CASE = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_arrow_in_switch_case"; //$NON-NLS-1$
     	/**
    +	 * 
     	 * FORMATTER / Option to insert a space before arrow in switch default
     	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default"
     	 *     - possible values:   { INSERT, DO_NOT_INSERT }
    @@ -3658,7 +3666,7 @@ public class DefaultCodeFormatterConstants {
     	 * 
    * @see JavaCore#INSERT * @see JavaCore#DO_NOT_INSERT - * @since 3.17 + * @since 3.18 */ public static final String FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_SWITCH_CASE_EXPRESSIONS = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_comma_in_switch_case_expressions"; //$NON-NLS-1$ /** @@ -4896,8 +4904,6 @@ public class DefaultCodeFormatterConstants { * } * } *
    - *

    - *

    *

    Important notes:

    *
      *
    1. This new behavior is automatically activated (i.e. the default value for this preference is {@link #TRUE}). diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BindingKey.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BindingKey.java index defeedffe..043322247 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BindingKey.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BindingKey.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -52,7 +52,6 @@ public final class BindingKey { * createArrayTypeBindingKey("I", 2) -> "[[I" * *
    - *

    * * @param typeKey the binding key of the given type * @param arrayDimension the given array dimension @@ -83,7 +82,6 @@ public final class BindingKey { * "Ljava/util/List<>;" *
    * - *

    * * @param genericTypeKey the binding key of the generic type * @param argumentTypeKeys the possibly empty list of binding keys of argument types @@ -116,7 +114,6 @@ public final class BindingKey { * createTypeBindingKey("boolean[]") -> "[Z" * * - *

    * * @param typeName the possibly qualified type name * @return a new type binding key @@ -139,7 +136,6 @@ public final class BindingKey { * "Lp/X;.foo()V:TSomeTypeVariable;" * * - *

    * * @param typeVariableName the name of the given type variable * @param declaringKey the binding key of the type or method the type variable belongs to @@ -171,7 +167,6 @@ public final class BindingKey { * "+Ljava/util/ArrayList;" * * - *

    * * @param typeKey the binding key of the given type * @param kind one of {@link Signature#C_STAR}, {@link Signature#C_SUPER}, or {@link Signature#C_EXTENDS} @@ -208,7 +203,6 @@ public final class BindingKey { * "Ljava/util/HashMap;{1}+Ljava/lang/String;" * * - *

    * * @param genericTypeKey the binding key of the generic type * @param boundKind one of {@link Signature#C_STAR}, {@link Signature#C_SUPER}, or {@link Signature#C_EXTENDS} diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ClasspathContainerInitializer.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ClasspathContainerInitializer.java index a087d856d..e70ca2a53 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ClasspathContainerInitializer.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ClasspathContainerInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -120,7 +120,6 @@ public abstract class ClasspathContainerInitializer { *
  • Java element operations marked as "handle-only"
  • * * The effects of using other Java model APIs are unspecified. - *

    * * @param containerPath a two-segment path (ID/hint) identifying the container that needs * to be resolved @@ -275,7 +274,7 @@ public abstract class ClasspathContainerInitializer { * respectively the {@link #ATTRIBUTE_NOT_SUPPORTED} value * or the {@link #ATTRIBUTE_READ_ONLY} value. * - *

    + *

    * The status message can contain more information. *

    * If the subclass does not override this method, then the default behavior is @@ -311,7 +310,7 @@ public abstract class ClasspathContainerInitializer { * respectively the {@link #ATTRIBUTE_NOT_SUPPORTED} value * or the {@link #ATTRIBUTE_READ_ONLY} value. * - *

    + *

    * The status message can contain more information. *

    * If the subclass does not override this method, then the default behavior is @@ -349,7 +348,7 @@ public abstract class ClasspathContainerInitializer { * respectively the {@link #ATTRIBUTE_NOT_SUPPORTED} value * or the {@link #ATTRIBUTE_READ_ONLY} value. * - *

    + *

    * The status message can contain more information. *

    * If the subclass does not override this method, then the default behavior is diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java index 80381ca34..ba57ebe51 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2018 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -83,7 +83,6 @@ public class CompletionProposal { * the modifiers flags of the constructor that is referenced * * - *

    * * @see #getKind() */ @@ -113,7 +112,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() */ @@ -135,7 +133,6 @@ public class CompletionProposal { * the corresponding modifier flags if the keyword is a modifier * * - *

    * * @see #getKind() */ @@ -154,7 +151,6 @@ public class CompletionProposal { * the simple name of the label that is referenced * * - *

    * * @see #getKind() */ @@ -179,7 +175,6 @@ public class CompletionProposal { * the type signature of the local variable's type * * - *

    * * @see #getKind() */ @@ -207,7 +202,6 @@ public class CompletionProposal { * the method signature of the method that is referenced * * - *

    * * @see #getKind() */ @@ -247,7 +241,6 @@ public class CompletionProposal { * overridden or implemented * * - *

    * * @see #getKind() */ @@ -266,7 +259,6 @@ public class CompletionProposal { * the dot-based package name of the package that is referenced * * - *

    * * @see #getKind() */ @@ -295,7 +287,6 @@ public class CompletionProposal { * and AccAnnotation) of the type that is referenced * * - *

    * * @see #getKind() */ @@ -319,7 +310,6 @@ public class CompletionProposal { * the modifiers flags of the variable being declared * * - *

    * @see #getKind() */ public static final int VARIABLE_DECLARATION = 10; @@ -349,7 +339,6 @@ public class CompletionProposal { * created * * - *

    * * @see #getKind() * @since 3.1 @@ -364,6 +353,7 @@ public class CompletionProposal { *

    * The following additional context information is available * for this kind of completion proposal at little extra cost: + *

    *
      *
    • {@link #getDeclarationSignature()} - * the type signature of the type that declares the method that is referenced @@ -378,7 +368,6 @@ public class CompletionProposal { * the method signature of the method that is referenced *
    • *
    - *

    * * @see #getKind() * @since 3.1 @@ -409,7 +398,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.1 @@ -440,7 +428,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.2 @@ -469,7 +456,6 @@ public class CompletionProposal { * the method signature of the method that is referenced * * - *

    * * @see #getKind() * @since 3.2 @@ -499,7 +485,6 @@ public class CompletionProposal { * and AccAnnotation) of the type that is referenced * * - *

    * * @see #getKind() * @since 3.2 @@ -530,7 +515,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.2 @@ -565,7 +549,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.2 @@ -596,7 +579,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.2 @@ -627,7 +609,6 @@ public class CompletionProposal { * is declared) * * - *

    * * @see #getKind() * @since 3.2 @@ -659,7 +640,6 @@ public class CompletionProposal { * of the proposed import * * - *

    * * @see #getKind() * @@ -690,7 +670,6 @@ public class CompletionProposal { * of the proposed import * * - *

    * * @see #getKind() * @@ -721,7 +700,6 @@ public class CompletionProposal { * of the proposed import * * - *

    * * @see #getKind() * @@ -754,7 +732,6 @@ public class CompletionProposal { * the method signature of the method that is referenced * * - *

    * * @see #getKind() * @@ -790,7 +767,6 @@ public class CompletionProposal { * * * - *

    * * @see #getKind() * @@ -820,7 +796,6 @@ public class CompletionProposal { * the method signature of the constructor that is referenced * * - *

    *

    * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor} * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)}).
    @@ -861,7 +836,6 @@ public class CompletionProposal { * the modifiers flags of the constructor that is referenced * * - *

    *

    * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor} * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)})
    @@ -1010,7 +984,6 @@ public class CompletionProposal { * * For other kinds of completion proposals, this method returns * CompletionFlags.Default. - *

    * * @return the completion flags, or * CompletionFlags.Default if none @@ -1285,7 +1258,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return a type signature or a package name or module name (9) (depending * on the kind of completion), or null if none @@ -1312,7 +1284,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return a key, or null if none * @see org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor) @@ -1384,7 +1355,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return the keyword, field, method, local variable, or member * name, or null if none @@ -1452,7 +1422,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return the signature, or null if none * @see Signature @@ -1477,7 +1446,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return the key, or null if none * @see org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor) @@ -1578,7 +1546,6 @@ public class CompletionProposal { * * For other kinds of completion proposals, this method returns * Flags.AccDefault. - *

    * * @return the modifier flags, or * Flags.AccDefault if none @@ -1627,7 +1594,6 @@ public class CompletionProposal { *
  • TYPE_IMPORT
  • *
  • METHOD_IMPORT
  • * - * * *
  • TYPE_REF - The allowed required proposals for this kind are: *
      @@ -1650,7 +1616,6 @@ public class CompletionProposal { *
    *
  • * - *

    *

    * Other kinds of required proposals will be returned in the future, therefore clients of this * API must allow with {@link CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)} @@ -1741,7 +1706,6 @@ public class CompletionProposal { * {@link IAccessRule#K_ACCESSIBLE} or {@link IAccessRule#K_DISCOURAGED} * or {@link IAccessRule#K_NON_ACCESSIBLE}. * By default this method return {@link IAccessRule#K_ACCESSIBLE}. - *

    * * @see IAccessRule * @@ -1766,7 +1730,6 @@ public class CompletionProposal { * * For kinds of completion proposals, this method returns * false. - *

    * * @return true if the proposal is a constructor. * @since 3.1 @@ -1790,7 +1753,6 @@ public class CompletionProposal { * For kinds of completion proposals, this method returns * null. Clients must not modify the array * returned. - *

    * * @return a type signature or a package name (depending * on the kind of completion), or null if none @@ -1816,7 +1778,6 @@ public class CompletionProposal { *
  • METHOD_REF_WITH_CASTED_RECEIVER
  • * * For kinds of completion proposals, this method returns 0. - *

    * * @return character index of receiver start position (inclusive) * @@ -1839,7 +1800,6 @@ public class CompletionProposal { *
  • METHOD_REF_WITH_CASTED_RECEIVER
  • * * For kinds of completion proposals, this method returns 0. - *

    * * @return character index of receiver end position (exclusive) * diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionRequestor.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionRequestor.java index dfc71066a..1465be709 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionRequestor.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionRequestor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -33,6 +33,7 @@ import org.eclipse.jdt.core.compiler.IProblem; * ... * requestor.endReporting(); * + *

    * If, however, the engine is unable to offer completion proposals * for whatever reason, completionFailure is called * with a problem object describing why completions were unavailable. @@ -43,6 +44,7 @@ import org.eclipse.jdt.core.compiler.IProblem; * requestor.completionFailure(problem); * requestor.endReporting(); * + *

    * In either case, the bracketing beginReporting * endReporting calls are always made as well as * acceptContext call. diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java index ca3f5ec52..fda96862a 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -506,14 +506,12 @@ public final class Flags { * int flags = method.getFlags() & ~Flags.AccVarargs; * return Flags.toString(flags); * - *

    *

    * Examples results: *

     	 *	  "public static final"
     	 *	  "private native"
     	 * 
    - *

    * * @param flags the flags * @return the standard string representation of the given flags diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java index 24c188302..c841fb860 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2017 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -219,7 +219,7 @@ public interface IClasspathAttribute { * "false" is assumed. If the value of this attribute is "true", and the classpath entry * is a source folder, it is assumed to contain test sources, otherwise main sources. *

    - *

    + *

    * During the compilation of main sources, only code is visible, that is reachable via classpath entries which do * not have the test attribute set to to "true". During the compilation of test sources, all code is visible as if * this attribute didn't exist at all. diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java index 93a331723..ba3afda8f 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -98,6 +98,7 @@ public interface IClasspathContainer { *

  • {@link IJavaProject#readOutputLocation()}
  • *
  • Java element operations marked as "handle-only"
  • * + *

    * The effects of using other Java model APIs are unspecified. *

    * diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java index bbe602970..ad735bc07 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -22,7 +22,6 @@ import org.eclipse.core.runtime.IPath; * by each package fragment root and package fragment associated with the entry. *

    * A classpath entry can refer to any of the following:

      - * *
    • Source code in the current project. In this case, the entry identifies a * root folder in the current project containing package fragments and * source files with one of the {@link JavaCore#getJavaLikeExtensions() @@ -91,7 +90,6 @@ import org.eclipse.core.runtime.IPath; *
      Also note that the container resolution APIs include an IJavaProject argument, so as to allow the same * container path to be interpreted in different ways for different projects.
    • *
    - *

    * The result of {@link IJavaProject#getResolvedClasspath} will have all entries of type * {@link #CPE_VARIABLE} and {@link #CPE_CONTAINER} resolved to a set of * {@link #CPE_SOURCE}, {@link #CPE_LIBRARY} or {@link #CPE_PROJECT} @@ -275,7 +273,6 @@ public interface IClasspathEntry { * tests). * * - *

    * * @return the possibly empty list of resource exclusion patterns * associated with this classpath entry, or null if this kind @@ -335,7 +332,6 @@ public interface IClasspathEntry { * named Foo.java. * * - *

    * * @return the possibly empty list of resource inclusion patterns * associated with this classpath entry, or null if this kind diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICodeAssist.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICodeAssist.java index 2f7c535b4..0e0a5f595 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICodeAssist.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICodeAssist.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -95,7 +95,6 @@ public interface ICodeAssist { * An offset of -1 indicates to code assist at the beginning of this * compilation unit. *

    - *

    * If {@link IProgressMonitor} is not null then some proposals which * can be very long to compute are proposed. To avoid that the code assist operation * take too much time a {@link IProgressMonitor} which automatically cancel the code diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java index 5f2c667a8..2530489df 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -418,11 +418,11 @@ IImportDeclaration[] getImports() throws JavaModelException; */ ICompilationUnit getPrimary(); /** - * Returns null if this ICompilationUnit is the primary + * Returns null if this ICompilationUnit is the primary * working copy, or this ICompilationUnit is not a working copy, * otherwise the WorkingCopyOwner * - * @return null if this ICompilationUnit is the primary + * @return null if this ICompilationUnit is the primary * working copy, or this ICompilationUnit is not a working copy, * otherwise the WorkingCopyOwner * @since 3.0 @@ -736,7 +736,6 @@ CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, boolean e *

  • the requested level of AST API is not supported
  • *
  • the working copy was already consistent and problem detection is not forced
  • * - *

    * *

    * If statements recovery is enabled by passing the {@link #ENABLE_STATEMENTS_RECOVERY} bit in the given reconcile flag diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaElementDelta.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaElementDelta.java index 386196364..0ab4326b7 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaElementDelta.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaElementDelta.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -23,7 +23,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit; *

    * Deltas have a different status depending on the kind of change they represent. * The list below summarizes each status (as returned by {@link #getKind}) - * and its meaning (see individual constants for a more detailled description): + * and its meaning (see individual constants for a more detailed description): *

      *
    • {@link #ADDED} - The element described by the delta has been added.
    • *
    • {@link #REMOVED} - The element described by the delta has been removed.
    • @@ -60,11 +60,10 @@ import org.eclipse.jdt.core.dom.CompilationUnit; *
    • {@link #F_SOURCEDETACHED} - The source attachment path or the source attachment root path * of a classpath entry corresponding to the element was removed. This flag is only valid if the element is an * {@link IPackageFragmentRoot}.
    • - *
    • {@link #F_SUPER_TYPES} - One of the supertypes of an {@link IType} has changed
    • . + *
    • {@link #F_SUPER_TYPES} - One of the supertypes of an {@link IType} has changed.
    • *
    * * - *

    *

    * Move operations are indicated by other change flags, layered on top * of the change flags described above. If element A is moved to become B, @@ -369,7 +368,7 @@ public interface IJavaElementDelta { /** * Returns flags that describe how an element has changed. - * Such flags should be tested using the & operand. For example: + * Such flags should be tested using the & operand. For example: *

     	 * if ((delta.getFlags() & IJavaElementDelta.F_CONTENT) != 0) {
     	 * 	// the delta indicates a content change
    diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
    index d0e384d1f..9c9c818f6 100644
    --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
    +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
    @@ -1,5 +1,5 @@
     /*******************************************************************************
    - * Copyright (c) 2000, 2018 IBM Corporation and others.
    + * Copyright (c) 2000, 2019 IBM Corporation and others.
      *
      * This program and the accompanying materials
      * are made available under the terms of the Eclipse Public License 2.0
    @@ -49,14 +49,13 @@ import org.eclipse.jdt.core.eval.IEvaluationContext;
      * the corresponding generated class files from the required project's output
      * location(s)). The classpath format is a sequence of classpath entries
      * describing the location and contents of package fragment roots.
    - * 

    + *

    * Java project elements need to be opened before they can be navigated or manipulated. * The children of a Java project are the package fragment roots that are * defined by the classpath and contained in this project (in other words, it * does not include package fragment roots for other projects). The children * (i.e. the package fragment roots) appear in the order they are defined by * the classpath. - *

    *

    * An instance of one of these handles can be created via * JavaCore.create(project). @@ -172,7 +171,7 @@ public interface IJavaProject extends IParent, IJavaElement, IOpenable { * variable} *

  • {@link IAnnotation} for a binding key from an * {@link IAnnotationBinding}
  • - *

    + * *

    Note: if two methods correspond to the binding key because their * parameter types' simple names are the same, then the first one is returned. * For example, if a class defines two methods foo(p1.Y, String) @@ -649,7 +648,7 @@ public interface IJavaProject extends IParent, IJavaElement, IOpenable { *

    *

    * Note that in case the project isn't yet opened, the classpath will - * be read directly from the associated .classpath file. + * be read directly from the associated .classpath file. *

    * * @return the raw classpath for the project, as a list of classpath entries @@ -1218,7 +1217,7 @@ public interface IJavaProject extends IParent, IJavaElement, IOpenable { * * @param path * IPath - * @return the classpath entry or null. + * @return the classpath entry or null. * @throws JavaModelException * @since 3.14 */ diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IModuleDescription.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IModuleDescription.java index 602b1d275..ebda6d8ce 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IModuleDescription.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IModuleDescription.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017, 2018 IBM Corporation. + * Copyright (c) 2017, 2019 IBM Corporation. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -37,6 +37,24 @@ public interface IModuleDescription extends IMember, IAnnotatable { */ String[] getRequiredModuleNames() throws JavaModelException; + /** + * Get provided service names for this module. + * + * @return a non-null array of provided service names + * @throws JavaModelException + * @since 3.18 + */ + String[] getProvidedServiceNames() throws JavaModelException; + + /** + * Get used service names for this module. + * + * @return a non-null array of used service names + * @throws JavaModelException + * @since 3.18 + */ + String[] getUsedServiceNames() throws JavaModelException; + /** * * @return true if automatic module, else false diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java index a0466b1b6..630f40cc7 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -348,10 +348,11 @@ public interface IType extends IMember, IAnnotatable { * *

    It is possible that a field with the same name already exists in this type. * The value of the force parameter affects the resolution of - * such a conflict:

      + * such a conflict: + *
        *
      • true - in this case the field is created with the new contents
      • *
      • false - in this case a JavaModelException is thrown
      • - *

      + *
    * * @param contents the given contents * @param sibling the given sibling @@ -406,10 +407,11 @@ public interface IType extends IMember, IAnnotatable { * *

    It is possible that a method with the same signature already exists in this type. * The value of the force parameter affects the resolution of - * such a conflict:

      + * such a conflict: + *
        *
      • true - in this case the method is created with the new contents
      • *
      • false - in this case a JavaModelException is thrown
      • - *

      + *
    * * @param contents the given contents * @param sibling the given sibling @@ -440,10 +442,11 @@ public interface IType extends IMember, IAnnotatable { * *

    It is possible that a type with the same name already exists in this type. * The value of the force parameter affects the resolution of - * such a conflict:

      + * such a conflict: + *
        *
      • true - in this case the type is created with the new contents
      • *
      • false - in this case a JavaModelException is thrown
      • - *

      + *
    * * @param contents the given contents * @param sibling the given sibling diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java index 6bda1aec7..b18211867 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -122,7 +122,6 @@ public final class JavaConventions { *
  • it must not contain any characters or substrings that are not valid * on the file system on which workspace root is located. * - *

    * @param name the name of a compilation unit * @return a status object with code IStatus.OK if * the given name is valid as a compilation unit name, otherwise a status @@ -145,7 +144,6 @@ public final class JavaConventions { *
  • it must not contain any characters or substrings that are not valid * on the file system on which workspace root is located. * - *

    * @param name the name of a compilation unit * @param sourceLevel the source level * @param complianceLevel the compliance level @@ -196,7 +194,6 @@ public final class JavaConventions { *
  • it must not contain any characters or substrings that are not valid * on the file system on which workspace root is located. * - *

    * @param name the name of a .class file * @return a status object with code IStatus.OK if * the given name is valid as a .class file name, otherwise a status @@ -219,7 +216,6 @@ public final class JavaConventions { *
  • it must not contain any characters or substrings that are not valid * on the file system on which workspace root is located. * - *

    * @param name the name of a .class file * @param sourceLevel the source level * @param complianceLevel the compliance level diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java index a02a4a667..f2be556ad 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -42,7 +42,6 @@ import org.eclipse.jdt.internal.core.InternalNamingConventions; *
  • {@link JavaCore#CODEASSIST_ARGUMENT_PREFIXES} : Define the Prefixes for Argument Name.
  • *
  • {@link JavaCore#CODEASSIST_ARGUMENT_SUFFIXES} : Define the Suffixes for Argument Name.
  • * - *

    *

    * For a complete description of the configurable options, see {@link JavaCore#getDefaultOptions()}. * To programmatically change these options, see {@link JavaCore#setOptions(java.util.Hashtable)}. @@ -518,7 +517,6 @@ public final class NamingConventions { *

  • {@link #VK_STATIC_FIELD}: {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES} and {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES}
  • *
  • {@link #VK_STATIC_FINAL_FIELD}: {@link JavaCore#CODEASSIST_STATIC_FINAL_FIELD_PREFIXES} and {@link JavaCore#CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES}
  • * - *

    *

    * e.g.
    * If the variable is a {@link #VK_LOCAL}, the variable name is preVariableNamesuf, a possible prefix is pre and a possible suffix is suf @@ -1083,7 +1081,6 @@ public final class NamingConventions { * * * Some other kinds could be added in the future. - *

    *

    * Each variable kind is affected by the following JavaCore options: *

      @@ -1093,7 +1090,6 @@ public final class NamingConventions { *
    • {@link #VK_STATIC_FIELD}: {@link JavaCore#CODEASSIST_STATIC_FIELD_PREFIXES} and {@link JavaCore#CODEASSIST_STATIC_FIELD_SUFFIXES}
    • *
    • {@link #VK_STATIC_FINAL_FIELD}: {@link JavaCore#CODEASSIST_STATIC_FINAL_FIELD_PREFIXES} and {@link JavaCore#CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES}
    • *
    - *

    *

    * For a complete description of these configurable options, see {@link JavaCore#getDefaultOptions()}. * To programmatically change these options, see {@link JavaCore#setOptions(java.util.Hashtable)} and {@link IJavaProject#setOptions(java.util.Map)} @@ -1107,7 +1103,6 @@ public final class NamingConventions { *

  • Names with suffix. Longer names are proposed first
  • *
  • Names without prefix and suffix. Longer names are proposed first
  • * - *

    * * @param variableKind specifies what type the variable is: {@link #VK_LOCAL}, {@link #VK_PARAMETER}, {@link #VK_STATIC_FIELD}, * {@link #VK_INSTANCE_FIELD} or {@link #VK_STATIC_FINAL_FIELD}. diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java index 76801f2ea..4c6d2d123 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -97,7 +97,6 @@ import org.eclipse.jdt.internal.compiler.util.Util; * "<" + FormalTypeParameterSignature+ + ">" * | *
    - *

    *

    * Examples: *

      @@ -107,10 +106,9 @@ import org.eclipse.jdt.internal.compiler.util.Util; *
    • "Qjava.lang.String;" denotes java.lang.String in source code
    • *
    • "[QString;" denotes String[] in source code
    • *
    • "QMap<QString;*>;" denotes Map<String,?> in source code
    • - *
    • "Qjava.util.List<TV;>;" denotes java.util.List<V> in source code
    • - *
    • "<E;>Ljava.util.List;" denotes <E>java.util.List in source code
    • + *
    • "Qjava.util.List<V>;" denotes java.util.List<V> in source code
    • + *
    • "<E>Ljava.util.List;" denotes <E>java.util.List in source code
    • *
    - *

    *

    * The syntax for a method signature is: *

    @@ -125,7 +123,6 @@ import org.eclipse.jdt.internal.compiler.util.Util;
      *   
  • "([Ljava.lang.String;)V" denotes void foo(java.lang.String[]) in compiled code
  • *
  • "(QString;)QObject;" denotes Object foo(String) in source code
  • * - *

    *

    * The syntax for a formal type parameter signature is: *

    @@ -145,7 +142,6 @@ import org.eclipse.jdt.internal.compiler.util.Util;
      *   
  • "X:QReader;" denotes X extends Reader in source code
  • *
  • "X:QReader;:QSerializable;" denotes X extends Reader & Serializable in source code
  • * - *

    *

    * This class provides static methods and constants only. *

    @@ -1342,7 +1338,6 @@ public static String createTypeSignature(char[] typeName, boolean isResolved) { * createTypeSignature("int []", false) -> "[I" *
    *
    - *

    * * @param typeName the possibly qualified type name * @param isResolved true if the type name is to be considered @@ -1603,7 +1598,6 @@ public static int getArrayCount(String typeSignature) throws IllegalArgumentExce * getElementType({'[', '[', 'I'}) --> {'I'}. * *
    - *

    * * @param typeSignature the type signature * @return the type signature without arrays @@ -1630,7 +1624,6 @@ public static char[] getElementType(char[] typeSignature) throws IllegalArgument * getElementType("[[I") --> "I". * * - *

    * * @param typeSignature the type signature * @return the type signature without arrays @@ -1842,7 +1835,6 @@ public static String[] getParameterTypes(String methodSignature) throws IllegalA * getQualifier({'j', 'a', 'v', 'a', '.', 'u', 't', 'i', 'l', '.', 'L', 'i', 's', 't', '<', 'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', '>'}) -> {'j', 'a', 'v', 'a', '.', 'u', 't', 'i', 'l'} * * - *

    * * @param name the name * @return the qualifier prefix, or the empty char array if the name contains no @@ -1871,7 +1863,6 @@ public static char[] getQualifier(char[] name) { * getQualifier("java.util.List<java.lang.String>") -> "java.util" * * - *

    * * @param name the name * @return the qualifier prefix, or the empty string if the name contains no @@ -1929,7 +1920,6 @@ public static String getReturnType(String methodSignature) throws IllegalArgumen * getSignatureQualifier({'L', 'j', 'a', 'v', 'a', '.', 'u', 't', 'i', 'l', '.', 'M', 'a', 'p', '$', 'E', 'n', 't', 'r', 'y', ';'}) -> {'j', 'a', 'v', 'a', '.', 'u', 't', 'i', 'l'} * * - *

    * * @param typeSignature the type signature * @return the package fragment (separators are '.') @@ -1975,7 +1965,6 @@ public static char[] getSignatureQualifier(char[] typeSignature) { * getSignatureQualifier("Ljava.util.Map$Entry") -> "java.util" * * - *

    * * @param typeSignature the type signature * @return the package fragment (separators are '.') @@ -1994,7 +1983,6 @@ public static String getSignatureQualifier(String typeSignature) { * getSignatureSimpleName({'L', 'j', 'a', 'v', 'a', '.', 'u', 't', 'i', 'l', '.', 'M', 'a', 'p', '$', 'E', 'n', 't', 'r', 'y', ';'}) -> {'M', 'a', 'p', '.', 'E', 'n', 't', 'r', 'y'} * * - *

    * * @param typeSignature the type signature * @return the type fragment (separators are '.') @@ -2049,7 +2037,6 @@ public static char[] getSignatureSimpleName(char[] typeSignature) { * getSignatureSimpleName("Ljava.util.Map$Entry") -> "Map.Entry" * * - *

    * * @param typeSignature the type signature * @return the type fragment (separators are '.') @@ -2068,7 +2055,6 @@ public static String getSignatureSimpleName(String typeSignature) { * getSimpleName({'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'O', 'b', 'j', 'e', 'c', 't'}) -> {'O', 'b', 'j', 'e', 'c', 't'} * * - *

    * * @param name the name * @return the last segment of the qualified name @@ -2126,7 +2112,6 @@ public static char[] getSimpleName(char[] name) { * getSimpleName("java.util.Map<java.lang.String, java.lang.Object>") -> "Map<String,Object>" * * - *

    * * @param name the name * @return the last segment of the qualified name @@ -2715,7 +2700,6 @@ public static String getTypeVariable(String formalTypeParameterSignature) throws * will return: "LTest<+Ljava.lang.Throwable;>;" * * - *

    * * @param methodOrTypeSignature the signature which may have been captured * @return a new signature without capture information or the signature itself @@ -2740,7 +2724,6 @@ public static char[] removeCapture(char[] methodOrTypeSignature) { * will return: "LTest<+Ljava.lang.Throwable;>;" * * - *

    * * @param methodOrTypeSignature the signature which may have been captured * @return a new signature without capture information or the signature itself @@ -2768,7 +2751,6 @@ public static String removeCapture(String methodOrTypeSignature) { * toString({'+', 'L', 'O', 'b', 'j', 'e', 'c', 't', ';'}) -> {'?', ' ', 'e', 'x', 't', 'e', 'n', 'd', 's', ' ', 'O', 'b', 'j', 'e', 'c', 't'} * * - *

    *

    * Note: This method assumes that a type signature containing a '$' * is an inner type signature. While this is correct in most cases, someone could @@ -2808,7 +2790,6 @@ public static char[] toCharArray(char[] signature) throws IllegalArgumentExcepti * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)" * * - *

    * * @param methodSignature the method signature to convert * @param methodName the name of the method to insert in the result, or @@ -2838,7 +2819,6 @@ public static char[] toCharArray(char[] methodSignature, char[] methodName, char * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)" * * - *

    * * @param methodSignature the method signature to convert * @param methodName the name of the method to insert in the result, or @@ -2921,7 +2901,6 @@ public static char[] toCharArray(char[] methodSignature, char[] methodName, char * toQualifiedName({{}}) -> {} * * - *

    * * @param segments the list of name segments, possibly empty * @return the dot-separated qualified name, or the empty string @@ -2963,7 +2942,6 @@ public static char[] toQualifiedName(char[][] segments) { * toQualifiedName(new String[0]) -> "" * * - *

    * * @param segments the list of name segments, possibly empty * @return the dot-separated qualified name, or the empty string @@ -2989,7 +2967,6 @@ public static String toQualifiedName(String[] segments) { * toString("+QObject;") -> "? extends Object" * * - *

    *

    * Note: This method assumes that a type signature containing a '$' * is an inner type signature. While this is correct in most cases, someone could diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java index a9d4c7a0f..dfe106164 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -411,8 +411,8 @@ public class ToolFactory { * used to tokenize some source in a Java aware way. * Here is a typical scanning loop: * - * *

    +	 * 
     	 *   IScanner scanner = ToolFactory.createScanner(false, false, false, false);
     	 *   scanner.setSource("int i = 0;".toCharArray());
     	 *   while (true) {
    @@ -420,8 +420,8 @@ public class ToolFactory {
     	 *     if (token == ITerminalSymbols.TokenNameEOF) break;
     	 *     System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
     	 *   }
    -	 * 
    * + * * *

    By default the compliance used to create the scanner is the workspace's compliance when running inside the IDE * or 1.4 if running from outside of a headless eclipse. @@ -465,8 +465,8 @@ public class ToolFactory { * used to tokenize some source in a Java aware way. * Here is a typical scanning loop: * - * *

    +	 * 
     	 *   IScanner scanner = ToolFactory.createScanner(false, false, false, false);
     	 *   scanner.setSource("int i = 0;".toCharArray());
     	 *   while (true) {
    @@ -474,8 +474,8 @@ public class ToolFactory {
     	 *     if (token == ITerminalSymbols.TokenNameEOF) break;
     	 *     System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
     	 *   }
    -	 * 
    * + * * *

    By default the compliance used to create the scanner is the workspace's compliance when running inside the IDE * or 1.4 if running from outside of a headless eclipse. @@ -522,8 +522,8 @@ public class ToolFactory { * used to tokenize some source in a Java aware way. * Here is a typical scanning loop: * - * *

    +	 * 
     	 *   IScanner scanner = ToolFactory.createScanner(false, false, false, false);
     	 *   scanner.setSource("int i = 0;".toCharArray());
     	 *   while (true) {
    @@ -531,8 +531,8 @@ public class ToolFactory {
     	 *     if (token == ITerminalSymbols.TokenNameEOF) break;
     	 *     System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
     	 *   }
    -	 * 
    * + * * * @param tokenizeComments if set to false, comments will be silently consumed * @param tokenizeWhiteSpace if set to false, white spaces will be silently consumed, diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/WorkingCopyOwner.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/WorkingCopyOwner.java index 9496e385a..ba7a912eb 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/WorkingCopyOwner.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/WorkingCopyOwner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -136,7 +136,6 @@ public abstract class WorkingCopyOwner { * CompilationUnit cu = (CompilationUnit) parser.createAST(null); * assert cu.getProblems().length == 0; * - *

    * * @param typeName the simple name of the type to lookup * @param packageName the dot-separated name of the package of type @@ -178,7 +177,7 @@ public abstract class WorkingCopyOwner { *

    * A DOM AST created using this working copy will have bindings resolved using the given * classpath, and problem are reported to the given problem requestor. - *

    + *

    * JavaCore#getOptions() is used to create the DOM AST as it is not * possible to set the options on the non-existing Java project. *

    @@ -231,7 +230,7 @@ public abstract class WorkingCopyOwner { * If a DOM AST is created using this working copy, then given classpath will be used * if bindings need to be resolved. Problems will be reported to the problem requestor * of the current working copy owner problem if it is not null. - *

    + *

    * Options used to create the DOM AST are got from {@link JavaCore#getOptions()} * as it is not possible to set the options on a non-existing Java project. *

    diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java index d4788a8e2..f996bc574 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2016 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -109,7 +109,6 @@ public void cleanStarting(IJavaProject project) { *

      * 	javaProject.getProject().isOpen();
      * 
    - *

    * @param project the project to participate in * @return whether this participant is active for a given project */ diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/ICodeSnippetRequestor.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/ICodeSnippetRequestor.java index 435e2880f..9ae7369b5 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/ICodeSnippetRequestor.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/ICodeSnippetRequestor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -153,7 +153,6 @@ public boolean acceptClassFiles(byte[][] classFileBytes, String[][] classFileCom /** * Notifies of an evaluation problem. * Problems can arise for source of the following kinds: - *

    *

      *
    • global variable (VARIABLE) - fragment source is name of * variable
    • @@ -165,7 +164,6 @@ public boolean acceptClassFiles(byte[][] classFileBytes, String[][] classFileCom * package declaration *
    • other (INTERNAL) - no fragment source is involved, internal error occurred.
    • *
    - *

    * @param problemMarker the problem marker (cannot be null) * @param fragmentSource the fragment source * @param fragmentKind the kind of source fragment; one of: diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/IEvaluationContext.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/IEvaluationContext.java index a5f800144..4f14cd522 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/IEvaluationContext.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/eval/IEvaluationContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -26,6 +26,7 @@ import org.eclipse.jdt.core.JavaModelException; * A code snippet is pretty much any valid piece of Java code that could be * pasted into the body of a method and compiled. However, there are two * areas where the rules are slightly more liberal. + *

    *

    * First, a code snippet can return heterogeneous types. Inside the same code * snippet an int could be returned on one line, and a @@ -42,7 +43,6 @@ import org.eclipse.jdt.core.JavaModelException; * } * * - *

    *

    * Second, if the last statement is only an expression, the return * keyword is implied. For example, the following returns false: @@ -52,7 +52,6 @@ import org.eclipse.jdt.core.JavaModelException; * i == 2 * * - *

    *

    * Global variables are an additional feature of evaluation contexts. Within an * evaluation context, global variables maintain their value across evaluations. @@ -80,7 +79,6 @@ import org.eclipse.jdt.core.JavaModelException; * context.evaluateCodeSnippet(codeSnippet, requestor, progressMonitor); * * - *

    *

    * IJavaProject.newEvaluationContext can be used to obtain an * instance. @@ -187,7 +185,6 @@ public interface IEvaluationContext { *

    * Note that code completion does not involve evaluation. *

    - *

    * If {@link IProgressMonitor} is not null then some proposals which * can be very long to compute are proposed. To avoid that the code assist operation * take too much time a {@link IProgressMonitor} which automatically cancel the code @@ -275,7 +272,6 @@ public interface IEvaluationContext { *

    * Note that code completion does not involve evaluation. *

    - *

    * If {@link IProgressMonitor} is not null then some proposals which * can be very long to compute are proposed. To avoid that the code assist operation * take too much time a {@link IProgressMonitor} which automatically cancel the code @@ -395,7 +391,6 @@ public interface IEvaluationContext { *

  • retrieve the values of the local variables, *
  • retrieve the returned value of the code snippet * - *

    *

    * This method is long-running; progress and cancellation are provided * by the given progress monitor. diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/jdom/IDOMNode.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/jdom/IDOMNode.java index 9ca9be23c..2bf5fa5dc 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/jdom/IDOMNode.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/jdom/IDOMNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -48,7 +48,6 @@ import org.eclipse.jdt.core.IJavaElement; *

  • add/insert - this splices an un-parented DF (one that has been cloned, removed, or created stand-alone), * into an existing DF such that the newly inserted DF is only dependent on its new host.
  • * - *

    *

    * Wherever types are specified in DOM APIs, type names must be specified as they would appear * in source code. The DOM does not have a notion of type signatures, only raw text. Example type diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java index 23f801453..c4a942990 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -84,7 +84,6 @@ public final class CompilationUnitSorter { * Integer i2 = (Integer) b2.getProperty(RELATIVE_ORDER); * return i1.intValue() - i2.intValue(); // preserve original order * - *

    * * @see #sort(ICompilationUnit, int[], Comparator, int, IProgressMonitor) * @see org.eclipse.jdt.core.dom.BodyDeclaration @@ -127,34 +126,35 @@ public final class CompilationUnitSorter { * The body declarations passed as parameters to the comparator * always carry at least the following minimal signature information: *
    - * + *
    * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * *
    TypeDeclarationmodifiers, isInterface, name, superclass, + * TypeDeclarationmodifiers, isInterface, name, superclass, * superInterfaces
    * RELATIVE_ORDER property
    FieldDeclarationmodifiers, type, fragments + * FieldDeclarationmodifiers, type, fragments * (VariableDeclarationFragments * with name only)
    * RELATIVE_ORDER property
    MethodDeclarationmodifiers, isConstructor, returnType, name, + * MethodDeclarationmodifiers, isConstructor, returnType, name, * parameters * (SingleVariableDeclarations with name and type only), * thrownExceptions
    * RELATIVE_ORDER property
    Initializermodifiers
    + *
    Initializermodifiers
    * RELATIVE_ORDER property
    + *

    * Clients should not rely on the AST nodes being properly parented or on * having source range information. (Future releases may provide options * for requesting additional information like source positions, full ASTs, @@ -242,51 +242,51 @@ public final class CompilationUnitSorter { * The body declarations passed as parameters to the comparator * always carry at least the following minimal signature information: *
    - * + *
    * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * *
    TypeDeclarationmodifiers, isInterface, name, superclass, + * TypeDeclarationmodifiers, isInterface, name, superclass, * superInterfaces, typeParameters
    * RELATIVE_ORDER property
    FieldDeclarationmodifiers, type, fragments + * FieldDeclarationmodifiers, type, fragments * (VariableDeclarationFragments * with name only)
    * RELATIVE_ORDER property
    MethodDeclarationmodifiers, isConstructor, returnType, name, + * MethodDeclarationmodifiers, isConstructor, returnType, name, * typeParameters, parameters * (SingleVariableDeclarations with name, type, and modifiers only), * thrownExceptions
    * RELATIVE_ORDER property
    Initializermodifiers
    + *
    Initializermodifiers
    * RELATIVE_ORDER property
    AnnotationTypeDeclarationmodifiers, name
    + *
    AnnotationTypeDeclarationmodifiers, name
    * RELATIVE_ORDER property
    AnnotationTypeMemberDeclarationmodifiers, name, type, default
    + *
    AnnotationTypeMemberDeclarationmodifiers, name, type, default
    * RELATIVE_ORDER property
    EnumDeclarationmodifiers, name, superInterfaces
    + *
    EnumDeclarationmodifiers, name, superInterfaces
    * RELATIVE_ORDER property
    EnumConstantDeclarationmodifiers, name, arguments
    + *
    EnumConstantDeclarationmodifiers, name, arguments
    * RELATIVE_ORDER property
    @@ -294,7 +294,6 @@ public final class CompilationUnitSorter { * having source range information. (Future releases may provide options * for requesting additional information like source positions, full ASTs, * non-recursive sorting, etc.) - *

    * * @param level the AST level; one of the {@link AST}.JLS* constants * @param compilationUnit the given compilation unit, which must be a @@ -371,55 +370,54 @@ public final class CompilationUnitSorter { *

    * The body declarations passed as parameters to the comparator always carry * at least the following minimal signature information:
    - * + *
    * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * * - * - * + * * *
    TypeDeclarationmodifiers, isInterface, name, superclass, + * TypeDeclarationmodifiers, isInterface, name, superclass, * superInterfaces, typeParameters
    * RELATIVE_ORDER property
    FieldDeclarationmodifiers, type, fragments + * FieldDeclarationmodifiers, type, fragments * (VariableDeclarationFragments * with name only)
    * RELATIVE_ORDER property
    MethodDeclarationmodifiers, isConstructor, returnType, name, + * MethodDeclarationmodifiers, isConstructor, returnType, name, * typeParameters, parameters * (SingleVariableDeclarations with name, type, and modifiers only), * thrownExceptions
    * RELATIVE_ORDER property
    Initializermodifiers
    + *
    Initializermodifiers
    * RELATIVE_ORDER property
    AnnotationTypeDeclarationmodifiers, name
    + *
    AnnotationTypeDeclarationmodifiers, name
    * RELATIVE_ORDER property
    AnnotationTypeMemberDeclarationmodifiers, name, type, default
    + *
    AnnotationTypeMemberDeclarationmodifiers, name, type, default
    * RELATIVE_ORDER property
    EnumDeclarationmodifiers, name, superInterfaces
    + *
    EnumDeclarationmodifiers, name, superInterfaces
    * RELATIVE_ORDER property
    EnumConstantDeclarationmodifiers, name, arguments
    + *
    EnumConstantDeclarationmodifiers, name, arguments
    * RELATIVE_ORDER property
    - *

    * * @param unit * the CompilationUnit to sort diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java index 53d63ea1f..301b4e5bd 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ExternalAnnotationUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2016 GK Software AG. + * Copyright (c) 2015, 2019 GK Software AG. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -612,7 +612,7 @@ public final class ExternalAnnotationUtil { *
  • prefix up-to the changed type
  • *
  • original type
  • *
  • changed type
  • - *
  • postfix after the changed type (here: empty string)
  • + *
  • postfix after the changed type (here: empty string)
  • * */ public static String[] annotateType(String originalSignature, String annotatedType, MergeStrategy mergeStrategy) @@ -639,7 +639,7 @@ public final class ExternalAnnotationUtil { *
  • prefix up-to the changed type
  • *
  • original type
  • *
  • changed type
  • - *
  • postfix after the changed type (here: empty string)
  • + *
  • postfix after the changed type (here: empty string)
  • * */ public static String[] annotateReturnType(String originalSignature, String annotatedType, MergeStrategy mergeStrategy) diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IStackMapFrame.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IStackMapFrame.java index e6033f684..0f2534c60 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IStackMapFrame.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IStackMapFrame.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -26,8 +26,8 @@ public interface IStackMapFrame { * Answer back the frame type for this entry. * * - * - * + * + * * * * diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/AbstractModule.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/AbstractModule.java index 61316949c..761778fc1 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/AbstractModule.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/AbstractModule.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017, 2018 IBM Corporation and others. + * Copyright (c) 2017, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.jdt.internal.core; +import java.util.ArrayList; import java.util.Arrays; import org.eclipse.jdt.core.IJavaElement; @@ -88,9 +89,29 @@ public interface AbstractModule extends IModuleDescription { default IService[] getProvidedServices() throws JavaModelException { return getModuleInfo().provides(); } + @Override + default String[] getProvidedServiceNames() throws JavaModelException { + ArrayList results = new ArrayList<>(); + IService[] services = getProvidedServices(); + for (IService service : services) { + results.add(new String(service.name())); + } + return results.toArray(new String[0]); + + } default char[][] getUsedServices() throws JavaModelException { return getModuleInfo().uses(); } + @Override + default String[] getUsedServiceNames() throws JavaModelException { + ArrayList results = new ArrayList<>(); + char[][] services = getUsedServices(); + for (int i = 0; i < services.length; ++i) { + char[] service = services[i]; + results.add(new String(service)); + } + return results.toArray(new String[0]); + } default IPackageExport[] getOpenedPackages() throws JavaModelException { return getModuleInfo().opens(); } diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java index c79788ebc..45f3ceed4 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java @@ -2292,7 +2292,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis monitor.subTask(Messages.bind(Messages.build_readStateProgress, project.getName())); info.savedState = readState(project); } catch (CoreException e) { - e.printStackTrace(); + Util.log(e, "Exception while reading last build state for: " + project); //$NON-NLS-1$ } } return info.savedState; diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironment.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironment.java index 4bc371272..0f7c5d756 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironment.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironment.java @@ -107,6 +107,15 @@ public class SearchableEnvironment this.moduleUpdater.computeModuleUpdates(entry); } } + + /** + * Note: this is required for (abandoned) Scala-IDE + */ + @Deprecated + public SearchableEnvironment(JavaProject project, WorkingCopyOwner owner) throws JavaModelException { + this(project, owner, false); + } + /** * Creates a SearchableEnvironment on the given project */ diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml index c73581eb2..01ba33758 100644 --- a/org.eclipse.jdt.core/pom.xml +++ b/org.eclipse.jdt.core/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.core - 3.17.100-SNAPSHOT + 3.18.0-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/IJavaSearchConstants.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/IJavaSearchConstants.java index 0751f7160..d7c0f9260 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/IJavaSearchConstants.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/IJavaSearchConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -339,7 +339,7 @@ public interface IJavaSearchConstants { * * Searching references to the type Test using this flag in the * above snippet will match only the reference in italic. - *

    + *

    * Note that array creations are not returned when using this flag. *

    * @since 3.4 @@ -438,7 +438,6 @@ public interface IJavaSearchConstants { *
  • for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned.
  • * - *

    * @since 3.4 * @category limitTo */ @@ -455,7 +454,6 @@ public interface IJavaSearchConstants { *
  • for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned.
  • * - *

    * @since 3.4 * @category limitTo */ @@ -473,7 +471,6 @@ public interface IJavaSearchConstants { *
  • for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned.
  • * - *

    * @since 3.4 * @category limitTo */ @@ -490,7 +487,6 @@ public interface IJavaSearchConstants { *
  • for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned.
  • * - *

    * @since 3.4 * @category limitTo */ diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/ReferenceMatch.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/ReferenceMatch.java index 7daaec238..951eba95f 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/ReferenceMatch.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/ReferenceMatch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -87,7 +87,7 @@ public ReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, i * is the {@link IAnnotation} 'Num'.

    * * - *

    + *

    * A local element may also be a {@link ILocalVariable} whose type is the referenced * type. For example, *

      @@ -112,10 +112,9 @@ public ReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, i * will return one {@link TypeReferenceMatch} match whose local element * is the {@link ITypeParameter} 'T'.

      *
    - *

    * * @return the local element of this search match, or null if none. - * + * * @since 3.4 */ final public IJavaElement getLocalElement() { diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java index 54e260189..19d37e3bd 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -1440,8 +1440,8 @@ public class SearchEngine { * Reports the field declarations using the given requestor. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *			int field1;
     	 *		}
    @@ -1454,8 +1454,9 @@ public class SearchEngine {
     	 *				System.out.println(b.value + b.field1);
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of accessed fields in method * X.test() would collect the fields * B.value and A.field1. @@ -1482,8 +1483,8 @@ public class SearchEngine { * Reports the field declarations using the given collector. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *			int field1;
     	 *		}
    @@ -1496,8 +1497,9 @@ public class SearchEngine {
     	 *				System.out.println(b.value + b.field1);
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of accessed fields in method * X.test() would collect the fields * B.value and A.field1. @@ -1524,8 +1526,8 @@ public class SearchEngine { * Reports the type declarations using the given requestor. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *		}
     	 *		class B extends A {
    @@ -1539,8 +1541,9 @@ public class SearchEngine {
     	 *				this.foo(b, I.VALUE);
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of referenced types in method X.test() * would collect the class B and the interface I. *

    @@ -1566,8 +1569,8 @@ public class SearchEngine { * Reports the type declarations using the given collector. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *		}
     	 *		class B extends A {
    @@ -1581,8 +1584,9 @@ public class SearchEngine {
     	 *				this.foo(b, I.VALUE);
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of referenced types in method X.test() * would collect the class B and the interface I. *

    @@ -1608,8 +1612,8 @@ public class SearchEngine { * Reports the method declarations using the given requestor. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *			void foo() {};
     	 *			void bar() {};
    @@ -1625,8 +1629,9 @@ public class SearchEngine {
     	 *				b.bar();
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of sent messages in method * X.test() would collect the methods * A.foo(), B.foo(), and A.bar(). @@ -1653,8 +1658,8 @@ public class SearchEngine { * Reports the method declarations using the given collector. *

    * Consider the following code: - * *

    +	 * 
     	 *		class A {
     	 *			void foo() {};
     	 *			void bar() {};
    @@ -1670,8 +1675,9 @@ public class SearchEngine {
     	 *				b.bar();
     	 *			};
     	 *		}
    -	 * 
    * + * + *

    * then searching for declarations of sent messages in method * X.test() would collect the methods * A.foo(), B.foo(), and A.bar(). diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java index 8888e449f..3a94c4e4b 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -42,14 +42,14 @@ import org.eclipse.jdt.internal.core.search.indexing.IndexManager; *

  • {@link #scheduleDocumentIndexing(SearchDocument, IPath)}
  • *
  • {@link #indexDocument(SearchDocument, IPath)}
  • * + *

    * During the search phase, a subclass will be called with the following requests in order: *

      *
    • {@link #selectIndexes(SearchPattern, IJavaSearchScope)}
    • *
    • one or more {@link #getDocument(String)}
    • *
    • {@link #locateMatches(SearchDocument[], SearchPattern, IJavaSearchScope, SearchRequestor, IProgressMonitor)}
    • *
    - *

    - * + * * @since 3.0 */ public abstract class SearchParticipant { diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java index 037dbd2df..31df46500 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -379,7 +379,6 @@ public SearchPattern currentPattern() { * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap', * 'HatMapper' and also 'HashMapEntry'. *

    - *

      * Examples:
      * 
    1. pattern = "NPE" * name = NullPointerException / NoPermissionException @@ -399,7 +398,7 @@ public SearchPattern currentPattern() { *
    2. pattern = "HMap" * name = "HatMapper" * result => true
    3. - *
    + * * * @see #camelCaseMatch(String, int, int, String, int, int, boolean) for algorithm * implementation @@ -449,7 +448,6 @@ public static final boolean camelCaseMatch(String pattern, String name) { * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *

    - *

      * Examples:
      * 
    1. pattern = "NPE" * name = NullPointerException / NoPermissionException @@ -466,7 +464,7 @@ public static final boolean camelCaseMatch(String pattern, String name) { *
    2. pattern = "HM" * name = "HashMapEntry" * result => (samePartCount == false)
    3. - *
    + * * * @see #camelCaseMatch(String, int, int, String, int, int, boolean) for algorithm * implementation @@ -529,8 +527,7 @@ public static final boolean camelCaseMatch(String pattern, String name, boolean * pattern (see {@link #camelCaseMatch(String, int, int, String, int, int, boolean)}).
    * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap', * 'HatMapper' and also 'HashMapEntry'. - *

    - *

    Examples:
      + *
        *
      1. pattern = "NPE" * patternStart = 0 * patternEnd = 3 @@ -587,7 +584,7 @@ public static final boolean camelCaseMatch(String pattern, String name, boolean * nameStart = 0 * nameEnd = 9 * result => true
      2. - *
    + * * * @param pattern the given pattern * @param patternStart the start index of the pattern, inclusive @@ -636,7 +633,8 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *

    - *

    Examples:
      + * Examples: + *
        *
      1. pattern = "NPE" * patternStart = 0 * patternEnd = 3 @@ -686,7 +684,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int * nameStart = 0 * nameEnd = 12 * result => (samePartCount == false)
      2. - *
    + * * * @see CharOperation#camelCaseMatch(char[], int, int, char[], int, int, boolean) * from which algorithm implementation has been entirely copied. @@ -716,7 +714,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int /** * Answers all the regions in a given name matching a given pattern using * a specified match rule. - *

    + *

    * Each of these regions is made of its starting index and its length in the given * name. They are all concatenated in a single array of int * which therefore always has an even length. @@ -739,7 +737,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int * Each of these rules may be combined with the * {@link #R_CASE_SENSITIVE case sensitive flag} if the match comparison * should respect the case. - *

    + * 

    * Examples: *

    1. pattern = "NPE" * name = NullPointerException / NoPermissionException @@ -765,7 +763,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int * name = "HashMapEntry" * matchRule = {@link #R_PATTERN_MATCH} * result: { 0, 2, 4, 1, 7, 3 }
    2. - *
    + * * * @see #camelCaseMatch(String, String, boolean) for more details on the * camel case behavior @@ -1550,10 +1548,10 @@ private static SearchPattern createPackagePattern(String patternString, int limi * *
  • All other fine grain constants defined in the limitTo category * of the {@link IJavaSearchConstants} are also accepted nature: - *
  • TypeRangeTypeRange
    SAME
    + *
    * - * *
    Fine grain constant - * Meaning + * Fine grain constant + * Meaning *
    {@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE} * Return only type references used as the type of a field declaration. @@ -1736,10 +1734,10 @@ public static SearchPattern createPattern(String stringPattern, int searchFor, i * *
  • All other fine grain constants defined in the limitTo category * of the {@link IJavaSearchConstants} are also accepted nature: - * + *
    * - * *
    Fine grain constant - * Meaning + * Fine grain constant + * Meaning *
    {@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE} * Return only type references used as the type of a field declaration. @@ -1848,10 +1846,10 @@ public static SearchPattern createPattern(IJavaElement element, int limitTo) { * *
  • All other fine grain constants defined in the limitTo category * of the {@link IJavaSearchConstants} are also accepted nature: - * + *
    * - * *
    Fine grain constant - * Meaning + * Fine grain constant + * Meaning *
    {@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE} * Return only type references used as the type of a field declaration. diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java index 7b6f2e20d..86e499da8 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -226,7 +226,7 @@ protected ReferenceBinding checkMethodRef(MethodBinding method, ReferenceExpress if (result) { Expression lhs = referenceExpression.lhs; if (lhs instanceof NameReference) { - Binding binding = ((NameReference) lhs).binding; + Binding binding = ((NameReference) lhs).resolvedType; if (binding instanceof ReferenceBinding) return (ReferenceBinding) binding; } -- cgit v1.2.3