1 12 package org.eclipse.jdt.core; 13 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.jdt.core.dom.ASTParser; 16 import org.eclipse.jdt.core.dom.CompilationUnit; 17 import org.eclipse.jdt.core.dom.AST; 18 import org.eclipse.jdt.core.dom.IBinding; 19 20 21 35 public interface ICompilationUnit extends ITypeRoot, IWorkingCopy, ISourceManipulation { 36 40 public static final int NO_AST = 0; 41 42 47 public static final int FORCE_PROBLEM_DETECTION = 0x01; 48 49 54 public static final int ENABLE_STATEMENTS_RECOVERY = 0x02; 55 56 62 public static final int ENABLE_BINDINGS_RECOVERY = 0x04; 63 64 99 void becomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException; 100 124 void becomeWorkingCopy(IProgressMonitor monitor) throws JavaModelException; 125 153 void commitWorkingCopy(boolean force, IProgressMonitor monitor) throws JavaModelException; 154 175 IImportDeclaration createImport(String name, IJavaElement sibling, IProgressMonitor monitor) throws JavaModelException; 176 177 219 IImportDeclaration createImport(String name, IJavaElement sibling, int flags, IProgressMonitor monitor) throws JavaModelException; 220 221 239 IPackageDeclaration createPackageDeclaration(String name, IProgressMonitor monitor) throws JavaModelException; 240 272 IType createType(String contents, IJavaElement sibling, boolean force, IProgressMonitor monitor) throws JavaModelException; 273 289 void discardWorkingCopy() throws JavaModelException; 290 309 IJavaElement[] findElements(IJavaElement element); 310 322 ICompilationUnit findWorkingCopy(WorkingCopyOwner owner); 323 333 IType[] getAllTypes() throws JavaModelException; 334 344 IImportDeclaration getImport(String name) ; 345 353 IImportContainer getImportContainer(); 354 364 IImportDeclaration[] getImports() throws JavaModelException; 365 377 ICompilationUnit getPrimary(); 378 385 WorkingCopyOwner getOwner(); 386 394 IPackageDeclaration getPackageDeclaration(String name); 395 405 IPackageDeclaration[] getPackageDeclarations() throws JavaModelException; 406 415 IType getType(String name); 416 424 IType[] getTypes() throws JavaModelException; 425 451 ICompilationUnit getWorkingCopy(IProgressMonitor monitor) throws JavaModelException; 452 496 ICompilationUnit getWorkingCopy(WorkingCopyOwner owner, IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException; 497 505 public boolean hasResourceChanged(); 506 512 boolean isWorkingCopy(); 513 514 575 CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException; 576 577 640 CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, boolean enableStatementsRecovery, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException; 641 642 715 CompilationUnit reconcile(int astLevel, int reconcileFlags, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException; 716 717 732 void restore() throws JavaModelException; 733 } 734 | Popular Tags |