package net.sourceforge.phpdt.core;
import org.eclipse.core.runtime.IProgressMonitor;
-import net.sourceforge.phpdt.core.IProblemRequestor;
-import net.sourceforge.phpdt.core.JavaModelException;
* or <code>"java.awt.*"</code>)
* @return a handle onto the corresponding import declaration. The import declaration may or may not exist.
*/
-//IImportDeclaration getImport(String name) ;
+IImportDeclaration getImport(String name) ;
+/**
+ * Returns the import declarations in this compilation unit
+ * in the order in which they appear in the source. This is
+ * a convenience method - import declarations can also be
+ * accessed from a compilation unit's import container.
+ *
+ * @return the import declarations in this compilation unit
+ * @throws JavaModelException if this element does not exist or if an
+ * exception occurs while accessing its corresponding resource
+ */
+IImportDeclaration[] getImports() throws JavaModelException;
/**
* Returns the import container for this compilation unit.
* This is a handle-only method. The import container may or
* @return a handle onto the corresponding import container. The
* import contain may or may not exist.
*/
-//IImportContainer getImportContainer();
+IImportContainer getImportContainer();
/**
* Returns the import declarations in this compilation unit
* in the order in which they appear in the source. This is
* @exception JavaModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
*/
-//IPackageDeclaration[] getPackageDeclarations() throws JavaModelException;
+IPackageDeclaration[] getPackageDeclarations() throws JavaModelException;
/**
* 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
* @return a handle onto the corresponding type. The type may or may not exist.
* @see JavaConventions#validateCompilationUnitName(String name)
*/
-IType getType(String name);
+IType getType(String name);
/**
* Returns the top-level types declared in this compilation unit
* in the order in which they appear in the source.