/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/BeanShell.html
HTML | 766 lines | 679 code | 75 blank | 12 comment | 0 complexity | 3c98d5311a5b323e78bcaf3657b10f61 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <!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_14) on Tue Jul 22 07:13:44 GMT-08:00 2008 -->
- <TITLE>
- BeanShell (jEdit API)
- </TITLE>
- <META NAME="keywords" CONTENT="org.gjt.sp.jedit.BeanShell class">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
- <NOSCRIPT>
- </NOSCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" >
- <!-- ========= 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> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BeanShell.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/gjt/sp/jedit/ActionSet.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/jedit/BeanShellAction.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/jedit/BeanShell.html" target="_top"><B>FRAMES</B></A>
- <A HREF="BeanShell.html" target="_top"><B>NO FRAMES</B></A>
-
- <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.gjt.sp.jedit</FONT>
- <BR>
- Class BeanShell</H2>
- <PRE>
- java.lang.Object
- <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.BeanShell</B>
- </PRE>
- <HR>
- <DL>
- <DT><PRE>public class <B>BeanShell</B><DT>extends java.lang.Object</DL>
- </PRE>
- <P>
- BeanShell is jEdit's extension language.<p>
- When run from jEdit, BeanShell code has access to the following predefined
- variables:
- <ul>
- <li><code>view</code> - the currently active <A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit"><CODE>View</CODE></A>.</li>
- <li><code>editPane</code> - the currently active <A HREF="../../../../org/gjt/sp/jedit/EditPane.html" title="class in org.gjt.sp.jedit"><CODE>EditPane</CODE></A>.</li>
- <li><code>textArea</code> - the edit pane's <A HREF="../../../../org/gjt/sp/jedit/textarea/JEditTextArea.html" title="class in org.gjt.sp.jedit.textarea"><CODE>JEditTextArea</CODE></A>.</li>
- <li><code>buffer</code> - the edit pane's <A HREF="../../../../org/gjt/sp/jedit/Buffer.html" title="class in org.gjt.sp.jedit"><CODE>Buffer</CODE></A>.</li>
- <li><code>wm</code> - the view's <A HREF="../../../../org/gjt/sp/jedit/gui/DockableWindowManager.html" title="class in org.gjt.sp.jedit.gui"><CODE>DockableWindowManager</CODE></A>.</li>
- <li><code>scriptPath</code> - the path name of the currently executing
- BeanShell script.</li>
- </ul>
- <P>
- <P>
- <HR>
- <P>
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <A NAME="constructor_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>Constructor Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#BeanShell()">BeanShell</A></B>()</CODE>
- <BR>
- </TD>
- </TR>
- </TABLE>
-
- <!-- ========== 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>static java.lang.Object</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#_eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String)">_eval</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command)</CODE>
- <BR>
- Evaluates the specified BeanShell expression.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#_runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean)">_runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace)</CODE>
- <BR>
- Runs a BeanShell script.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#_runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, org.gjt.sp.jedit.bsh.NameSpace)">_runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)</CODE>
- <BR>
- Runs a BeanShell script.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../org/gjt/sp/jedit/bsh/BshMethod.html" title="class in org.gjt.sp.jedit.bsh">BshMethod</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#cacheBlock(java.lang.String, java.lang.String, boolean)">cacheBlock</A></B>(java.lang.String id,
- java.lang.String code,
- boolean namespace)</CODE>
- <BR>
- Caches a block of code, returning a handle that can be passed to
- runCachedBlock().</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.Object</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String)">eval</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command)</CODE>
- <BR>
- Evaluates the specified BeanShell expression.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.Object</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String, boolean)">eval</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command,
- boolean rethrowBshErrors)</CODE>
- <BR>
- <B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_eval()</code> or <code>eval()</code> instead.</I></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.Object</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#eval(org.gjt.sp.jedit.View, java.lang.String, boolean)">eval</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String command,
- boolean rethrowBshErrors)</CODE>
- <BR>
- <B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_eval()</code> or <code>eval()</code> instead.</I></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#evalSelection(org.gjt.sp.jedit.View, org.gjt.sp.jedit.textarea.JEditTextArea)">evalSelection</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/textarea/JEditTextArea.html" title="class in org.gjt.sp.jedit.textarea">JEditTextArea</A> textArea)</CODE>
- <BR>
- Evaluates the text selected in the specified text area.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#getNameSpace()">getNameSpace</A></B>()</CODE>
- <BR>
- Returns the global namespace.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#isScriptRunning()">isScriptRunning</A></B>()</CODE>
- <BR>
- Returns if a BeanShell script or macro is currently running.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.Object</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#runCachedBlock(org.gjt.sp.jedit.bsh.BshMethod, org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace)">runCachedBlock</A></B>(<A HREF="../../../../org/gjt/sp/jedit/bsh/BshMethod.html" title="class in org.gjt.sp.jedit.bsh">BshMethod</A> method,
- <A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)</CODE>
- <BR>
- Runs a cached block of code in the specified namespace.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#runScript(org.gjt.sp.jedit.View, java.lang.String, boolean, boolean)">runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- boolean ownNamespace,
- boolean rethrowBshErrors)</CODE>
- <BR>
- <B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- instead.</I></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean)">runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace)</CODE>
- <BR>
- Runs a BeanShell script.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean, boolean)">runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace,
- boolean rethrowBshErrors)</CODE>
- <BR>
- <B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- instead.</I></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, org.gjt.sp.jedit.bsh.NameSpace)">runScript</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)</CODE>
- <BR>
- Runs a BeanShell script.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#showEvaluateDialog(org.gjt.sp.jedit.View)">showEvaluateDialog</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view)</CODE>
- <BR>
- Prompts for a BeanShell expression to evaluate.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/BeanShell.html#showEvaluateLinesDialog(org.gjt.sp.jedit.View)">showEvaluateLinesDialog</A></B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view)</CODE>
- <BR>
- Evaluates the specified script for each selected line.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <A NAME="constructor_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>Constructor Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="BeanShell()"><!-- --></A><H3>
- BeanShell</H3>
- <PRE>
- public <B>BeanShell</B>()</PRE>
- <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="evalSelection(org.gjt.sp.jedit.View, org.gjt.sp.jedit.textarea.JEditTextArea)"><!-- --></A><H3>
- evalSelection</H3>
- <PRE>
- public static void <B>evalSelection</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/textarea/JEditTextArea.html" title="class in org.gjt.sp.jedit.textarea">JEditTextArea</A> textArea)</PRE>
- <DL>
- <DD>Evaluates the text selected in the specified text area.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 2.7pre2</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="showEvaluateDialog(org.gjt.sp.jedit.View)"><!-- --></A><H3>
- showEvaluateDialog</H3>
- <PRE>
- public static void <B>showEvaluateDialog</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view)</PRE>
- <DL>
- <DD>Prompts for a BeanShell expression to evaluate.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 2.7pre2</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="showEvaluateLinesDialog(org.gjt.sp.jedit.View)"><!-- --></A><H3>
- showEvaluateLinesDialog</H3>
- <PRE>
- public static void <B>showEvaluateLinesDialog</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view)</PRE>
- <DL>
- <DD>Evaluates the specified script for each selected line.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 4.0pre1</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean)"><!-- --></A><H3>
- runScript</H3>
- <PRE>
- public static void <B>runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace)</PRE>
- <DL>
- <DD>Runs a BeanShell script. Errors are shown in a dialog box.<p>
- If the <code>in</code> parameter is non-null, the script is
- read from that stream; otherwise it is read from the file identified
- by <code>path</code>.<p>
- The <code>scriptPath</code> BeanShell variable is set to the path
- name of the script.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>path</CODE> - The script file's VFS path.<DD><CODE>in</CODE> - The reader to read the script from, or <code>null</code>.<DD><CODE>ownNamespace</CODE> - If set to <code>false</code>, methods and
- variables defined in the script will be available to all future
- uses of BeanShell; if set to <code>true</code>, they will be lost as
- soon as the script finishes executing. jEdit uses a value of
- <code>false</code> when running startup scripts, and a value of
- <code>true</code> when running all other macros.<DT><B>Since:</B></DT>
- <DD>jEdit 4.0pre7</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, org.gjt.sp.jedit.bsh.NameSpace)"><!-- --></A><H3>
- runScript</H3>
- <PRE>
- public static void <B>runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)</PRE>
- <DL>
- <DD>Runs a BeanShell script. Errors are shown in a dialog box.<p>
- If the <code>in</code> parameter is non-null, the script is
- read from that stream; otherwise it is read from the file identified
- by <code>path</code>.<p>
- The <code>scriptPath</code> BeanShell variable is set to the path
- name of the script.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>path</CODE> - The script file's VFS path.<DD><CODE>in</CODE> - The reader to read the script from, or <code>null</code>.<DD><CODE>namespace</CODE> - The namespace to run the script in.<DT><B>Since:</B></DT>
- <DD>jEdit 4.2pre5</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="_runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean)"><!-- --></A><H3>
- _runScript</H3>
- <PRE>
- public static void <B>_runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Runs a BeanShell script. Errors are passed to the caller.<p>
- If the <code>in</code> parameter is non-null, the script is
- read from that stream; otherwise it is read from the file identified
- by <code>path</code>.<p>
- The <code>scriptPath</code> BeanShell variable is set to the path
- name of the script.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>path</CODE> - The script file's VFS path.<DD><CODE>in</CODE> - The reader to read the script from, or <code>null</code>.<DD><CODE>ownNamespace</CODE> - If set to <code>false</code>, methods and
- variables defined in the script will be available to all future
- uses of BeanShell; if set to <code>true</code>, they will be lost as
- soon as the script finishes executing. jEdit uses a value of
- <code>false</code> when running startup scripts, and a value of
- <code>true</code> when running all other macros.
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE> - instances are thrown when various BeanShell errors
- occur<DT><B>Since:</B></DT>
- <DD>jEdit 4.0pre7</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="_runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, org.gjt.sp.jedit.bsh.NameSpace)"><!-- --></A><H3>
- _runScript</H3>
- <PRE>
- public static void <B>_runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Runs a BeanShell script. Errors are passed to the caller.<p>
- If the <code>in</code> parameter is non-null, the script is
- read from that stream; otherwise it is read from the file identified
- by <code>path</code>.<p>
- The <code>scriptPath</code> BeanShell variable is set to the path
- name of the script.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>path</CODE> - The script file's VFS path.<DD><CODE>in</CODE> - The reader to read the script from, or <code>null</code>.<DD><CODE>namespace</CODE> - The namespace to run the script in.
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE> - instances are thrown when various BeanShell errors
- occur<DT><B>Since:</B></DT>
- <DD>jEdit 4.2pre5</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String)"><!-- --></A><H3>
- eval</H3>
- <PRE>
- public static java.lang.Object <B>eval</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command)</PRE>
- <DL>
- <DD>Evaluates the specified BeanShell expression. Errors are reported in
- a dialog box.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>namespace</CODE> - The namespace<DD><CODE>command</CODE> - The expression<DT><B>Since:</B></DT>
- <DD>jEdit 4.0pre8</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="_eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String)"><!-- --></A><H3>
- _eval</H3>
- <PRE>
- public static java.lang.Object <B>_eval</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Evaluates the specified BeanShell expression. Unlike
- <code>eval()</code>, this method passes any exceptions to the caller.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>view</CODE> - The view. Within the script, references to
- <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- are determined with reference to this parameter.<DD><CODE>namespace</CODE> - The namespace<DD><CODE>command</CODE> - The expression
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE> - instances are thrown when various BeanShell
- errors occur<DT><B>Since:</B></DT>
- <DD>jEdit 3.2pre7</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="cacheBlock(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
- cacheBlock</H3>
- <PRE>
- public static <A HREF="../../../../org/gjt/sp/jedit/bsh/BshMethod.html" title="class in org.gjt.sp.jedit.bsh">BshMethod</A> <B>cacheBlock</B>(java.lang.String id,
- java.lang.String code,
- boolean namespace)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Caches a block of code, returning a handle that can be passed to
- runCachedBlock().
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>id</CODE> - An identifier. If null, a unique identifier is generated<DD><CODE>code</CODE> - The code<DD><CODE>namespace</CODE> - If true, the namespace will be set
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE> - instances are thrown when various BeanShell errors
- occur<DT><B>Since:</B></DT>
- <DD>jEdit 4.1pre1</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="runCachedBlock(org.gjt.sp.jedit.bsh.BshMethod, org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace)"><!-- --></A><H3>
- runCachedBlock</H3>
- <PRE>
- public static java.lang.Object <B>runCachedBlock</B>(<A HREF="../../../../org/gjt/sp/jedit/bsh/BshMethod.html" title="class in org.gjt.sp.jedit.bsh">BshMethod</A> method,
- <A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Runs a cached block of code in the specified namespace. Faster than
- evaluating the block each time.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>method</CODE> - The method instance returned by cacheBlock()<DD><CODE>view</CODE> - The view<DD><CODE>namespace</CODE> - The namespace to run the code in
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE> - instances are thrown when various BeanShell
- errors occur<DT><B>Since:</B></DT>
- <DD>jEdit 4.1pre1</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="isScriptRunning()"><!-- --></A><H3>
- isScriptRunning</H3>
- <PRE>
- public static boolean <B>isScriptRunning</B>()</PRE>
- <DL>
- <DD>Returns if a BeanShell script or macro is currently running.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 2.7pre2</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getNameSpace()"><!-- --></A><H3>
- getNameSpace</H3>
- <PRE>
- public static <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> <B>getNameSpace</B>()</PRE>
- <DL>
- <DD>Returns the global namespace.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 3.2pre5</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="runScript(org.gjt.sp.jedit.View, java.lang.String, boolean, boolean)"><!-- --></A><H3>
- runScript</H3>
- <PRE>
- public static void <B>runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- boolean ownNamespace,
- boolean rethrowBshErrors)</PRE>
- <DL>
- <DD><B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- instead.</I>
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="runScript(org.gjt.sp.jedit.View, java.lang.String, java.io.Reader, boolean, boolean)"><!-- --></A><H3>
- runScript</H3>
- <PRE>
- public static void <B>runScript</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String path,
- java.io.Reader in,
- boolean ownNamespace,
- boolean rethrowBshErrors)</PRE>
- <DL>
- <DD><B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- instead.</I>
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="eval(org.gjt.sp.jedit.View, java.lang.String, boolean)"><!-- --></A><H3>
- eval</H3>
- <PRE>
- public static java.lang.Object <B>eval</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- java.lang.String command,
- boolean rethrowBshErrors)</PRE>
- <DL>
- <DD><B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_eval()</code> or <code>eval()</code> instead.</I>
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="eval(org.gjt.sp.jedit.View, org.gjt.sp.jedit.bsh.NameSpace, java.lang.String, boolean)"><!-- --></A><H3>
- eval</H3>
- <PRE>
- public static java.lang.Object <B>eval</B>(<A HREF="../../../../org/gjt/sp/jedit/View.html" title="class in org.gjt.sp.jedit">View</A> view,
- <A HREF="../../../../org/gjt/sp/jedit/bsh/NameSpace.html" title="class in org.gjt.sp.jedit.bsh">NameSpace</A> namespace,
- java.lang.String command,
- boolean rethrowBshErrors)</PRE>
- <DL>
- <DD><B>Deprecated.</B> <I>The <code>rethrowBshErrors</code> parameter is now
- obsolete; call <code>_eval()</code> or <code>eval()</code> instead.</I>
- <P>
- <DD><DL>
- </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> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BeanShell.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/gjt/sp/jedit/ActionSet.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/jedit/BeanShellAction.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/jedit/BeanShell.html" target="_top"><B>FRAMES</B></A>
- <A HREF="BeanShell.html" target="_top"><B>NO FRAMES</B></A>
-
- <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <HR>
- </BODY>
- </HTML>