Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionIn the JLS22 API, this method is replaced by
TypePattern.setPatternVariable(VariableDeclaration patternVariable)
-
Deprecated InterfacesInterfaceDescriptionUse
WorkingCopyOwnerinsteadUseCompletionRequestorinstead.UseCodeFormatterinstead (note: options have changed)UseCompletionRequestorinstead.UseICompilationUnitinsteadThe JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.Since 3.0, the classSearchRequestorreplaces this interface.Since 3.0, the classSearchPatternreplaces this interface.Use abstract classTypeNameRequestorinstead.UseClassFileBytesDisassemblerinsteadUseCompletionRequestorinstead
-
Deprecated ClassesClassDescriptionSubclass
CompletionRequestorinstead.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.The JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.
-
Deprecated Exception ClassesException ClassDescriptionThe JDOM was made obsolete by the addition in 2.0 of the more powerful, fine-grained DOM/AST API found in the org.eclipse.jdt.core.dom package.
-
Deprecated FieldsFieldDescription- problem is no longer generated (code is legite)- problem is no longer generated, use
IProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.CannotAllocateVoidArrayinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinstead- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinstead- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinstead- problem could not be reported, enums cannot be local takes precedence- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.NotVisibleTypeinstead- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinstead- problem is no longer generated- problem is no longer generated (implementation issue has been resolved)- problem is no longer generated, useIProblem.RedundantNullCheckOnNonNullLocalVariableinstead- problem is no longer generated, useIProblem.NullLocalVariableReference,IProblem.RedundantNullCheckOnNullLocalVariableorIProblem.RedundantLocalVariableNullAssignmentinstead- problem is no longer generated, useIProblem.PotentialNullLocalVariableReferenceinsteadThis problem is no longer reported; number Of functional interface is not an issue, number of abstract methods is.- problem is no longer generated- problem is no longer generated, useIProblem.OuterLocalMustBeEffectivelyFinalinsteadproblem no longer generated- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.CannotAllocateVoidArrayinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinsteadproblem no longer generatedproblem no longer generatedproblem no longer generated- problem is no longer generated, useIProblem.AmbiguousTypeinstead- problem is no longer generated, useIProblem.InheritedTypeHidesEnclosingNameinstead- problem is no longer generated, useIProblem.InternalTypeNameProvidedinstead- problem is no longer generated, useIProblem.UndefinedTypeinstead- problem is no longer generated, useIProblem.NotVisibleTypeinsteadpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedpreview related error - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedno longer issued - will be removedpreview related error - will be removedpreview related error - will be removed- no longer generated, useIProblem.UnnecessaryCastinstead- problem is no longer generated, useIProblem.CannotAllocateVoidArrayinsteadWith the introduction of "restricted keywords" in Java 9, classification of tokens by a scanner is inherently unreliable. Any token classified as an identifier could still be a "restricted keyword". Future versions of Java will introduce more words that have special syntactical meaning in specific contexts. For reliably detecting an identifier the only real solution is to use a parser instead (see also the caveat at the top of the interface documentation ofIScanner).In the JLS8 API, this property is replaced byArrayType.ELEMENT_TYPE_PROPERTYandArrayType.DIMENSIONS_PROPERTY.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.Clients should use theAST.getJLSLatest()AST API instead.In the JLS3 API, this property is replaced byClassInstanceCreation.TYPE_PROPERTY.In the JLS3 API, this property is replaced byFieldDeclaration.MODIFIERS2_PROPERTY.In the JLS3 API, this property is replaced byInitializer.MODIFIERS2_PROPERTY.Replaced byJavadoc.TAGS_PROPERTYin the JLS3 API.In JLS8 and later, useMethodDeclaration.EXTRA_DIMENSIONS2_PROPERTYinstead.In the JLS3 API, this property is replaced byMethodDeclaration.MODIFIERS2_PROPERTY.In the JLS3 API, this property is replaced byMethodDeclaration.RETURN_TYPE2_PROPERTY.In JLS8 and later, useMethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTYinstead.use pattern property instead from Java 20 onwardsIn JLS8 and later, useSingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTYinstead.In the JLS3 API, this property is replaced bySingleVariableDeclaration.MODIFIERS2_PROPERTY.In the JLS 12 15.28.1 API, this property is replaced bySwitchCase.EXPRESSIONS2_PROPERTY.In the JLS9 API, this property is replaced byTryStatement.RESOURCES2_PROPERTY.In the JLS3 API, this property is replaced byTypeDeclaration.MODIFIERS2_PROPERTY.In the JLS3 API, this property is replaced byTypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY.In the JLS3 API, this property is replaced byTypeDeclaration.SUPERCLASS_TYPE_PROPERTY.In the JLS3 API, this property is replaced byTypeDeclarationStatement.DECLARATION_PROPERTY.In the JLS22 API, this property is replaced byVariableDeclaration.In the JLS3 API, this property is replaced byVariableDeclarationExpression.MODIFIERS2_PROPERTY.in JLS8 and later, useVariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTYinstead.In the JLS3 API, this property is replaced byVariableDeclarationStatement.MODIFIERS2_PROPERTY.- no longer used, such deltas are now notified during POST_CHANGEUse new settings instead:DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATORUse multiple settings for each kind of comments. SeeDefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT,DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENTandDefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT.All new options must be enabled to activate old strategyDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBERDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLEDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETERAll new options must be enabled to activate old strategyDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELDDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHODDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGEDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPEUseDefaultCodeFormatterConstants.FORMATTER_KEEP_IF_THEN_BODY_BLOCK_ON_ONE_LINE,DefaultCodeFormatterConstants.FORMATTER_KEEP_LOOP_BODY_BLOCK_ON_ONE_LINE,DefaultCodeFormatterConstants.FORMATTER_KEEP_CODE_BLOCK_ON_ONE_LINE, andDefaultCodeFormatterConstants.FORMATTER_KEEP_LAMBDA_BODY_BLOCK_ON_ONE_LINEinstead.Use the new settings instead:DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_MULTIPLICATIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ADDITIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_STRING_CONCATENATION,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_SHIFT_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_RELATIONAL_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_BITWISE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_LOGICAL_OPERATORUse the new settings instead:DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_MULTIPLICATIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ADDITIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_STRING_CONCATENATION,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SHIFT_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_RELATIONAL_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_BITWISE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_LOGICAL_OPERATORUse the new options instead:DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION,DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR,DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATORUseIJavaElementDelta.F_REORDERinstead.- this option has no effectthis option is implicitly enabled and can't be switched off anymore- this option has no effectUseJavaCore.COMPILER_PB_NULL_REFERENCEinstead.Discontinued since turning off would violate language specs.Discontinued since turning off would violate language specs.UseJavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATIONinstead.UseJavaCore.DEFAULT_TASK_PRIORITIESinstead.UseJavaCore.DEFAULT_TASK_TAGSinstead.UseDefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT,DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT,DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT,DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENTinstead.UseDefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ANONYMOUS_TYPE_DECLARATION,DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK,DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION,DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION,DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH,DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATIONinstead.UseDefaultCodeFormatterConstants.FORMATTER_TAB_CHARinstead.UseDefaultCodeFormatterConstants.FORMATTER_TAB_SIZEinstead.Use the methods that take the matchMode withoutSearchPattern.R_CASE_SENSITIVEas a matchRule instead.Use the methods that take the matchMode withSearchPattern.R_CASE_SENSITIVEas a matchRule instead.UseSearchPattern.R_EXACT_MATCHinstead.UseSearchPattern.R_PATTERN_MATCHinstead.UseSearchPattern.R_PREFIX_MATCHinstead.UseSearchMatch.A_ACCURATEinstead.UseSearchMatch.A_INACCURATEinstead.
-
Deprecated MethodsMethodDescriptioncan not be implemented for bytecode weaving, may be removed in 1.1gold.This method is missing crucial information necessary for proper wildcard binding key creation.JLS3 has been deprecated. This method has been replaced by
ReconcileContext.getAST4()which returns an AST with JLS4 level.JLS4 has been deprecated. This method has been replaced byReconcileContext.getAST8()which returns an AST with JLS8 level.JLS8 has been deprecated. This method has been replaced byReconcileContext.getAST(int)which returns an AST with the given level.In the JLS8 API, the recursive structure is not valid.In the JLS8 API, the recursive structure is not valid.Use org.eclipse.jdt.core.dom.AST.convertCompilationUnit(int, CompilationUnitDeclaration, Map, boolean, CompilationUnit, int, IProgressMonitor) insteadClients should port their code to use the latest JLS* AST API and callAST.newAST(AST.getJLSLatest(), false)instead of using this constructor.UseASTParserinstead.UseASTParserinstead.UseASTParserinstead.UseASTParserinstead.In the JLS3 API, this method is replaced byBodyDeclaration.modifiers(), which contains a list ofModifiernodes.In the JLS3 API, this method is replaced byClassInstanceCreation.getType(), which returns aTypeinstead of aName.In the JLS3 API, this method is replaced byClassInstanceCreation.setType(Type), which expects aTypeinstead of aName.Use getLineNumber(int) instead. Be careful to handle the negative values.UseITypeBinding.getModifiers()instead. This method was never implemented properly and historically has simply delegated to the methodgetModifiers. Clients should callgetModifiersmethod directly.The comment string was replaced in the 3.0 release by a representation of the structure of the doc comment. Seetags.The comment string was replaced in the 3.0 release by a representation of the structure of the doc comment. Seetags.UseMessage.getStartPosition()instead.In the JLS3 API, this method is replaced byMethodDeclaration.getReturnType2(), which may returnnull.In the JLS8 API, this method is replaced byMethodDeclaration.extraDimensions()which contains a list ofDimensionnodes.In the JLS3 API, this method is replaced byMethodDeclaration.setReturnType2(Type), which acceptsnull.In the JLS8 API, this method is replaced byMethodDeclaration.thrownExceptionTypes().In the JLS3 API, this method is replaced bySingleVariableDeclaration.modifiers()which contains a list of aModifiernodes.This feature was removed in the 2.1 release because it was only a partial, and inadequate, solution to the issue of associating comments with statements. Furthermore, AST.parseCompilationUnit did not associate leading comments, making this moot. Clients that need to access comments preceding a statement should either consult the compilation unit's comment table or use a scanner to reanalyze the source text immediately preceding the statement's source range.This feature was removed in the 2.1 release because it was only a partial, and inadequate, solution to the issue of associating comments with statements.use expressions() (see JLS 12)see JLS 12In the JLS3 API, this method is replaced byTypeDeclaration.getSuperclassType(), which returns aTypeinstead of aName.In the JLS3 API, this method is replaced byTypeDeclaration.setSuperclassType(Type), which expects aTypeinstead of aName.In the JLS3 API, this method is replaced byTypeDeclaration.superInterfaceTypes().In the JLS3 API, this method is replaced byTypeDeclarationStatement.getDeclaration(), which returnsAbstractTypeDeclarationinstead ofTypeDeclaration.In the JLS3 API, this method is replaced byTypeDeclarationStatement.setDeclaration(AbstractTypeDeclaration)which takesAbstractTypeDeclarationinstead ofTypeDeclaration.In the JLS22 API, this method is replaced byTypePattern.setPatternVariable(VariableDeclaration patternVariable)In JLS8 and later, useVariableDeclaration.getExtraDimensions2Property()instead.In the JLS8 API, this method is replaced byVariableDeclaration.extraDimensions()which contains a list ofDimensionnodes.In the JLS3 API, this method is replaced byVariableDeclarationExpression.modifiers()which contains a list of aModifiernodes.In the JLS3 API, this method is replaced byVariableDeclarationStatement.modifiers()which contains a list of aModifiernodes.- use codeComplete(String, int, ICompletionRequestor) insteadUseITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor)instead. Note that if this deprecated method is used, problems will be reported to the given problem requestor as well as the problem requestor returned by the working copy owner (if not null).should only be used asIOrdinaryClassFile.getType().UseICodeAssist.codeComplete(int, ICompletionRequestor)instead.UseICodeAssist.codeComplete(int, CompletionRequestor)instead.UseICompilationUnit.becomeWorkingCopy(IProgressMonitor)instead. Note that if this deprecated method is used, problems will be reported to the given problem requestor as well as the problem requestor returned by the working copy owner (if not null).UseITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor)instead. Note that if this deprecated method is used, problems will be reported on the passed problem requester as well as on the problem requestor returned by the working copy owner (if not null).UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.completionFailure(IProblem)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseCompletionRequestor.accept(CompletionProposal)instead.UseIStatus.getMessage()insteadUseIMethod.getTypeParameters()insteadClients are advised to specifically use eitherIPackageFragment.getOrdinaryClassFiles()orIPackageFragment.getAllClassFiles()to express their intent.UseICompilationUnit.discardWorkingCopy()instead.UseICompilationUnit.findElements(IJavaElement)instead.UseITypeRoot.findPrimaryType()instead.UseICompilationUnit.findWorkingCopy(WorkingCopyOwner)instead.UseIJavaElement.getPrimaryElement()instead.UseIJavaElement.getPrimaryElement()instead.UseICompilationUnit.getWorkingCopy(IProgressMonitor)instead.UseICompilationUnit.hasResourceChanged()instead.UseICompilationUnit.isWorkingCopy()instead.UseICompilationUnit.restore()instead.Overlapping roots are allowed in 2.1use addPreProcessingResourceChangedListener(listener, IResourceChangeEvent.POST_CHANGE) insteadThis method cannot distinguish strategies for old (9/10) vs new (11+) JDK versions. Please useJavaCore.defaultRootModules(Iterable, String)UseJavaCore.getWorkingCopies(WorkingCopyOwner)insteadUseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_PARAMETERas variable kind.UseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_PARAMETERas variable kind.UseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_INSTANCE_FIELDorNamingConventions.VK_STATIC_FIELDas variable kind.UseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_INSTANCE_FIELDorNamingConventions.VK_STATIC_FIELDas variable kind.UseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_LOCALas variable kind.UseNamingConventions.getBaseName(int, String, IJavaProject)instead withNamingConventions.VK_LOCALas variable kind.UseNamingConventions.suggestVariableNames(int, int, String, IJavaProject, int, String[], boolean)instead withNamingConventions.VK_PARAMETERas variable kind.UseNamingConventions.suggestVariableNames(int, int, String, IJavaProject, int, String[], boolean)instead withNamingConventions.VK_PARAMETERas variable kind.UseNamingConventions.suggestVariableNames(int, int, String, IJavaProject, int, String[], boolean)instead withNamingConventions.VK_LOCALas variable kind.UseNamingConventions.suggestVariableNames(int, int, String, IJavaProject, int, String[], boolean)instead withNamingConventions.VK_LOCALas variable kind.this provisional API has been promoted toIModuleDescription.getRequiredModuleNames()please useIModuleDescription.isSystemModule()Replaced bySearchRequestor.beginReporting().Replaced bySearchRequestor.acceptSearchMatch(SearchMatch).Replaced bySearchRequestor.endReporting().UseSearchEngine.createJavaSearchScope(IJavaElement[])with the package fragment roots that correspond to the binaries instead.UseSearchEngine.createJavaSearchScope(IJavaElement[])with a Java project instead.UseSearchEngine.createJavaSearchScope(IJavaElement[])with the package fragment roots that correspond to the binaries instead.UseSearchEngine.createJavaSearchScope(IJavaElement[])with a Java project instead.UseSearchEngine.createJavaSearchScope(IJavaElement[])instead.UseSearchPattern.createPattern(String, int, int, int)instead.UseSearchPattern.createPattern(IJavaElement, int)instead.org.aspectj.org.eclipse.jdt.core.search.SearchPattern.createAndPattern(SearchPattern, SearchPattern) Unfortunately, this functionality is not fully supported yet (see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=142044" for more details). This might be done in a further version...The extension point has been deprecated, useToolFactory.createCodeFormatter(Map)instead.UseToolFactory.createCodeFormatter(Map)instead but note the different optionsThis has been replaced withIBytecodeVisitor._invokedynamic(int, int, IConstantPoolEntry)Clients should port their code to use the new JLS3 AST API and callCompilationUnitSorter.sort(AST.JLS3, compilationUnit, positions, comparator, options, monitor)instead of using this method.This has been replaced withIBytecodeVisitor._invokedynamic(int, int, IConstantPoolEntry)UseWorkingCopyOwner.newWorkingCopy(String, IClasspathEntry[], IProgressMonitor)instead. Note that if this deprecated method is used, problems may be reported twice if the given requestor is not the same as the current working copy owner one.- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)instead e.g. BatchCompiler.compile(commandLine, new PrintWriter(System.out), new PrintWriter(System.err), null);- useBatchCompiler.compile(String, PrintWriter, PrintWriter, CompilationProgress)instead e.g. BatchCompiler.compile(commandLine, outWriter, errWriter, null);- useMain.initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g. initialize(outWriter, errWriter, systemExit, null, null)- useMain.initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g. initialize(outWriter, errWriter, systemExit, customDefaultOptions, null)useJRTUtil.getJrtSystem(File, String)instead- should use codeComplete(int, ICompletionRequestor) insteadorg.aspectj.org.eclipse.jdt.internal.core.builder.ReferenceCollection.includes(char[][][], char[][]) org.aspectj.org.eclipse.jdt.internal.core.builder.ReferenceCollection.internSimpleNames(Set<String>) - use codeComplete(int, ICompletionRequestor)- use codeComplete(String, int, ICompletionRequestor) insteadThis method may not do what you expect from its name (see bug 571614):On Linux/Mac (CASE_SENSITIVE by default) it does nothing - even when pointing to a case insensitive filesystem.
On Windows (CASE_INSENSITIVE by default) it will find the actual capitalization of all path segments. On Windows it will also resolve 8.3 filenames to its long names. On Windows this results in slow system calls for every segment of the path since JDK 12 (see https://bugs.openjdk.java.net/browse/JDK-8207005) - even when the filesystem is configured to be case sensitive and 8.3 name resolving is disabled.
ALTERNATIVES:
For package fragments use
JavaProject.createPackageFragementKey(org.eclipse.core.runtime.IPath)For comparing files use
Files.isSameFile(java.nio.file.Path, java.nio.file.Path)For getting the actual capitalization use
Path.toRealPath(java.nio.file.LinkOption...)This method cannot distinguish strategies for old (9/10) vs new (11+) JDK versions. Please useJavaProject.defaultRootModules(Iterable, String)should only be used asIOrdinaryClassFile.getType().use getFile() or getClassLoaderName()use couldMatchJoinPointsInType(Class,MatchingContext) instead
-
Deprecated ConstructorsConstructorDescriptionUse SYSTEM_CLASS_PATH constantClients should port their code to use the latest JLS* AST API and call
AST.newAST(AST.getJLSLatest, false)instead of using this constructor.UseSearchEngine(ICompilationUnit[])instead.- useMain(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, null, null)- useMain(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)instead e.g. Main(outWriter, errWriter, systemExitWhenFinished, customDefaultOptions, null)used to preserve 3.1 and 3.2M4 compatibility of some Compiler constructorsShould pass a javaElement viaBasicCompilationUnit(char[], char[][], String, IJavaElement).