Interface ICompilationUnit

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, ICodeAssist, IJavaElement, IOpenable, IParent, ISourceManipulation, ISourceReference, ITypeRoot, IWorkingCopy
All Known Implementing Classes:
AssistCompilationUnit, ClassFileWorkingCopy, CompilationUnit

public interface ICompilationUnit extends ITypeRoot, IWorkingCopy, ISourceManipulation
Represents an entire Java compilation unit (source file with one of the Java-like extensions). Compilation unit elements need to be opened before they can be navigated or manipulated. The children are of type IPackageDeclaration, IImportContainer, and IType, and appear in the order in which they are declared in the source. If a source file cannot be parsed, its structure remains unknown. Use IJavaElement.isStructureKnown() to determine whether this is the case.