blob: 26046903295443267f8c2c6a86e682a37a0f0818 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_12) on Fri May 30 11:15:48 CDT 2008 -->
<TITLE>
IJavaScriptUnit
</TITLE>
<META NAME="keywords" CONTENT="org.eclipse.wst.jsdt.core.IJavaScriptUnit interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="IJavaScriptUnit";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IJavaScriptUnit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptProject.html" title="interface in org.eclipse.wst.jsdt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJsGlobalScopeContainer.html" title="interface in org.eclipse.wst.jsdt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IJavaScriptUnit.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.wst.jsdt.core</FONT>
<BR>
Interface IJavaScriptUnit</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html" title="interface in org.eclipse.wst.jsdt.core">ICodeAssist</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html" title="interface in org.eclipse.wst.jsdt.core">IFunctionContainer</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html" title="interface in org.eclipse.wst.jsdt.core">ILookupScope</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html" title="interface in org.eclipse.wst.jsdt.core">IOpenable</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IParent.html" title="interface in org.eclipse.wst.jsdt.core">IParent</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html" title="interface in org.eclipse.wst.jsdt.core">ISourceManipulation</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceReference.html" title="interface in org.eclipse.wst.jsdt.core">ISourceReference</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html" title="interface in org.eclipse.wst.jsdt.core">ITypeRoot</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>IJavaScriptUnit</B><DT>extends <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html" title="interface in org.eclipse.wst.jsdt.core">ITypeRoot</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html" title="interface in org.eclipse.wst.jsdt.core">ISourceManipulation</A></DL>
</PRE>
<P>
Represents an entire JavaScript file (source file with one of the
<A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptCore.html#getJavaScriptLikeExtensions()"><CODE>JavaScript-like extensions</CODE></A>).
JavaScriptUnit elements need to be opened before they can be navigated or manipulated.
The children are of type <A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IPackageDeclaration</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportContainer.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IImportContainer</CODE></A>,<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IFunction</CODE></A>,<A HREF="../../../../../org/eclipse/wst/jsdt/core/IField.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IField</CODE></A>, and <A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IType</CODE></A>,
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 <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#isStructureKnown()"><CODE>IJavaScriptElement.isStructureKnown()</CODE></A> to determine whether this is
the case.
<p>
This interface is not intended to be implemented by clients.
</p>
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_BINDINGS_RECOVERY">ENABLE_BINDINGS_RECOVERY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant indicating that a reconcile operation should enable the bindings recovery</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_STATEMENTS_RECOVERY">ENABLE_STATEMENTS_RECOVERY</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant indicating that a reconcile operation should enable the statements recovery.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#FORCE_PROBLEM_DETECTION">FORCE_PROBLEM_DETECTION</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant indicating that a reconcile operation should recompute the problems
even if the source hasn't changed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#NO_AST">NO_AST</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constant indicating that a reconcile operation should not return an AST.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.eclipse.wst.jsdt.core.IJavaScriptElement"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#CLASS_FILE">CLASS_FILE</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#FIELD">FIELD</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#IMPORT_CONTAINER">IMPORT_CONTAINER</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#IMPORT_DECLARATION">IMPORT_DECLARATION</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#INITIALIZER">INITIALIZER</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#JAVASCRIPT_MODEL">JAVASCRIPT_MODEL</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#JAVASCRIPT_PROJECT">JAVASCRIPT_PROJECT</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#JAVASCRIPT_UNIT">JAVASCRIPT_UNIT</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#LOCAL_VARIABLE">LOCAL_VARIABLE</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#METHOD">METHOD</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#PACKAGE_DECLARATION">PACKAGE_DECLARATION</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#PACKAGE_FRAGMENT">PACKAGE_FRAGMENT</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#PACKAGE_FRAGMENT_ROOT">PACKAGE_FRAGMENT_ROOT</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#TYPE">TYPE</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#TYPE_PARAMETER">TYPE_PARAMETER</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)">becomeWorkingCopy</A></B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core">IProblemRequestor</A>&nbsp;problemRequestor,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(IProgressMonitor)"><CODE>becomeWorkingCopy(IProgressMonitor)</CODE></A> instead.
Note that if this deprecated method is used, problems will be reported to the given problem requestor
as well as the problem requestor returned by the working copy owner (if not null).</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(IProgressMonitor)">becomeWorkingCopy</A></B>(IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes this javaScript file handle into a working copy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#commitWorkingCopy(boolean, IProgressMonitor)">commitWorkingCopy</A></B>(boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Commits the contents of this working copy to its underlying resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IField.html" title="interface in org.eclipse.wst.jsdt.core">IField</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createField(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)">createField</A></B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a var in this javaScript file with the
given contents.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createImport(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, int, IProgressMonitor)">createImport</A></B>(java.lang.String&nbsp;name,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
int&nbsp;flags,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns an import declaration in this javaScript file
with the given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createImport(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, IProgressMonitor)">createImport</A></B>(java.lang.String&nbsp;name,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns an non-static import declaration in this javaScript file
with the given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createMethod(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)">createMethod</A></B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a function in this javaScript file with the
given contents.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createPackageDeclaration(java.lang.String, IProgressMonitor)">createPackageDeclaration</A></B>(java.lang.String&nbsp;name,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a package declaration in this javaScript file
with the given package name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createType(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)">createType</A></B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and returns a type in this javaScript file with the
given contents.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()">discardWorkingCopy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes this javaScript file in working copy mode back to its original mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#findElements(org.eclipse.wst.jsdt.core.IJavaScriptElement)">findElements</A></B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;element)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the elements in this javaScript file that correspond to
the given element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#findFunctions(org.eclipse.wst.jsdt.core.IFunction)">findFunctions</A></B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A>&nbsp;function)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the function in this javaScript file that correspond to
the given function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#findWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner)">findWorkingCopy</A></B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds the working copy for this javaScript file, given a <A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core"><CODE>WorkingCopyOwner</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getAllTypes()">getAllTypes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all types declared in this javaScript file in the order
in which they appear in the source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getImport(java.lang.String)">getImport</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first import declaration in this javaScript file with the given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportContainer.html" title="interface in org.eclipse.wst.jsdt.core">IImportContainer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getImportContainer()">getImportContainer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the import container for this javaScript file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getImports()">getImports</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the import declarations in this javaScript file
in the order in which they appear in the source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getOwner()">getOwner</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the working copy owner of this working copy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getPackageDeclaration(java.lang.String)">getPackageDeclaration</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first package declaration in this javaScript file with the given package name
(there normally is at most one package declaration).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getPackageDeclarations()">getPackageDeclarations</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the package declarations in this javaScript file
in the order in which they appear in the source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getPrimary()">getPrimary</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the primary javaScript file (whose owner is the primary owner)
this working copy was created from, or this javaScript file if this a primary
javaScript file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getTypes()">getTypes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the top-level types declared in this javaScript file
in the order in which they appear in the source.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getWorkingCopy(IProgressMonitor)">getWorkingCopy</A></B>(IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new working copy of this javaScript file if it is a primary javaScript file,
or this javaScript file if it is already a non-primary working copy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)">getWorkingCopy</A></B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core">IProblemRequestor</A>&nbsp;problemRequestor,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>ITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor)</CODE></A> instead.
Note that if this deprecated method is used, problems will be reported on the passed problem requester
as well as on the problem requestor returned by the working copy owner (if not null).</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#hasResourceChanged()">hasResourceChanged</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the resource of this working copy has changed since the
inception of this working copy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#isWorkingCopy()">isWorkingCopy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether this element is a working copy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)">reconcile</A></B>(int&nbsp;astLevel,
boolean&nbsp;forceProblemDetection,
boolean&nbsp;enableStatementsRecovery,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)">reconcile</A></B>(int&nbsp;astLevel,
boolean&nbsp;forceProblemDetection,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, int, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)">reconcile</A></B>(int&nbsp;astLevel,
int&nbsp;reconcileFlags,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#restore()">restore</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restores the contents of this working copy to the current contents of
this working copy's original element.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.ITypeRoot"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html" title="interface in org.eclipse.wst.jsdt.core">ITypeRoot</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html#findPrimaryType()">findPrimaryType</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html#getElementAt(int)">getElementAt</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)">getWorkingCopy</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.IJavaScriptElement"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#exists()">exists</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getAncestor(int)">getAncestor</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getAttachedJavadoc(IProgressMonitor)">getAttachedJavadoc</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getCommonSuperType()">getCommonSuperType</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getCorrespondingResource()">getCorrespondingResource</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getDisplayName()">getDisplayName</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getElementName()">getElementName</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getElementType()">getElementType</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getHandleIdentifier()">getHandleIdentifier</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getHostPath()">getHostPath</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getJavaScriptModel()">getJavaScriptModel</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getJavaScriptProject()">getJavaScriptProject</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getOpenable()">getOpenable</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getParent()">getParent</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getPath()">getPath</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getPrimaryElement()">getPrimaryElement</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getResource()">getResource</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getSchedulingRule()">getSchedulingRule</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#getUnderlyingResource()">getUnderlyingResource</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#isReadOnly()">isReadOnly</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#isStructureKnown()">isStructureKnown</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html#isVirtual()">isVirtual</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.ILookupScope"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html" title="interface in org.eclipse.wst.jsdt.core">ILookupScope</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html#newNameLookup(org.eclipse.wst.jsdt.core.IJavaScriptUnit[])">newNameLookup</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html#newNameLookup(org.eclipse.wst.jsdt.core.WorkingCopyOwner)">newNameLookup</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html#newSearchableNameEnvironment(org.eclipse.wst.jsdt.core.IJavaScriptUnit[])">newSearchableNameEnvironment</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ILookupScope.html#newSearchableNameEnvironment(org.eclipse.wst.jsdt.core.WorkingCopyOwner)">newSearchableNameEnvironment</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.IParent"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IParent.html" title="interface in org.eclipse.wst.jsdt.core">IParent</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IParent.html#getChildren()">getChildren</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IParent.html#hasChildren()">hasChildren</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.IOpenable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html" title="interface in org.eclipse.wst.jsdt.core">IOpenable</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#close()">close</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#findRecommendedLineSeparator()">findRecommendedLineSeparator</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#getBuffer()">getBuffer</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#hasUnsavedChanges()">hasUnsavedChanges</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#isConsistent()">isConsistent</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#isOpen()">isOpen</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)">makeConsistent</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#open(IProgressMonitor)">open</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#save(IProgressMonitor, boolean)">save</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.ISourceReference"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceReference.html" title="interface in org.eclipse.wst.jsdt.core">ISourceReference</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceReference.html#exists()">exists</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceReference.html#getSource()">getSource</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceReference.html#getSourceRange()">getSourceRange</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.ICodeAssist"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html" title="interface in org.eclipse.wst.jsdt.core">ICodeAssist</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html#codeComplete(int, org.eclipse.wst.jsdt.core.CompletionRequestor)">codeComplete</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html#codeComplete(int, org.eclipse.wst.jsdt.core.CompletionRequestor, org.eclipse.wst.jsdt.core.WorkingCopyOwner)">codeComplete</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html#codeSelect(int, int)">codeSelect</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ICodeAssist.html#codeSelect(int, int, org.eclipse.wst.jsdt.core.WorkingCopyOwner)">codeSelect</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.IFunctionContainer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html" title="interface in org.eclipse.wst.jsdt.core">IFunctionContainer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getField(java.lang.String)">getField</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getFields()">getFields</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getFunction(java.lang.String, java.lang.String[])">getFunction</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getFunctions()">getFunctions</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getMethods()">getMethods</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunctionContainer.html#getType(java.lang.String)">getType</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.IWorkingCopy"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#commit(boolean, IProgressMonitor)">commit</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#destroy()">destroy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#findPrimaryType()">findPrimaryType</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#findSharedWorkingCopy(org.eclipse.wst.jsdt.core.IBufferFactory)">findSharedWorkingCopy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#getOriginal(org.eclipse.wst.jsdt.core.IJavaScriptElement)">getOriginal</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#getOriginalElement()">getOriginalElement</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#getSharedWorkingCopy(IProgressMonitor, org.eclipse.wst.jsdt.core.IBufferFactory, org.eclipse.wst.jsdt.core.IProblemRequestor)">getSharedWorkingCopy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#getWorkingCopy()">getWorkingCopy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#getWorkingCopy(IProgressMonitor, org.eclipse.wst.jsdt.core.IBufferFactory, org.eclipse.wst.jsdt.core.IProblemRequestor)">getWorkingCopy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#isBasedOn(IResource)">isBasedOn</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#reconcile()">reconcile</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#reconcile(boolean, IProgressMonitor)">reconcile</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.eclipse.wst.jsdt.core.ISourceManipulation"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.eclipse.wst.jsdt.core.<A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html" title="interface in org.eclipse.wst.jsdt.core">ISourceManipulation</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html#copy(org.eclipse.wst.jsdt.core.IJavaScriptElement, org.eclipse.wst.jsdt.core.IJavaScriptElement, java.lang.String, boolean, IProgressMonitor)">copy</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html#delete(boolean, IProgressMonitor)">delete</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html#move(org.eclipse.wst.jsdt.core.IJavaScriptElement, org.eclipse.wst.jsdt.core.IJavaScriptElement, java.lang.String, boolean, IProgressMonitor)">move</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ISourceManipulation.html#rename(java.lang.String, boolean, IProgressMonitor)">rename</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="NO_AST"><!-- --></A><H3>
NO_AST</H3>
<PRE>
static final int <B>NO_AST</B></PRE>
<DL>
<DD>Constant indicating that a reconcile operation should not return an AST.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.eclipse.wst.jsdt.core.IJavaScriptUnit.NO_AST">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="FORCE_PROBLEM_DETECTION"><!-- --></A><H3>
FORCE_PROBLEM_DETECTION</H3>
<PRE>
static final int <B>FORCE_PROBLEM_DETECTION</B></PRE>
<DL>
<DD>Constant indicating that a reconcile operation should recompute the problems
even if the source hasn't changed.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.eclipse.wst.jsdt.core.IJavaScriptUnit.FORCE_PROBLEM_DETECTION">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ENABLE_STATEMENTS_RECOVERY"><!-- --></A><H3>
ENABLE_STATEMENTS_RECOVERY</H3>
<PRE>
static final int <B>ENABLE_STATEMENTS_RECOVERY</B></PRE>
<DL>
<DD>Constant indicating that a reconcile operation should enable the statements recovery.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/ASTParser.html#setStatementsRecovery(boolean)"><CODE>ASTParser.setStatementsRecovery(boolean)</CODE></A>,
<A HREF="../../../../../constant-values.html#org.eclipse.wst.jsdt.core.IJavaScriptUnit.ENABLE_STATEMENTS_RECOVERY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ENABLE_BINDINGS_RECOVERY"><!-- --></A><H3>
ENABLE_BINDINGS_RECOVERY</H3>
<PRE>
static final int <B>ENABLE_BINDINGS_RECOVERY</B></PRE>
<DL>
<DD>Constant indicating that a reconcile operation should enable the bindings recovery
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/ASTParser.html#setBindingsRecovery(boolean)"><CODE>ASTParser.setBindingsRecovery(boolean)</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/IBinding.html#isRecovered()"><CODE>IBinding.isRecovered()</CODE></A>,
<A HREF="../../../../../constant-values.html#org.eclipse.wst.jsdt.core.IJavaScriptUnit.ENABLE_BINDINGS_RECOVERY">Constant Field Values</A></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><!-- --></A><H3>
becomeWorkingCopy</H3>
<PRE>
void <B>becomeWorkingCopy</B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core">IProblemRequestor</A>&nbsp;problemRequestor,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(IProgressMonitor)"><CODE>becomeWorkingCopy(IProgressMonitor)</CODE></A> instead.
Note that if this deprecated method is used, problems will be reported to the given problem requestor
as well as the problem requestor returned by the working copy owner (if not null).</I>
<P>
<DD>Changes this javaScript file handle into a working copy. A new <A HREF="../../../../../org/eclipse/wst/jsdt/core/IBuffer.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IBuffer</CODE></A> is
created using this javaScript file handle's owner. Uses the primary owner is none was
specified when this javaScript file handle was created.
<p>
When switching to working copy mode, problems are reported to given
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A>. Note that once in working copy mode, the given
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A> is ignored. Only the original <A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A>
is used to report subsequent problems.
</p>
<p>
Once in working copy mode, changes to this javaScript file or its children are done in memory.
Only the new buffer is affected. Using <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#commitWorkingCopy(boolean, IProgressMonitor)"><CODE>commitWorkingCopy(boolean, IProgressMonitor)</CODE></A>
will bring the underlying resource in sync with this javaScript file.
</p>
<p>
If this javaScript file was already in working copy mode, an internal counter is incremented and no
other action is taken on this javaScript file. To bring this javaScript file back into the original mode
(where it reflects the underlying resource), <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A> must be call as many
times as <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>becomeWorkingCopy(IProblemRequestor, IProgressMonitor)</CODE></A>.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>problemRequestor</CODE> - a requestor which will get notified of problems detected during
reconciling as they are discovered. The requestor can be set to <code>null</code> indicating
that the client is not interested in problems.<DD><CODE>monitor</CODE> - a progress monitor used to report progress while opening this javaScript file
or <code>null</code> if no progress should be reported
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this javaScript file could not become a working copy.<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="becomeWorkingCopy(IProgressMonitor)"><!-- --></A><H3>
becomeWorkingCopy</H3>
<PRE>
void <B>becomeWorkingCopy</B>(IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Changes this javaScript file handle into a working copy. A new <A HREF="../../../../../org/eclipse/wst/jsdt/core/IBuffer.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IBuffer</CODE></A> is
created using this javaScript file handle's owner. Uses the primary owner if none was
specified when this javaScript file handle was created.
<p>
When switching to working copy mode, problems are reported to the <A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>problem requestor</CODE></A> of the <A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core"><CODE>working copy owner</CODE></A>.
</p><p>
Once in working copy mode, changes to this javaScript file or its children are done in memory.
Only the new buffer is affected. Using <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#commitWorkingCopy(boolean, IProgressMonitor)"><CODE>commitWorkingCopy(boolean, IProgressMonitor)</CODE></A>
will bring the underlying resource in sync with this javaScript file.
</p><p>
If this javaScript file was already in working copy mode, an internal counter is incremented and no
other action is taken on this javaScript file. To bring this javaScript file back into the original mode
(where it reflects the underlying resource), <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A> must be call as many
times as <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>becomeWorkingCopy(IProblemRequestor, IProgressMonitor)</CODE></A>.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>monitor</CODE> - a progress monitor used to report progress while opening this javaScript file
or <code>null</code> if no progress should be reported
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this javaScript file could not become a working copy.<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="commitWorkingCopy(boolean, IProgressMonitor)"><!-- --></A><H3>
commitWorkingCopy</H3>
<PRE>
void <B>commitWorkingCopy</B>(boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Commits the contents of this working copy to its underlying resource.
<p>It is possible that the contents of the original resource have changed
since this working copy was created, in which case there is an update conflict.
The value of the <code>force</code> parameter effects the resolution of
such a conflict:<ul>
<li> <code>true</code> - in this case the contents of this working copy are applied to
the underlying resource even though this working copy was created before
a subsequent change in the resource</li>
<li> <code>false</code> - in this case a <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core"><CODE>JavaScriptModelException</CODE></A> is thrown</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>force</CODE> - a flag to handle the cases when the contents of the original resource have changed
since this working copy was created<DD><CODE>monitor</CODE> - the given progress monitor
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this working copy could not commit. Reasons include:
<ul>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> This element is not a working copy (INVALID_ELEMENT_TYPES)
<li> A update conflict (described above) (UPDATE_CONFLICT)
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="createImport(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, IProgressMonitor)"><!-- --></A><H3>
createImport</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A> <B>createImport</B>(java.lang.String&nbsp;name,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns an non-static import declaration in this javaScript file
with the given name. This method is equivalent to
<code>createImport(name, Flags.AccDefault, sibling, monitor)</code>.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the import declaration to add<DD><CODE>sibling</CODE> - the existing element which the import declaration will be inserted immediately before (if
<code> null </code>, then this import will be inserted as the last import declaration.<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted import declaration (or the previously existing one in case attempting to create a duplicate)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li> This JavaScript element does not exist or the specified sibling does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The specified sibling is not a child of this javaScript file (INVALID_SIBLING)
<li> The name is not a valid import name (INVALID_NAME)
</ul><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#createImport(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, int, IProgressMonitor)"><CODE>createImport(String, IJavaScriptElement, int, IProgressMonitor)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="createImport(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, int, IProgressMonitor)"><!-- --></A><H3>
createImport</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A> <B>createImport</B>(java.lang.String&nbsp;name,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
int&nbsp;flags,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns an import declaration in this javaScript file
with the given name.
<p>
Optionally, the new element can be positioned before the specified
sibling. If no sibling is specified, the element will be inserted
as the last import declaration in this javaScript file.
<p>
If the javaScript file already includes the specified import declaration,
the import is not generated (it does not generate duplicates).
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the import declaration<DD><CODE>sibling</CODE> - the existing element which the import declaration will be inserted immediately before (if
<code> null </code>, then this import will be inserted as the last import declaration.<DD><CODE>flags</CODE> - <A HREF="../../../../../org/eclipse/wst/jsdt/core/Flags.html#AccStatic"><CODE>Flags.AccStatic</CODE></A> for static imports, or
<A HREF="../../../../../org/eclipse/wst/jsdt/core/Flags.html#AccDefault"><CODE>Flags.AccDefault</CODE></A> for regular imports; other modifier flags
are ignored<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted import declaration (or the previously existing one in case attempting to create a duplicate)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li> This JavaScript element does not exist or the specified sibling does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The specified sibling is not a child of this javaScript file (INVALID_SIBLING)
<li> The name is not a valid import name (INVALID_NAME)
</ul><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/Flags.html" title="class in org.eclipse.wst.jsdt.core"><CODE>Flags</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="createPackageDeclaration(java.lang.String, IProgressMonitor)"><!-- --></A><H3>
createPackageDeclaration</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A> <B>createPackageDeclaration</B>(java.lang.String&nbsp;name,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns a package declaration in this javaScript file
with the given package name.
<p>If the javaScript file already includes the specified package declaration,
it is not generated (it does not generate duplicates).
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the package declaration to add<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted package declaration (or the previously existing one in case attempting to create a duplicate)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li>This JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The name is not a valid package name (INVALID_NAME)
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="createType(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)"><!-- --></A><H3>
createType</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A> <B>createType</B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns a type in this javaScript file with the
given contents. If this javaScript file does not exist, one
will be created with an appropriate package declaration.
<p>
Optionally, the new type can be positioned before the specified
sibling. If <code>sibling</code> is <code>null</code>, the type will be appended
to the end of this javaScript file.
<p>It is possible that a type with the same name already exists in this javaScript file.
The value of the <code>force</code> parameter effects the resolution of
such a conflict:<ul>
<li> <code>true</code> - in this case the type is created with the new contents</li>
<li> <code>false</code> - in this case a <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core"><CODE>JavaScriptModelException</CODE></A> is thrown</li>
</ul>
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contents</CODE> - the source contents of the type declaration to add.<DD><CODE>sibling</CODE> - the existing element which the type will be inserted immediately before (if
<code>null</code>, then this type will be inserted as the last type declaration.<DD><CODE>force</CODE> - a <code>boolean</code> flag indicating how to deal with duplicates<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted type
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li>The specified sibling element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The specified sibling is not a child of this javaScript file (INVALID_SIBLING)
<li> The contents could not be recognized as a type declaration (INVALID_CONTENTS)
<li> There was a naming collision with an existing type (NAME_COLLISION)
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="createField(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)"><!-- --></A><H3>
createField</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IField.html" title="interface in org.eclipse.wst.jsdt.core">IField</A> <B>createField</B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns a var in this javaScript file with the
given contents. If this javaScript file does not exist, one
will be created with an appropriate package declaration.
<p>
Optionally, the new var can be positioned before the specified
sibling. If <code>sibling</code> is <code>null</code>, the var will be appended
to the end of this javaScript file.
<p>It is possible that a var with the same name already exists in this javaScript file.
The value of the <code>force</code> parameter effects the resolution of
such a conflict:<ul>
<li> <code>true</code> - in this case the var is created with the new contents</li>
<li> <code>false</code> - in this case a <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core"><CODE>JavaScriptModelException</CODE></A> is thrown</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contents</CODE> - the source contents of the var declaration to add.<DD><CODE>sibling</CODE> - the existing element which the var will be inserted immediately before (if
<code>null</code>, then this var will be inserted as the last var declaration.<DD><CODE>force</CODE> - a <code>boolean</code> flag indicating how to deal with duplicates<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted var
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li>The specified sibling element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The specified sibling is not a child of this javaScript file (INVALID_SIBLING)
<li> The contents could not be recognized as a var declaration (INVALID_CONTENTS)
<li> There was a naming collision with an existing var (NAME_COLLISION)
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="createMethod(java.lang.String, org.eclipse.wst.jsdt.core.IJavaScriptElement, boolean, IProgressMonitor)"><!-- --></A><H3>
createMethod</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A> <B>createMethod</B>(java.lang.String&nbsp;contents,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;sibling,
boolean&nbsp;force,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Creates and returns a function in this javaScript file with the
given contents. If this javaScript file does not exist, one
will be created with an appropriate package declaration.
<p>
Optionally, the new function can be positioned before the specified
sibling. If <code>sibling</code> is <code>null</code>, the function will be appended
to the end of this javaScript file.
<p>It is possible that a function with the same name already exists in this javaScript file.
The value of the <code>force</code> parameter effects the resolution of
such a conflict:<ul>
<li> <code>true</code> - in this case the function is created with the new contents</li>
<li> <code>false</code> - in this case a <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core"><CODE>JavaScriptModelException</CODE></A> is thrown</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contents</CODE> - the source contents of the function declaration to add.<DD><CODE>sibling</CODE> - the existing element which the function will be inserted immediately before (if
<code>null</code>, then this function will be inserted as the last function declaration.<DD><CODE>force</CODE> - a <code>boolean</code> flag indicating how to deal with duplicates<DD><CODE>monitor</CODE> - the progress monitor to notify
<DT><B>Returns:</B><DD>the newly inserted function
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the element could not be created. Reasons include:
<ul>
<li>The specified sibling element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li> A <CODE>org.eclipse.core.runtime.CoreException</CODE> occurred while updating an underlying resource
<li> The specified sibling is not a child of this javaScript file (INVALID_SIBLING)
<li> The contents could not be recognized as a function declaration (INVALID_CONTENTS)
<li> There was a naming collision with an existing function (NAME_COLLISION)
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="discardWorkingCopy()"><!-- --></A><H3>
discardWorkingCopy</H3>
<PRE>
void <B>discardWorkingCopy</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Changes this javaScript file in working copy mode back to its original mode.
<p>
This has no effect if this javaScript file was not in working copy mode.
</p>
<p>
If <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)</CODE></A> was called several times on this
javaScript file, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A> must be called as
many times before it switches back to the original mode.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this working copy could not return in its original mode.<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#becomeWorkingCopy(org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>becomeWorkingCopy(IProblemRequestor, IProgressMonitor)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="findElements(org.eclipse.wst.jsdt.core.IJavaScriptElement)"><!-- --></A><H3>
findElements</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>[] <B>findElements</B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptElement.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptElement</A>&nbsp;element)</PRE>
<DL>
<DD>Finds the elements in this javaScript file that correspond to
the given element.
An element A corresponds to an element B if:
<ul>
<li>A has the same element name as B.
<li>If A is a method, A must have the same number of arguments as
B and the simple names of the argument types must be equals.
<li>The parent of A corresponds to the parent of B recursively up to
their respective javaScript files.
<li>A exists.
</ul>
Returns <code>null</code> if no such javaScript elements can be found
or if the given element is not included in a javaScript file.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#findElements(org.eclipse.wst.jsdt.core.IJavaScriptElement)">findElements</A></CODE> in interface <CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - the given element
<DT><B>Returns:</B><DD>the found elements in this javaScript file that correspond to the given element</DL>
</DD>
</DL>
<HR>
<A NAME="findWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner)"><!-- --></A><H3>
findWorkingCopy</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A> <B>findWorkingCopy</B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner)</PRE>
<DL>
<DD>Finds the working copy for this javaScript file, given a <A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core"><CODE>WorkingCopyOwner</CODE></A>.
If no working copy has been created for this javaScript file associated with this
working copy owner, returns <code>null</code>.
<p>
Users of this method must not destroy the resulting working copy.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>owner</CODE> - the given <A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core"><CODE>WorkingCopyOwner</CODE></A>
<DT><B>Returns:</B><DD>the found working copy for this javaScript file, <code>null</code> if none<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core"><CODE>WorkingCopyOwner</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAllTypes()"><!-- --></A><H3>
getAllTypes</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A>[] <B>getAllTypes</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Returns all types declared in this javaScript file in the order
in which they appear in the source.
This includes all top-level types and nested member types.
It does NOT include local types (types defined in methods).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the array of top-level and member types defined in a javaScript file, in declaration order.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this element does not exist or if an
exception occurs while accessing its corresponding resource</DL>
</DD>
</DL>
<HR>
<A NAME="getImport(java.lang.String)"><!-- --></A><H3>
getImport</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A> <B>getImport</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns the first import declaration in this javaScript file with the given name.
This is a handle-only method. The import declaration may or may not exist. This
is a convenience method - imports can also be accessed from a javaScript file's
import container.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the import to find
<DT><B>Returns:</B><DD>a handle onto the corresponding import declaration. The import declaration may or may not exist.</DL>
</DD>
</DL>
<HR>
<A NAME="getImportContainer()"><!-- --></A><H3>
getImportContainer</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportContainer.html" title="interface in org.eclipse.wst.jsdt.core">IImportContainer</A> <B>getImportContainer</B>()</PRE>
<DL>
<DD>Returns the import container for this javaScript file.
This is a handle-only method. The import container may or
may not exist. The import container can used to access the
imports.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a handle onto the corresponding import container. The
import contain may or may not exist.</DL>
</DD>
</DL>
<HR>
<A NAME="getImports()"><!-- --></A><H3>
getImports</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IImportDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IImportDeclaration</A>[] <B>getImports</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Returns the import declarations in this javaScript file
in the order in which they appear in the source. This is
a convenience method - import declarations can also be
accessed from a javaScript file's import container.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the import declarations in this javaScript file
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this element does not exist or if an
exception occurs while accessing its corresponding resource</DL>
</DD>
</DL>
<HR>
<A NAME="getPrimary()"><!-- --></A><H3>
getPrimary</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A> <B>getPrimary</B>()</PRE>
<DL>
<DD>Returns the primary javaScript file (whose owner is the primary owner)
this working copy was created from, or this javaScript file if this a primary
javaScript file.
<p>
Note that the returned primary javaScript file can be in working copy mode.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the primary javaScript file this working copy was created from,
or this javaScript file if it is primary</DL>
</DD>
</DL>
<HR>
<A NAME="getOwner()"><!-- --></A><H3>
getOwner</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A> <B>getOwner</B>()</PRE>
<DL>
<DD>Returns the working copy owner of this working copy.
Returns null if it is not a working copy or if it has no owner.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>WorkingCopyOwner the owner of this working copy or <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="getPackageDeclaration(java.lang.String)"><!-- --></A><H3>
getPackageDeclaration</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A> <B>getPackageDeclaration</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns the first package declaration in this javaScript file with the given package name
(there normally is at most one package declaration).
This is a handle-only method. The package declaration may or may not exist.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the package declaration
<DT><B>Returns:</B><DD>the first package declaration in this javaScript file with the given package name</DL>
</DD>
</DL>
<HR>
<A NAME="getPackageDeclarations()"><!-- --></A><H3>
getPackageDeclarations</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.html" title="interface in org.eclipse.wst.jsdt.core">IPackageDeclaration</A>[] <B>getPackageDeclarations</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Returns the package declarations in this javaScript file
in the order in which they appear in the source.
There normally is at most one package declaration.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an array of package declaration (normally of size one)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this element does not exist or if an
exception occurs while accessing its corresponding resource</DL>
</DD>
</DL>
<HR>
<A NAME="getTypes()"><!-- --></A><H3>
getTypes</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IType.html" title="interface in org.eclipse.wst.jsdt.core">IType</A>[] <B>getTypes</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Returns the top-level types declared in this javaScript file
in the order in which they appear in the source.
<p><b>Note: This Method only applies to ECMAScript 4 which is not yet supported</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the top-level types declared in this javaScript file
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if this element does not exist or if an
exception occurs while accessing its corresponding resource</DL>
</DD>
</DL>
<HR>
<A NAME="getWorkingCopy(IProgressMonitor)"><!-- --></A><H3>
getWorkingCopy</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A> <B>getWorkingCopy</B>(IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Returns a new working copy of this javaScript file if it is a primary javaScript file,
or this javaScript file if it is already a non-primary working copy.
<p>
Note: if intending to share a working copy amongst several clients, then
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>getWorkingCopy(WorkingCopyOwner, IProblemRequestor, IProgressMonitor)</CODE></A>
should be used instead.
</p><p>
When the working copy instance is created, an ADDED IJavaScriptElementDelta is
reported on this working copy.
</p><p>
Once done with the working copy, users of this method must discard it using
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A>.
</p><p>
Since 2.1, a working copy can be created on a not-yet existing compilation
unit. In particular, such a working copy can then be committed in order to create
the corresponding javaScript file.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>monitor</CODE> - a progress monitor used to report progress while opening this javaScript file
or <code>null</code> if no progress should be reported
<DT><B>Returns:</B><DD>a new working copy of this element if this element is not
a working copy, or this element if this element is already a working copy
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of this element can
not be determined.</DL>
</DD>
</DL>
<HR>
<A NAME="getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><!-- --></A><H3>
getWorkingCopy</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A> <B>getWorkingCopy</B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core">IProblemRequestor</A>&nbsp;problemRequestor,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>ITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor)</CODE></A> instead.
Note that if this deprecated method is used, problems will be reported on the passed problem requester
as well as on the problem requestor returned by the working copy owner (if not null).</I>
<P>
<DD>Returns a shared working copy on this javaScript file using the given working copy owner to create
the buffer, or this javaScript file if it is already a non-primary working copy.
This API can only answer an already existing working copy if it is based on the same
original javaScript file AND was using the same working copy owner (that is, as defined by <CODE>Object.equals(java.lang.Object)</CODE>).
<p>
The life time of a shared working copy is as follows:
<ul>
<li>The first call to <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#getWorkingCopy(org.eclipse.wst.jsdt.core.WorkingCopyOwner, org.eclipse.wst.jsdt.core.IProblemRequestor, IProgressMonitor)"><CODE>getWorkingCopy(WorkingCopyOwner, IProblemRequestor, IProgressMonitor)</CODE></A>
creates a new working copy for this element</li>
<li>Subsequent calls increment an internal counter.</li>
<li>A call to <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#discardWorkingCopy()"><CODE>discardWorkingCopy()</CODE></A> decrements the internal counter.</li>
<li>When this counter is 0, the working copy is discarded.
</ul>
So users of this method must discard exactly once the working copy.
<p>
Note that the working copy owner will be used for the life time of this working copy, that is if the
working copy is closed then reopened, this owner will be used.
The buffer will be automatically initialized with the original's javaScript file content
upon creation.
<p>
When the shared working copy instance is created, an ADDED IJavaScriptElementDelta is reported on this
working copy.
</p><p>
Since 2.1, a working copy can be created on a not-yet existing compilation
unit. In particular, such a working copy can then be committed in order to create
the corresponding javaScript file.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>owner</CODE> - the working copy owner that creates a buffer that is used to get the content
of the working copy<DD><CODE>problemRequestor</CODE> - a requestor which will get notified of problems detected during
reconciling as they are discovered. The requestor can be set to <code>null</code> indicating
that the client is not interested in problems.<DD><CODE>monitor</CODE> - a progress monitor used to report progress while opening this javaScript file
or <code>null</code> if no progress should be reported
<DT><B>Returns:</B><DD>a new working copy of this element using the given factory to create
the buffer, or this element if this element is already a working copy
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of this element can
not be determined.</DL>
</DD>
</DL>
<HR>
<A NAME="hasResourceChanged()"><!-- --></A><H3>
hasResourceChanged</H3>
<PRE>
boolean <B>hasResourceChanged</B>()</PRE>
<DL>
<DD>Returns whether the resource of this working copy has changed since the
inception of this working copy.
Returns <code>false</code> if this javaScript file is not in working copy mode.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>whether the resource has changed</DL>
</DD>
</DL>
<HR>
<A NAME="isWorkingCopy()"><!-- --></A><H3>
isWorkingCopy</H3>
<PRE>
boolean <B>isWorkingCopy</B>()</PRE>
<DL>
<DD>Returns whether this element is a working copy.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#isWorkingCopy()">isWorkingCopy</A></CODE> in interface <CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if this element is a working copy, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="reconcile(int, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><!-- --></A><H3>
reconcile</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A> <B>reconcile</B>(int&nbsp;astLevel,
boolean&nbsp;forceProblemDetection,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.
<p>
It performs the reconciliation by locally caching the contents of
the working copy, updating the contents, then creating a delta
over the cached contents and the new contents, and finally firing
this delta.
<p>
The boolean argument allows to force problem detection even if the
working copy is already consistent.
</p>
<p>
This functionality allows to specify a working copy owner which is used
during problem detection. All references contained in the working copy are
resolved against other units; for which corresponding owned working copies
are going to take precedence over their original javaScript files. If
<code>null</code> is passed in, then the primary working copy owner is used.
</p>
<p>
Compilation problems found in the new contents are notified through the
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A> interface which was passed at
creation, and no longer as transient markers.
</p>
<p>
Note: Since 3.0, added/removed/changed inner types generate change deltas.
</p>
<p>
If requested, a DOM AST representing the javaScript file is returned.
Its bindings are computed only if the problem requestor is active, or if the
problem detection is forced. This method returns <code>null</code> if the
creation of the DOM AST was not requested, or if the requested level of AST
API is not supported, or if the working copy was already consistent.
</p>
<p>
This method doesn't perform statements recovery. To recover statements with syntax
errors, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>reconcile(int, boolean, boolean, WorkingCopyOwner, IProgressMonitor)</CODE></A> must be use.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>astLevel</CODE> - either <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#NO_AST"><CODE>NO_AST</CODE></A> if no AST is wanted,
or the AST API level of the AST if one is wanted<DD><CODE>forceProblemDetection</CODE> - boolean indicating whether problem should be
recomputed even if the source hasn't changed<DD><CODE>owner</CODE> - the owner of working copies that take precedence over the
original javaScript files, or <code>null</code> if the primary working
copy owner should be used<DD><CODE>monitor</CODE> - a progress monitor
<DT><B>Returns:</B><DD>the javaScript file AST or <code>null</code> if not requested,
or if the requested level of AST API is not supported,
or if the working copy was consistent
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of the original element
cannot be accessed. Reasons include:
<ul>
<li> The original JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="reconcile(int, boolean, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><!-- --></A><H3>
reconcile</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A> <B>reconcile</B>(int&nbsp;astLevel,
boolean&nbsp;forceProblemDetection,
boolean&nbsp;enableStatementsRecovery,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.
<p>
It performs the reconciliation by locally caching the contents of
the working copy, updating the contents, then creating a delta
over the cached contents and the new contents, and finally firing
this delta.
<p>
The boolean argument allows to force problem detection even if the
working copy is already consistent.
</p>
<p>
This functionality allows to specify a working copy owner which is used
during problem detection. All references contained in the working copy are
resolved against other units; for which corresponding owned working copies
are going to take precedence over their original javaScript files. If
<code>null</code> is passed in, then the primary working copy owner is used.
</p>
<p>
Compilation problems found in the new contents are notified through the
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A> interface which was passed at
creation, and no longer as transient markers.
</p>
<p>
Note: Since 3.0, added/removed/changed inner types generate change deltas.
</p>
<p>
If requested, a DOM AST representing the javaScript file is returned.
Its bindings are computed only if the problem requestor is active, or if the
problem detection is forced. This method returns <code>null</code> if the
creation of the DOM AST was not requested, or if the requested level of AST
API is not supported, or if the working copy was already consistent.
</p>
<p>
If statements recovery is enabled then this method tries to rebuild statements
with syntax error. Otherwise statements with syntax error won't be present in
the returning DOM AST.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>astLevel</CODE> - either <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#NO_AST"><CODE>NO_AST</CODE></A> if no AST is wanted,
or the <A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/AST.html#newAST(int)">AST API level</A> of the AST if one is wanted<DD><CODE>forceProblemDetection</CODE> - boolean indicating whether problem should be
recomputed even if the source hasn't changed<DD><CODE>enableStatementsRecovery</CODE> - if <code>true</code> statements recovery is enabled.<DD><CODE>owner</CODE> - the owner of working copies that take precedence over the
original javaScript files, or <code>null</code> if the primary working
copy owner should be used<DD><CODE>monitor</CODE> - a progress monitor
<DT><B>Returns:</B><DD>the javaScript file AST or <code>null</code> if not requested,
or if the requested level of AST API is not supported,
or if the working copy was consistent
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of the original element
cannot be accessed. Reasons include:
<ul>
<li> The original JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="reconcile(int, int, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><!-- --></A><H3>
reconcile</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/JavaScriptUnit.html" title="class in org.eclipse.wst.jsdt.core.dom">JavaScriptUnit</A> <B>reconcile</B>(int&nbsp;astLevel,
int&nbsp;reconcileFlags,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/WorkingCopyOwner.html" title="class in org.eclipse.wst.jsdt.core">WorkingCopyOwner</A>&nbsp;owner,
IProgressMonitor&nbsp;monitor)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Reconciles the contents of this working copy, sends out a JavaScript delta
notification indicating the nature of the change of the working copy since
the last time it was either reconciled or made consistent
(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>IOpenable.makeConsistent(IProgressMonitor)</CODE></A>), and returns a
javaScript file AST if requested.
<p>
If the problem detection is forced by passing the <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#FORCE_PROBLEM_DETECTION"><CODE>FORCE_PROBLEM_DETECTION</CODE></A> bit in the given reconcile flag,
problem detection is run even if the working copy is already consistent.
</p>
<p>
It performs the reconciliation by locally caching the contents of
the working copy, updating the contents, then creating a delta
over the cached contents and the new contents, and finally firing
this delta.</p>
<p>
This functionality allows to specify a working copy owner which is used
during problem detection. All references contained in the working copy are
resolved against other units; for which corresponding owned working copies
are going to take precedence over their original javaScript files. If
<code>null</code> is passed in, then the primary working copy owner is used.
</p>
<p>
Compilation problems found in the new contents are notified through the
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IProblemRequestor.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IProblemRequestor</CODE></A> interface which was passed at
creation, and no longer as transient markers.
</p>
<p>
Note: Since 3.0, added/removed/changed inner types generate change deltas.
</p>
<p>
If requested, a DOM AST representing the javaScript file is returned.
Its bindings are computed only if the problem requestor is active, or if the
problem detection is forced. This method returns <code>null</code> if the
creation of the DOM AST was not requested, or if the requested level of AST
API is not supported, or if the working copy was already consistent.
</p>
<p>
If statements recovery is enabled by passing the <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_STATEMENTS_RECOVERY"><CODE>ENABLE_STATEMENTS_RECOVERY</CODE></A> bit in the given reconcile flag
then this method tries to rebuild statements with syntax error. Otherwise statements with syntax error won't be
present in the returning DOM AST.</p>
<p>
If bindings recovery is enabled by passing the <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_BINDINGS_RECOVERY"><CODE>ENABLE_BINDINGS_RECOVERY</CODE></A> bit in the given reconcile flag
then this method tries to resolve bindings even if the type resolution contains errors.</p>
<p>
The given reconcile flags is a bit-mask of the different constants (<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_BINDINGS_RECOVERY"><CODE>ENABLE_BINDINGS_RECOVERY</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_STATEMENTS_RECOVERY"><CODE>ENABLE_STATEMENTS_RECOVERY</CODE></A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#FORCE_PROBLEM_DETECTION"><CODE>FORCE_PROBLEM_DETECTION</CODE></A>). Unspecified values are left for future use.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>astLevel</CODE> - either <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#NO_AST"><CODE>NO_AST</CODE></A> if no AST is wanted,
or the <A HREF="../../../../../org/eclipse/wst/jsdt/core/dom/AST.html#newAST(int)">AST API level</A> of the AST if one is wanted<DD><CODE>reconcileFlags</CODE> - the given reconcile flags<DD><CODE>owner</CODE> - the owner of working copies that take precedence over the
original javaScript files, or <code>null</code> if the primary working
copy owner should be used<DD><CODE>monitor</CODE> - a progress monitor
<DT><B>Returns:</B><DD>the javaScript file AST or <code>null</code> if not requested,
or if the requested level of AST API is not supported,
or if the working copy was consistent
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of the original element
cannot be accessed. Reasons include:
<ul>
<li> The original JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#FORCE_PROBLEM_DETECTION"><CODE>FORCE_PROBLEM_DETECTION</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_BINDINGS_RECOVERY"><CODE>ENABLE_BINDINGS_RECOVERY</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#ENABLE_STATEMENTS_RECOVERY"><CODE>ENABLE_STATEMENTS_RECOVERY</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="restore()"><!-- --></A><H3>
restore</H3>
<PRE>
void <B>restore</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Restores the contents of this working copy to the current contents of
this working copy's original element. Has no effect if this element
is not a working copy.
<p>Note: This is the inverse of committing the content of the
working copy to the original element with <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#commitWorkingCopy(boolean, IProgressMonitor)"><CODE>commitWorkingCopy(boolean, IProgressMonitor)</CODE></A>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html#restore()">restore</A></CODE> in interface <CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/IWorkingCopy.html" title="interface in org.eclipse.wst.jsdt.core">IWorkingCopy</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></CODE> - if the contents of the original element
cannot be accessed. Reasons include:
<ul>
<li> The original JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="findFunctions(org.eclipse.wst.jsdt.core.IFunction)"><!-- --></A><H3>
findFunctions</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A>[] <B>findFunctions</B>(<A HREF="../../../../../org/eclipse/wst/jsdt/core/IFunction.html" title="interface in org.eclipse.wst.jsdt.core">IFunction</A>&nbsp;function)</PRE>
<DL>
<DD>Finds the function in this javaScript file that correspond to
the given function.
Returns <code>null</code> if no such function can be found
or if the given element is not included in a javaScript file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>function</CODE> - the given function
<DT><B>Returns:</B><DD>the found functions in this javaScript file that correspond to the given function</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IJavaScriptUnit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptProject.html" title="interface in org.eclipse.wst.jsdt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJsGlobalScopeContainer.html" title="interface in org.eclipse.wst.jsdt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IJavaScriptUnit.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>