blob: 7489957f8ac75b239b2e2591eece1d7ed63488a3 [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:59 CDT 2008 -->
<TITLE>
ICodeSnippetRequestor
</TITLE>
<META NAME="keywords" CONTENT="org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ICodeSnippetRequestor";
}
</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/ICodeSnippetRequestor.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/IEvaluationContext.html" title="interface in org.eclipse.wst.jsdt.core.eval"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ICodeSnippetRequestor.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.eval</FONT>
<BR>
Interface ICodeSnippetRequestor</H2>
<HR>
<DL>
<DT><PRE>public interface <B>ICodeSnippetRequestor</B></DL>
</PRE>
<P>
A code snippet requestor implements a callback interface for installing
the class files for a code snippet on the target and running it.
In addition, it receives compilation problems detected during code snippet
compilation.
<p>
Clients may implement this interface to provide a bridge a running JavaScript VM.
</p>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><CODE>IEvaluationContext#evaluateCodeSnippet(String, ICodeSnippetRequestor, org.eclipse.core.runtime.IProgressMonitor)</CODE>,
<CODE>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.</CODE></DL>
<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/eval/ICodeSnippetRequestor.html#CODE_SNIPPET">CODE_SNIPPET</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates a compilation problem related to a code snippet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#DELEGATE_THIS">DELEGATE_THIS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the field that represent 'this' in a snippet class
instance.</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/eval/ICodeSnippetRequestor.html#IMPORT">IMPORT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates a compilation problem related to an import declaration.</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/eval/ICodeSnippetRequestor.html#INTERNAL">INTERNAL</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates an internal problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#LOCAL_VAR_PREFIX">LOCAL_VAR_PREFIX</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The prefix of fields that represent the local variables in a snippet
class.</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/eval/ICodeSnippetRequestor.html#PACKAGE">PACKAGE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates a compilation problem related to a package declaration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#RESULT_TYPE_FIELD">RESULT_TYPE_FIELD</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The field of type java.lang.Class on the code snippet instance that contains the type of the returned value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#RESULT_VALUE_FIELD">RESULT_VALUE_FIELD</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the field (of type <code>java.lang.Object</code>) on the code
snippet instance that contains the returned value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#RUN_METHOD">RUN_METHOD</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the instance method in the snippet class that runs the code
snippet.</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/eval/ICodeSnippetRequestor.html#VARIABLE">VARIABLE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates a compilation problem related to a global variable.</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;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptClassFiles(byte[][], java.lang.String[][], java.lang.String)">acceptClassFiles</A></B>(byte[][]&nbsp;classFileBytes,
java.lang.String[][]&nbsp;classFileCompoundNames,
java.lang.String&nbsp;codeSnippetClassName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends the given class files to the target and loads them.</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/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)">acceptProblem</A></B>(IMarker&nbsp;problemMarker,
java.lang.String&nbsp;fragmentSource,
int&nbsp;fragmentKind)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies of an evaluation problem.</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="LOCAL_VAR_PREFIX"><!-- --></A><H3>
LOCAL_VAR_PREFIX</H3>
<PRE>
static final java.lang.String <B>LOCAL_VAR_PREFIX</B></PRE>
<DL>
<DD>The prefix of fields that represent the local variables in a snippet
class.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.LOCAL_VAR_PREFIX">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DELEGATE_THIS"><!-- --></A><H3>
DELEGATE_THIS</H3>
<PRE>
static final java.lang.String <B>DELEGATE_THIS</B></PRE>
<DL>
<DD>The name of the field that represent 'this' in a snippet class
instance.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.DELEGATE_THIS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="RUN_METHOD"><!-- --></A><H3>
RUN_METHOD</H3>
<PRE>
static final java.lang.String <B>RUN_METHOD</B></PRE>
<DL>
<DD>The name of the instance method in the snippet class that runs the code
snippet.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.RUN_METHOD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="RESULT_VALUE_FIELD"><!-- --></A><H3>
RESULT_VALUE_FIELD</H3>
<PRE>
static final java.lang.String <B>RESULT_VALUE_FIELD</B></PRE>
<DL>
<DD>The name of the field (of type <code>java.lang.Object</code>) on the code
snippet instance that contains the returned value.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.RESULT_VALUE_FIELD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="RESULT_TYPE_FIELD"><!-- --></A><H3>
RESULT_TYPE_FIELD</H3>
<PRE>
static final java.lang.String <B>RESULT_TYPE_FIELD</B></PRE>
<DL>
<DD>The field of type java.lang.Class on the code snippet instance that contains the type of the returned value.
The name of the field (of type <code>java.lang.Class</code>) on the code
snippet instance that contains the runtime type of the returned value.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.RESULT_TYPE_FIELD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="VARIABLE"><!-- --></A><H3>
VARIABLE</H3>
<PRE>
static final int <B>VARIABLE</B></PRE>
<DL>
<DD>Indicates a compilation problem related to a global variable.
<p>
Note: if the problem is on the type of the variable, the marker
source line number is -1; if the name of the variable, line number is 0;
otherwise, the marker source line number is relative to the initializer
code.
</p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)"><CODE>acceptProblem(IMarker, String, int)</CODE></A>,
<A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.VARIABLE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="CODE_SNIPPET"><!-- --></A><H3>
CODE_SNIPPET</H3>
<PRE>
static final int <B>CODE_SNIPPET</B></PRE>
<DL>
<DD>Indicates a compilation problem related to a code snippet.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)"><CODE>acceptProblem(IMarker, String, int)</CODE></A>,
<A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.CODE_SNIPPET">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="IMPORT"><!-- --></A><H3>
IMPORT</H3>
<PRE>
static final int <B>IMPORT</B></PRE>
<DL>
<DD>Indicates a compilation problem related to an import declaration.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)"><CODE>acceptProblem(IMarker, String, int)</CODE></A>,
<A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.IMPORT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PACKAGE"><!-- --></A><H3>
PACKAGE</H3>
<PRE>
static final int <B>PACKAGE</B></PRE>
<DL>
<DD>Indicates a compilation problem related to a package declaration.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)"><CODE>acceptProblem(IMarker, String, int)</CODE></A>,
<A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.PACKAGE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="INTERNAL"><!-- --></A><H3>
INTERNAL</H3>
<PRE>
static final int <B>INTERNAL</B></PRE>
<DL>
<DD>Indicates an internal problem.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html#acceptProblem(IMarker, java.lang.String, int)"><CODE>acceptProblem(IMarker, String, int)</CODE></A>,
<A HREF="../../../../../../constant-values.html#org.eclipse.wst.jsdt.core.eval.ICodeSnippetRequestor.INTERNAL">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="acceptClassFiles(byte[][], java.lang.String[][], java.lang.String)"><!-- --></A><H3>
acceptClassFiles</H3>
<PRE>
boolean <B>acceptClassFiles</B>(byte[][]&nbsp;classFileBytes,
java.lang.String[][]&nbsp;classFileCompoundNames,
java.lang.String&nbsp;codeSnippetClassName)</PRE>
<DL>
<DD>Sends the given class files to the target and loads them. If the given
class name is not <code>null</code>, run the code snippet with this class
name. Returns whether the code snippet could be deployed. Note it must
return <code>true</code> even if running the code snippet threw an exception.
<p>
The details of sending and loading the class files are left up to
implementations.
</p>
<p>
To run a code snippet, an implementation should create a new instance of
the given code snippet class and call (directly or using another means) its
<code>RUN_METHOD</code>.
</p>
<p>
Also before the call, the implementation should copy the values of the local
variables (if any) into the corresponding fields of the code snippet instance.
A field name is formed of <code>LOCAL_VAR_PREFIX</code>
preceded the name of the local variable. For example, the field name for
local variable <code>"myLocal"</code> is <code>"val$myLocal"</code> (assuming the
value of <code>LOCAL_VAR_PREFIX</code> is "val$"). In the
same way, the implementation should copy the value of the 'this' object into the
field called <code>DELEGATE_THIS</code>.
</p>
<p>
After calling the <code>RUN_METHOD</code>, the values of the local
variables may have been modified. The implementation must copy the
values of the fields back into the local variables.
</p>
<p>
Finally, the overall value returned by the code snippet can be retrieved
from the special field <code>RESULT_VALUE_FIELD</code>
on the code snippet instance.
The <code>Class</code> that is the runtime type of the returned value can be
retrieved from the special field <code>RESULT_TYPE_FIELD</code>.
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>classFileBytes</CODE> - the list of class file bytes<DD><CODE>classFileCompoundNames</CODE> - the corresponding list of class file type
compound names (example of a compound name: {"java", "lang", "Object"})<DD><CODE>codeSnippetClassName</CODE> - name of the actual class to instantiate and run,
or <code>null</code> if none
<DT><B>Returns:</B><DD><code>true</code> if the code snippet was successfully deployed</DL>
</DD>
</DL>
<HR>
<A NAME="acceptProblem(IMarker, java.lang.String, int)"><!-- --></A><H3>
acceptProblem</H3>
<PRE>
void <B>acceptProblem</B>(IMarker&nbsp;problemMarker,
java.lang.String&nbsp;fragmentSource,
int&nbsp;fragmentKind)</PRE>
<DL>
<DD>Notifies of an evaluation problem.
Problems can arise for source of the following kinds:
<p>
<ul>
<li>global variable (<code>VARIABLE</code>) - fragment source is name of
variable</li>
<li>code snippet (<code>CODE_SNIPPET</code>) - fragment source is code
snippet</li>
<li>import declaration (<code>IMPORT</code>) - fragment source is
import</li>
<li>package declaration (<code>PACKAGE</code>) - fragment source is
package declaration</li>
<li>other (<code>INTERNAL</code>) - no fragment source is involved, internal error occurred.</li>
</ul>
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>problemMarker</CODE> - the problem marker (cannot be null)<DD><CODE>fragmentSource</CODE> - the fragment source<DD><CODE>fragmentKind</CODE> - the kind of source fragment; one of:
<code>VARIABLE</code>, <code>CODE_SNIPPET</code>, <code>IMPORT</code>,
<code>PACKAGE</code>, or <code>INTERNAL</code></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/ICodeSnippetRequestor.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/eclipse/wst/jsdt/core/eval/IEvaluationContext.html" title="interface in org.eclipse.wst.jsdt.core.eval"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/eclipse/wst/jsdt/core/eval/ICodeSnippetRequestor.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ICodeSnippetRequestor.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>