blob: 8941a980cdd7d47422e423ffc1c80517cf570843 [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:49 CDT 2008 -->
<TITLE>
IOpenable
</TITLE>
<META NAME="keywords" CONTENT="org.eclipse.wst.jsdt.core.IOpenable interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="IOpenable";
}
</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/IOpenable.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/IMember.html" title="interface in org.eclipse.wst.jsdt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.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/IOpenable.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IOpenable.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&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 IOpenable</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IClassFile.html" title="interface in org.eclipse.wst.jsdt.core">IClassFile</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptModel.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptModel</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptProject.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptProject</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html" title="interface in org.eclipse.wst.jsdt.core">IJavaScriptUnit</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageFragment.html" title="interface in org.eclipse.wst.jsdt.core">IPackageFragment</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageFragmentRoot.html" title="interface in org.eclipse.wst.jsdt.core">IPackageFragmentRoot</A>, <A HREF="../../../../../org/eclipse/wst/jsdt/core/ITypeRoot.html" title="interface in org.eclipse.wst.jsdt.core">ITypeRoot</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>IOpenable</B></DL>
</PRE>
<P>
Common protocol for JavaScript elements that must be opened before they can be
navigated or modified. Opening a textual element (such as a javaScript file)
involves opening a buffer on its contents. While open, any changes to the buffer
can be reflected in the element's structure;
see <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#isConsistent()"><CODE>isConsistent()</CODE></A> and <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>makeConsistent(IProgressMonitor)</CODE></A>.
<p>
To reduce complexity in clients, elements are automatically opened
by the JavaScript model as element properties are accessed. The JavaScript model maintains
an LRU cache of open elements, and automatically closes elements as they
are swapped out of the cache to make room for other elements. Elements with
unsaved changes are never removed from the cache, and thus, if the client
maintains many open elements with unsaved
changes, the LRU cache can grow in size (in this case the cache is not
bounded). However, as elements are saved, the cache will shrink back to its
original bounded size.
</p>
<p>
To open an element, all openable parent elements must be open.
The JavaScript model automatically opens parent elements, as it automatically opens elements.
Opening an element may provide access to direct children and other descendants,
but does not automatically open any descendents which are themselves <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html" title="interface in org.eclipse.wst.jsdt.core"><CODE>IOpenable</CODE></A>.
For example, opening a compilation unit provides access to all its constituent elements,
but opening a package fragment does not open all compilation units in the package fragment.
</p>
<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>
<!-- ========== 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/IOpenable.html#close()">close</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes this element and its buffer (if any).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#findRecommendedLineSeparator()">findRecommendedLineSeparator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finds and returns the recommended line separator for this 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/IBuffer.html" title="interface in org.eclipse.wst.jsdt.core">IBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#getBuffer()">getBuffer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the buffer opened for this element, or <code>null</code>
if this element does not have a buffer.</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/IOpenable.html#hasUnsavedChanges()">hasUnsavedChanges</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this element is open and:
its buffer has unsaved changes, or
one of its descendants has unsaved changes, or
a working copy has been created on one of this
element's children and has not yet destroyed
</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/IOpenable.html#isConsistent()">isConsistent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the element is consistent with its underlying resource or buffer.</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/IOpenable.html#isOpen()">isOpen</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether this openable is open.</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/IOpenable.html#makeConsistent(IProgressMonitor)">makeConsistent</A></B>(IProgressMonitor&nbsp;progress)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes this element consistent with its underlying resource or buffer
by updating the element's structure and properties as necessary.</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/IOpenable.html#open(IProgressMonitor)">open</A></B>(IProgressMonitor&nbsp;progress)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens this element and all parent elements that are not already open.</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/IOpenable.html#save(IProgressMonitor, boolean)">save</A></B>(IProgressMonitor&nbsp;progress,
boolean&nbsp;force)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves any changes in this element's buffer to its underlying resource
via a workspace resource operation.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="close()"><!-- --></A><H3>
close</H3>
<PRE>
void <B>close</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Closes this element and its buffer (if any).
Closing an element which is not open has no effect.
<p>Note: although <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#close()"><CODE>close()</CODE></A> is exposed in the API, clients are
not expected to open and close elements - the JavaScript model does this automatically
as elements are accessed.
<P>
<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 an error occurs closing this element</DL>
</DD>
</DL>
<HR>
<A NAME="findRecommendedLineSeparator()"><!-- --></A><H3>
findRecommendedLineSeparator</H3>
<PRE>
java.lang.String <B>findRecommendedLineSeparator</B>()
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Finds and returns the recommended line separator for this element.
The element's buffer is first searched and the first line separator in this buffer is returned if any.
Otherwise the preference <CODE>org.eclipse.core.runtime.Platform#PREF_LINE_SEPARATOR</CODE>
on this element's project or workspace is returned.
Finally if no such preference is set, the system line separator is returned.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the recommended line separator for this element
<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="getBuffer()"><!-- --></A><H3>
getBuffer</H3>
<PRE>
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IBuffer.html" title="interface in org.eclipse.wst.jsdt.core">IBuffer</A> <B>getBuffer</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 buffer opened for this element, or <code>null</code>
if this element does not have a buffer.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the buffer opened for this element, or <code>null</code>
if this element does not have a buffer
<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="hasUnsavedChanges()"><!-- --></A><H3>
hasUnsavedChanges</H3>
<PRE>
boolean <B>hasUnsavedChanges</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 <code>true</code> if this element is open and:
<ul>
<li>its buffer has unsaved changes, or
<li>one of its descendants has unsaved changes, or
<li>a working copy has been created on one of this
element's children and has not yet destroyed
</ul>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if this element is open and:
<ul>
<li>its buffer has unsaved changes, or
<li>one of its descendants has unsaved changes, or
<li>a working copy has been created on one of this
element's children and has not yet destroyed
</ul>
<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="isConsistent()"><!-- --></A><H3>
isConsistent</H3>
<PRE>
boolean <B>isConsistent</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 whether the element is consistent with its underlying resource or buffer.
The element is consistent when opened, and is consistent if the underlying resource
or buffer has not been modified since it was last consistent.
<p>NOTE: Child consistency is not considered. For example, a package fragment
responds <code>true</code> when it knows about all of its
compilation units present in its underlying folder. However, one or more of
the compilation units could be inconsistent.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if the element is consistent with its underlying resource or buffer, false otherwise.
<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.<DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>makeConsistent(IProgressMonitor)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isOpen()"><!-- --></A><H3>
isOpen</H3>
<PRE>
boolean <B>isOpen</B>()</PRE>
<DL>
<DD>Returns whether this openable is open. This is a handle-only method.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if this openable is open, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="makeConsistent(IProgressMonitor)"><!-- --></A><H3>
makeConsistent</H3>
<PRE>
void <B>makeConsistent</B>(IProgressMonitor&nbsp;progress)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Makes this element consistent with its underlying resource or buffer
by updating the element's structure and properties as necessary.
<p>
Note: Using this functionality on a working copy will interfere with any
subsequent reconciling operation. Indeed, the next
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>IJavaScriptUnit.reconcile(int, boolean, WorkingCopyOwner, IProgressMonitor)</CODE></A> or
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>IJavaScriptUnit.reconcile(int, boolean, boolean, WorkingCopyOwner, IProgressMonitor)</CODE></A>
operation will not account for changes which occurred before an
explicit use of <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#makeConsistent(IProgressMonitor)"><CODE>makeConsistent(IProgressMonitor)</CODE></A>
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>progress</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 the element is unable to access the contents
of its underlying resource. Reasons include:
<ul>
<li>This JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul><DT><B>See Also:</B><DD><A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#isConsistent()"><CODE>isConsistent()</CODE></A>,
<A HREF="../../../../../org/eclipse/wst/jsdt/core/IJavaScriptUnit.html#reconcile(int, boolean, org.eclipse.wst.jsdt.core.WorkingCopyOwner, IProgressMonitor)"><CODE>IJavaScriptUnit.reconcile(int, boolean, WorkingCopyOwner, IProgressMonitor)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="open(IProgressMonitor)"><!-- --></A><H3>
open</H3>
<PRE>
void <B>open</B>(IProgressMonitor&nbsp;progress)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Opens this element and all parent elements that are not already open.
For compilation units, a buffer is opened on the contents of the underlying resource.
<p>Note: although <A HREF="../../../../../org/eclipse/wst/jsdt/core/IOpenable.html#open(IProgressMonitor)"><CODE>open(IProgressMonitor)</CODE></A> is exposed in the API, clients are
not expected to open and close elements - the JavaScript model does this automatically
as elements are accessed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>progress</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 an error occurs accessing the contents
of its underlying resource. Reasons include:
<ul>
<li>This JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="save(IProgressMonitor, boolean)"><!-- --></A><H3>
save</H3>
<PRE>
void <B>save</B>(IProgressMonitor&nbsp;progress,
boolean&nbsp;force)
throws <A HREF="../../../../../org/eclipse/wst/jsdt/core/JavaScriptModelException.html" title="class in org.eclipse.wst.jsdt.core">JavaScriptModelException</A></PRE>
<DL>
<DD>Saves any changes in this element's buffer to its underlying resource
via a workspace resource operation. This has no effect if the element has no underlying
buffer, or if there are no unsaved changed in the buffer.
<p>
The <code>force</code> parameter controls how this method deals with
cases where the workbench is not completely in sync with the local file system.
If <code>false</code> is specified, this method will only attempt
to overwrite a corresponding file in the local file system provided
it is in sync with the workbench. This option ensures there is no
unintended data loss; it is the recommended setting.
However, if <code>true</code> is specified, an attempt will be made
to write a corresponding file in the local file system,
overwriting any existing one if need be.
In either case, if this method succeeds, the resource will be marked
as being local (even if it wasn't before).
<p>
As a result of this operation, the element is consistent with its underlying
resource or buffer.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>progress</CODE> - the given progress monitor<DD><CODE>force</CODE> - it controls how this method deals with
cases where the workbench is not completely in sync with the local file system
<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 an error occurs accessing the contents
of its underlying resource. Reasons include:
<ul>
<li>This JavaScript element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
<li>This JavaScript element is read-only (READ_ONLY)</li>
</ul></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/IOpenable.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/IMember.html" title="interface in org.eclipse.wst.jsdt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/eclipse/wst/jsdt/core/IPackageDeclaration.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/IOpenable.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IOpenable.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&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>