Java org.eclipse.jdt.core ICompilationUnit fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core ICompilationUnit fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core ICompilationUnit.

The text is from its open source code.

Implementation

org.eclipse.jdt.core.ICompilationUnit has the following implementations.
Click this link to see all its implementation.

Field

intNO_AST
Constant indicating that a reconcile operation should not return an AST.
intFORCE_PROBLEM_DETECTION
Constant indicating that a reconcile operation should recompute the problems even if the source hasn't changed.
intENABLE_STATEMENTS_RECOVERY
Constant indicating that a reconcile operation should enable the statements recovery.
intENABLE_BINDINGS_RECOVERY
Constant indicating that a reconcile operation should enable the bindings recovery
intIGNORE_METHOD_BODIES
Constant indicating that a reconcile operation could ignore to parse the method bodies.

Method

UndoEditapplyTextEdit(TextEdit edit, IProgressMonitor monitor)
Applies a text edit to the compilation unit's buffer.
voidbecomeWorkingCopy(IProgressMonitor monitor)
Changes this compilation unit handle into a working copy.
voidbecomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor monitor)
Changes this compilation unit handle into a working copy.
voidcommitWorkingCopy(boolean force, IProgressMonitor monitor)
Commits the contents of this working copy to its underlying resource.
IImportDeclarationcreateImport(String name, IJavaElement sibling, IProgressMonitor monitor)
Creates and returns an non-static import declaration in this compilation unit with the given name.
IImportDeclarationcreateImport(String name, IJavaElement sibling, int flags, IProgressMonitor monitor)
Creates and returns an import declaration in this compilation unit with the given name.
IPackageDeclarationcreatePackageDeclaration(String name, IProgressMonitor monitor)
Creates and returns a package declaration in this compilation unit with the given package name.
ITypecreateType(String contents, IJavaElement sibling, boolean force, IProgressMonitor monitor)
Creates and returns a type in this compilation unit with the given contents.
voiddiscardWorkingCopy()
Changes this compilation unit in working copy mode back to its original mode.
IJavaElement[]findElements(IJavaElement element)
Finds the elements in this compilation unit that correspond to the given element.
ICompilationUnitfindWorkingCopy(WorkingCopyOwner owner)
Finds the working copy for this compilation unit, given a WorkingCopyOwner .
IType[]getAllTypes()
Returns all types declared in this compilation unit in the order in which they appear in the source.
IImportDeclarationgetImport(String name)
Returns the first import declaration in this compilation unit with the given name.
IImportContainergetImportContainer()
Returns the import container for this compilation unit.
IImportDeclaration[]getImports()
Returns the import declarations in this compilation unit in the order in which they appear in the source.
WorkingCopyOwnergetOwner()
Returns null if this ICompilationUnit is the primary working copy, or this ICompilationUnit is not a working copy, otherwise the WorkingCopyOwner
IPackageDeclarationgetPackageDeclaration(String name)
Returns the first package declaration in this compilation unit with the given package name (there normally is at most one package declaration).
IPackageDeclaration[]getPackageDeclarations()
Returns the package declarations in this compilation unit in the order in which they appear in the source.
ICompilationUnitgetPrimary()
Returns the primary compilation unit (whose owner is the primary owner) this working copy was created from, or this compilation unit if this a primary compilation unit.
ITypegetType(String name)
Returns the top-level type declared in this compilation unit with the given simple type name.
IType[]getTypes()
Returns the top-level types declared in this compilation unit in the order in which they appear in the source.
ICompilationUnitgetWorkingCopy(IProgressMonitor monitor)
Returns a new working copy of this compilation unit if it is a primary compilation unit, or this compilation unit if it is already a non-primary working copy.
ICompilationUnitgetWorkingCopy(WorkingCopyOwner owner, IProblemRequestor problemRequestor, IProgressMonitor monitor)
Returns a shared working copy on this compilation unit using the given working copy owner to create the buffer, or this compilation unit if it is already a non-primary working copy.
booleanhasResourceChanged()
Returns whether the resource of this working copy has changed since the inception of this working copy.
booleanisWorkingCopy()
Returns whether this element is a working copy.
CompilationUnitreconcile(int astLevel, boolean forceProblemDetection, WorkingCopyOwner owner, 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.
CompilationUnitreconcile(int astLevel, int reconcileFlags, WorkingCopyOwner owner, 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.
CompilationUnitreconcile(int astLevel, boolean forceProblemDetection, boolean enableStatementsRecovery, WorkingCopyOwner owner, 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.