Uses of Class
org.eclipse.jdt.core.dom.CompilationUnit
Package
Description
This package contains Eclipse extensions to some of the Sun annotation processing APIs.
The Java model is the set of classes that model the
objects associated with creating, editing, and building a Java program.
This package contains compiler associated infrastructure APIs.
The Java DOM/AST is the set of classes that model the source code of a Java program
as a structured document.
The Java DOM/AST rewrite is the set of classes that are used to make changes to an existing DOM/AST tree.
Application programming interface for the JDT core manipulation plug-in class.
Provides a set of tools and utilities for manipulating .class files and Java model elements.
Application programming interfaces for interaction
with the Eclipse Java User Interface.
Application programming interfaces for Eclipse Java User Interface specific
actions.
Application programming interfaces for code clean up.
Application programming interfaces for correction proposals.
-
Uses of CompilationUnit in org.eclipse.jdt.apt.core.env
Modifier and TypeMethodDescriptionEclipseAnnotationProcessorEnvironment.getAST()
Return the AST of the file currently being processed. -
Uses of CompilationUnit in org.eclipse.jdt.core
Modifier and TypeMethodDescriptionIJavaElementDelta.getCompilationUnitAST()
Returns the compilation unit AST created by the last reconcile operation on this delta's element.ICompilationUnit.reconcile
(int astLevel, boolean forceProblemDetection, boolean enableStatementsRecovery, WorkingCopyOwner owner, org.eclipse.core.runtime.IProgressMonitor monitor) Reconciles the contents of this working copy, sends out a Java delta notification indicating the nature of the change of the working copy since the last time it was either reconciled or made consistent (IOpenable.makeConsistent(IProgressMonitor)
), and returns a compilation unit AST if requested.ICompilationUnit.reconcile
(int astLevel, boolean forceProblemDetection, WorkingCopyOwner owner, org.eclipse.core.runtime.IProgressMonitor monitor) Reconciles the contents of this working copy, sends out a Java delta notification indicating the nature of the change of the working copy since the last time it was either reconciled or made consistent (IOpenable.makeConsistent(IProgressMonitor)
), and returns a compilation unit AST if requested.ICompilationUnit.reconcile
(int astLevel, int reconcileFlags, WorkingCopyOwner owner, org.eclipse.core.runtime.IProgressMonitor monitor) Reconciles the contents of this working copy, sends out a Java delta notification indicating the nature of the change of the working copy since the last time it was either reconciled or made consistent (IOpenable.makeConsistent(IProgressMonitor)
), and returns a compilation unit AST if requested. -
Uses of CompilationUnit in org.eclipse.jdt.core.compiler
Modifier and TypeMethodDescriptionReconcileContext.getAST
(int level) Returns a resolved AST with the given AST level.ReconcileContext.getAST3()
Deprecated.JLS3 has been deprecated.ReconcileContext.getAST4()
Deprecated.JLS4 has been deprecated.ReconcileContext.getAST8()
Deprecated.JLS8 has been deprecated. -
Uses of CompilationUnit in org.eclipse.jdt.core.dom
Modifier and TypeMethodDescriptionstatic CompilationUnit
AST.convertCompilationUnit
(int level, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration, char[] source, Map options, boolean isResolved, org.eclipse.jdt.internal.core.CompilationUnit workingCopy, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) Deprecated.Use org.eclipse.jdt.core.dom.AST.convertCompilationUnit(int, CompilationUnitDeclaration, Map, boolean, CompilationUnit, int, IProgressMonitor) insteadstatic CompilationUnit
AST.convertCompilationUnit
(int level, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration, Map options, boolean isResolved, org.eclipse.jdt.internal.core.CompilationUnit workingCopy, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) Internal method.AST.newCompilationUnit()
Creates an unparented compilation unit node owned by this AST.static CompilationUnit
AST.parseCompilationUnit
(char[] source) Deprecated.UseASTParser
instead.static CompilationUnit
AST.parseCompilationUnit
(char[] source, String unitName, IJavaProject project) Deprecated.UseASTParser
instead.static CompilationUnit
AST.parseCompilationUnit
(IClassFile classFile, boolean resolveBindings) Deprecated.UseASTParser
instead.static CompilationUnit
AST.parseCompilationUnit
(ICompilationUnit unit, boolean resolveBindings) Deprecated.UseASTParser
instead.Modifier and TypeMethodDescriptionvoid
ASTRequestor.acceptAST
(ICompilationUnit source, CompilationUnit ast) Accepts an AST corresponding to the compilation unit.void
FileASTRequestor.acceptAST
(String sourceFilePath, CompilationUnit ast) Accepts an AST corresponding to the compilation unit.void
ASTVisitor.endVisit
(CompilationUnit node) End of visit the given type-specific AST node.boolean
ASTMatcher.match
(CompilationUnit node, Object other) Returns whether the given node and the other object match.boolean
ASTVisitor.visit
(CompilationUnit node) Visits the given type-specific AST node. -
Uses of CompilationUnit in org.eclipse.jdt.core.dom.rewrite
Modifier and TypeMethodDescriptionstatic ImportRewrite
ImportRewrite.create
(CompilationUnit astRoot, boolean restoreExistingImports) Creates anImportRewrite
from an AST (CompilationUnit
). -
Uses of CompilationUnit in org.eclipse.jdt.core.manipulation
Modifier and TypeMethodDescriptionCleanUpContextCore.getAST()
Deprecated, for removal: This API element is subject to removal in a future version.An AST built from the compilation unit to fix.CoreASTProvider.getAST
(ITypeRoot input, CoreASTProvider.WAIT_FLAG waitFlag, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns a shared compilation unit AST for the given Java element.static CompilationUnit
SharedASTProviderCore.getAST
(ITypeRoot element, SharedASTProviderCore.WAIT_FLAG waitFlag, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns a compilation unit AST for the given Java element.CoreASTProvider.getCachedAST()
Modifier and TypeMethodDescriptionvoid
CoreASTProvider.cache
(CompilationUnit ast, ITypeRoot javaElement) Caches the given compilation unit AST for the given Java element.static ImportRewrite
CodeStyleConfiguration.createImportRewrite
(CompilationUnit astRoot, boolean restoreExistingImports) Returns aImportRewrite
usingImportRewrite.create(CompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences.void
CoreASTProvider.reconciled
(CompilationUnit ast, ITypeRoot javaElement, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Update internal structures after reconcile.ModifierConstructorDescriptionCleanUpContextCore
(ICompilationUnit unit, CompilationUnit ast) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new clean up context.OrganizeImportsOperation
(ICompilationUnit cu, CompilationUnit astRoot, boolean ignoreLowerCaseNames, boolean save, boolean allowSyntaxErrors, OrganizeImportsOperation.IChooseImportQuery chooseImportQuery) Creates a new OrganizeImportsOperation operation.OrganizeImportsOperation
(ICompilationUnit cu, CompilationUnit astRoot, boolean ignoreLowerCaseNames, boolean save, boolean allowSyntaxErrors, OrganizeImportsOperation.IChooseImportQuery chooseImportQuery, boolean restoreExistingImports) Creates a new OrganizeImportsOperation operation. -
Uses of CompilationUnit in org.eclipse.jdt.core.util
Modifier and TypeMethodDescriptionstatic org.eclipse.text.edits.TextEdit
CompilationUnitSorter.sort
(CompilationUnit unit, Comparator comparator, int options, org.eclipse.text.edits.TextEditGroup group, org.eclipse.core.runtime.IProgressMonitor monitor) Reorders the declarations in the given compilation unit according to the specified comparator. -
Uses of CompilationUnit in org.eclipse.jdt.ui
Modifier and TypeMethodDescriptionstatic CompilationUnit
SharedASTProvider.getAST
(ITypeRoot element, SharedASTProvider.WAIT_FLAG waitFlag, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Deprecated.Returns a compilation unit AST for the given Java element.Modifier and TypeMethodDescriptionstatic ImportRewrite
CodeStyleConfiguration.createImportRewrite
(CompilationUnit astRoot, boolean restoreExistingImports) Returns aImportRewrite
usingImportRewrite.create(CompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences. -
Uses of CompilationUnit in org.eclipse.jdt.ui.actions
Modifier and TypeMethodDescriptionstatic org.eclipse.core.resources.IWorkspaceRunnable
AddUnimplementedConstructorsAction.createRunnable
(CompilationUnit astRoot, ITypeBinding type, IMethodBinding[] constructorsToOverride, int insertPos, boolean createComments, int visibility, boolean omitSuper) Returns a runnable that creates the constructor stubs.static org.eclipse.core.resources.IWorkspaceRunnable
OverrideMethodsAction.createRunnable
(CompilationUnit astRoot, ITypeBinding type, IMethodBinding[] methodToOverride, int insertPos, boolean createComments) Returns a runnable that creates the method stubs for overridden methods. -
Uses of CompilationUnit in org.eclipse.jdt.ui.cleanup
ModifierConstructorDescriptionCleanUpContext
(ICompilationUnit unit, CompilationUnit ast) Creates a new clean up context. -
Uses of CompilationUnit in org.eclipse.jdt.ui.text.java.correction
Modifier and TypeMethodDescriptionASTRewriteCorrectionProposal.createImportRewrite
(CompilationUnit astRoot)