Example usage for Java org.eclipse.jdt.core ICompilationUnit fields, constructors, methods, implement or subclass
The text is from its open source code.
int | NO_AST Constant indicating that a reconcile operation should not return an AST. |
int | FORCE_PROBLEM_DETECTION Constant indicating that a reconcile operation should recompute the problems even if the source hasn't changed. |
int | ENABLE_STATEMENTS_RECOVERY Constant indicating that a reconcile operation should enable the statements recovery. |
int | ENABLE_BINDINGS_RECOVERY Constant indicating that a reconcile operation should enable the bindings recovery |
int | IGNORE_METHOD_BODIES Constant indicating that a reconcile operation could ignore to parse the method bodies. |
UndoEdit | applyTextEdit(TextEdit edit, IProgressMonitor monitor) Applies a text edit to the compilation unit's buffer. |
void | becomeWorkingCopy(IProgressMonitor monitor) Changes this compilation unit handle into a working copy. |
void | becomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor monitor) Changes this compilation unit handle into a working copy. |
void | commitWorkingCopy(boolean force, IProgressMonitor monitor) Commits the contents of this working copy to its underlying resource. |
IImportDeclaration | createImport(String name, IJavaElement sibling, IProgressMonitor monitor) Creates and returns an non-static import declaration in this compilation unit with the given name. |
IImportDeclaration | createImport(String name, IJavaElement sibling, int flags, IProgressMonitor monitor) Creates and returns an import declaration in this compilation unit with the given name. |
IPackageDeclaration | createPackageDeclaration(String name, IProgressMonitor monitor) Creates and returns a package declaration in this compilation unit with the given package name. |
IType | createType(String contents, IJavaElement sibling, boolean force, IProgressMonitor monitor) Creates and returns a type in this compilation unit with the given contents. |
void | discardWorkingCopy() 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. |
ICompilationUnit | findWorkingCopy(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. |
IImportDeclaration | getImport(String name) Returns the first import declaration in this compilation unit with the given name. |
IImportContainer | getImportContainer() 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. |
WorkingCopyOwner | getOwner() Returns null if this ICompilationUnit is the primary working copy, or this ICompilationUnit is not a working copy, otherwise the WorkingCopyOwner |
IPackageDeclaration | getPackageDeclaration(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. |
ICompilationUnit | getPrimary() 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. |
IType | getType(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. |
ICompilationUnit | getWorkingCopy(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. |
ICompilationUnit | getWorkingCopy(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. |
boolean | hasResourceChanged() Returns whether the resource of this working copy has changed since the inception of this working copy. |
boolean | isWorkingCopy() Returns whether this element is a working copy. |
CompilationUnit | reconcile(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. |
CompilationUnit | reconcile(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. |
CompilationUnit | reconcile(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. |