PageRenderTime 58ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/EditPlugin.html

#
HTML | 1037 lines | 909 code | 115 blank | 13 comment | 0 complexity | 8b267f38294f68be806c301bf7a9a348 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

Large files files are truncated, but you can click here to view the full file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:13:45 GMT-08:00 2008 -->
  6. <TITLE>
  7. EditPlugin (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.EditPlugin class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EditPlugin.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/EditPane.html" title="class in org.gjt.sp.jedit"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Broken.html" title="class in org.gjt.sp.jedit"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../index.html?org/gjt/sp/jedit/EditPlugin.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="EditPlugin.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit</FONT>
  66. <BR>
  67. Class EditPlugin</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.EditPlugin</B>
  71. </PRE>
  72. <DL>
  73. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/gjt/sp/jedit/EBPlugin.html" title="class in org.gjt.sp.jedit">EBPlugin</A>, <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Broken.html" title="class in org.gjt.sp.jedit">EditPlugin.Broken</A>, <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Deferred.html" title="class in org.gjt.sp.jedit">EditPlugin.Deferred</A></DD>
  74. </DL>
  75. <HR>
  76. <DL>
  77. <DT><PRE>public abstract class <B>EditPlugin</B><DT>extends java.lang.Object</DL>
  78. </PRE>
  79. <P>
  80. The abstract base class that every plugin must implement.
  81. Alternatively, instead of extending this class, a plugin core class can
  82. extend <A HREF="../../../../org/gjt/sp/jedit/EBPlugin.html" title="class in org.gjt.sp.jedit"><CODE>EBPlugin</CODE></A> to automatically receive EditBus messages.
  83. <h3>Basic plugin information properties</h3>
  84. Note that in all cases above where a <i>className</i> is needed, the fully
  85. qualified class name, including the package name, if any, must be used.<p>
  86. The following properties are required for jEdit to load the plugin:
  87. <ul>
  88. <li><code>plugin.<i>className</i>.activate</code> - set this to
  89. <code>defer</code> if your plugin only needs to be loaded when it is first
  90. invoked; set it to <code>startup</code> if your plugin must be loaded at
  91. startup regardless; set it to a whitespace-separated list of property names
  92. if your plugin should be loaded if at least one of these properties is set.
  93. Note that if this property is <b>not</b> set, the plugin will not work with
  94. jEdit 4.3final.
  95. </li>
  96. <li><code>plugin.<i>className</i>.name</code></li>
  97. <li><code>plugin.<i>className</i>.version</code></li>
  98. <li><code>plugin.<i>className</i>.jars</code> - only needed if your plugin
  99. bundles external JAR files. Contains a whitespace-separated list of JAR
  100. file names. Without this property, the plugin manager will leave behind the
  101. external JAR files when removing the plugin.</li>
  102. <li><code>plugin.<i>className</i>.files</code> - only needed if your plugin
  103. bundles external files like libraries which MUST reside in the local
  104. filesystem. Contains a whitespace-separated list of file names.
  105. Without this property, the plugin manager will leave behind the
  106. external files when removing the plugin.</li>
  107. <li><code>plugin.<i>className</i>.description</code> - the short description
  108. associated with the plugin. The short description is used by the Plugin
  109. Manager and on the list pages on Plugin Central. </li>
  110. </ul>
  111. The following properties are optional but recommended:
  112. <ul>
  113. <li><code>plugin.<i>className</i>.author</code></li>
  114. <li><code>plugin.<i>className</i>.usePluginHome</code> - whether
  115. the plugin uses the EditPlugin.getPluginHome API or not. Even
  116. if the plugin doesn't store any data, this property should be set
  117. so that the plugin manager can tell that there is no data stored.</li>
  118. <li><code>plugin.<i>className</i>.docs</code> - the path to plugin
  119. documentation in HTML format. </li>
  120. <li><code>plugin.<i>className</i>.longdescription</code> - the path to
  121. the long description in XHTML (no fancy stuff here, please - just proper
  122. XHTML subset with the basic tags: <tt>html, h1, h2, p, li, ul, ol, a href,b ,i, u, br/ </tt>)
  123. <p> The long description is extracted from the plugin at various times,
  124. primarily at plugin packaging time to update the data on the
  125. plugin detail pages of Plugin Central. </p>
  126. <p>
  127. If this property is left out, the default will be to look in a file
  128. called &lt;description.html&gt;. </p>
  129. </li>
  130. </ul>
  131. <p>
  132. For the previous two properties, if a relative path is supplied,
  133. it should be both </p>
  134. <ol>
  135. <li> relative to the location of the .props file (when it is in the source tree) </li>
  136. <li> relative to the root of the JAR (when it is packaged in the JAR file) </li>
  137. </ol>
  138. <p> Both conditions are easily satisfied if the .props file as well as
  139. description.html are both located in the root directory of the plugin,
  140. as well as the generated JAR. </p>
  141. <h3>Plugin dependency properties</h3>
  142. <p>Plugin dependencies are also specified using properties.
  143. Each dependency is defined in a property named with
  144. <code>plugin.<i>className</i>.depend.</code> followed by a number.
  145. Dependencies must be numbered in order, starting from zero.
  146. This determines the order that dependent plugins get loaded and activated,
  147. so order is very important. </p>
  148. <p> The value of a dependency property has one of the following forms: </p>
  149. <ul>
  150. <li> <code>jdk <i>minimumJavaVersion</i></code> </li>
  151. <li> <code>jedit <i>minimumjEditVersion</i></code> - note that this must be
  152. a version number in the form returned by <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getBuild()"><CODE>jEdit.getBuild()</CODE></A>,
  153. not <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getVersion()"><CODE>jEdit.getVersion()</CODE></A>. Note that the documentation here describes
  154. the jEdit 4.2 plugin API, so this dependency must be set to at least
  155. <code>04.02.99.00</code> (4.2final).</li>
  156. <li><code><i>pluginClassName pluginVersion</i></code> - the fully quailified
  157. plugin class name with package must be specified.</li>
  158. <li><code>optional plugin <i>pluginClassName pluginVersion</i></code> -
  159. an optional dependency, indicating that the plugin will work without it,
  160. but that the dependency should be loaded before this plugin. </li>
  161. </ul>
  162. <p>In this example, the ProjectViewer plugin is an optional dependency of
  163. the Console, beacause the Console only listens to events from the ProjectViewer.
  164. It requires Jedit 4.2 final. </p>
  165. <pre>
  166. plugin.console.ConsolePlugin.depend.0=jedit 04.02.99.00
  167. plugin.console.ConsolePlugin.depend.1=jdk 1.5
  168. plugin.console.ConsolePlugin.depend.2=plugin errorlist.ErrorListPlugin 1.4
  169. plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugin 2.1.0.92
  170. </pre>
  171. <h3>Plugin menu item properties</h3>
  172. <p> To add your plugin to the view's <b>Plugins</b> menu, define one of these two
  173. properties: </p>
  174. <ul>
  175. <li><code>plugin.<i>className</i>.menu-item</code> - if this is defined,
  176. the action named by this property is added to the <b>Plugins</b> menu.</li>
  177. <li><code>plugin.<i>className</i>.menu</code> - if this is defined,
  178. a sub-menu is added to the <b>Plugins</b> menu whose content is the
  179. whitespace-separated list of action names in this property. A separator may
  180. be added to the sub-menu by listing <code>-</code> in the property.</li>
  181. </ul>
  182. <p>If you want the plugin's menu items to be determined at runtime, define a
  183. property <code>plugin.<i>className</i>.menu.code</code> to be BeanShell
  184. code that evaluates to an implementation of
  185. <A HREF="../../../../org/gjt/sp/jedit/menu/DynamicMenuProvider.html" title="interface in org.gjt.sp.jedit.menu"><CODE>DynamicMenuProvider</CODE></A>.</p>
  186. <p>
  187. To add your plugin to the file system browser's <b>Plugins</b> menu, define
  188. one of these two properties:
  189. </p>
  190. <ul>
  191. <li><code>plugin.<i>className</i>.browser-menu-item</code> - if this is
  192. defined, the action named by this property is added to the <b>Plugins</b>
  193. menu.</li>
  194. <li><code>plugin.<i>className</i>.browser-menu</code> - if this is defined,
  195. a sub-menu is added to the <b>Plugins</b> menu whose content is the
  196. whitespace-separated list of action names in this property. A separator may
  197. be added to the sub-menu by listing <code>-</code> in the property.</li>
  198. </ul>
  199. <p> In all cases, each action's
  200. menu item label is taken from the <code><i>actionName</i>.label</code>
  201. property. View actions are defined in an <code>actions.xml</code>
  202. file, file system browser actions are defined in a
  203. <code>browser.actions.xml</code> file; see <A HREF="../../../../org/gjt/sp/jedit/ActionSet.html" title="class in org.gjt.sp.jedit"><CODE>ActionSet</CODE></A>.
  204. </p>
  205. <h3>Plugin option pane properties</h3>
  206. <p>To add your plugin to the <b>Plugin Options</b> dialog box, define one of
  207. these two properties:
  208. </p>
  209. <ul>
  210. <li><code>plugin.<i>className</i>.option-pane=<i>paneName</i></code> - if this is defined,
  211. a single option pane with this name is added to the <b>Plugin Options</b>
  212. menu.</li>
  213. <li><code>plugin.<i>className</i>.option-group=<i>paneName1</i> [<i>paneName2 paneName3</i> ...]</code> - if this is defined,
  214. a branch node is added to the <b>Plugin Options</b> dialog box whose content
  215. is the whitespace-separated list of <i>paneNames</i> in this property.</li>
  216. </ul>
  217. Then for each option <i>paneName</i>, define these two properties:
  218. <ul>
  219. <li><code>options.<i>paneName</i>.label</code> - the label to show
  220. for the pane in the dialog box.</li>
  221. <li><code>options.<i>paneName</i>.code</code> - BeanShell code that
  222. evaluates to an instance of the <A HREF="../../../../org/gjt/sp/jedit/OptionPane.html" title="interface in org.gjt.sp.jedit"><CODE>OptionPane</CODE></A> class.</li>
  223. <h3>Example</h3>
  224. Here is an example set of plugin properties:
  225. <pre>plugin.QuickNotepadPlugin.activate=defer
  226. plugin.QuickNotepadPlugin.name=QuickNotepad
  227. plugin.QuickNotepadPlugin.author=John Gellene
  228. plugin.QuickNotepadPlugin.version=4.2
  229. plugin.QuickNotepadPlugin.docs=QuickNotepad.html
  230. plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
  231. plugin.QuickNotepadPlugin.menu=quicknotepad \
  232. - \
  233. quicknotepad.choose-file \
  234. quicknotepad.save-file \
  235. quicknotepad.copy-to-buffer
  236. plugin.QuickNotepadPlugin.option-pane=quicknotepad
  237. plugin.QuickNotepadPlugin.option-pane=quicknotepad
  238. plugin.QuickNotepadPlugin.usePluginHome=false
  239. options.quicknotepad.code=new QuickNotepadOptionPane();
  240. options.quicknotepad.label=QuickNotepad
  241. options.quicknotepad.file=File:
  242. options.quicknotepad.choose-file=Choose
  243. options.quicknotepad.choose-file.title=Choose a notepad file
  244. options.quicknotepad.choose-font=Font:
  245. options.quicknotepad.show-filepath.title=Display notepad file path
  246. </pre>
  247. Note that action and option pane labels are not shown in the above example.
  248. <P>
  249. <P>
  250. <DL>
  251. <DT><B>Since:</B></DT>
  252. <DD>jEdit 2.1pre1</DD>
  253. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getProperty(java.lang.String)"><CODE>jEdit.getProperty(String)</CODE></A>,
  254. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getPlugin(java.lang.String)"><CODE>jEdit.getPlugin(String)</CODE></A>,
  255. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getPlugins()"><CODE>jEdit.getPlugins()</CODE></A>,
  256. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getPluginJAR(java.lang.String)"><CODE>jEdit.getPluginJAR(String)</CODE></A>,
  257. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#getPluginJARs()"><CODE>jEdit.getPluginJARs()</CODE></A>,
  258. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#addPluginJAR(java.lang.String)"><CODE>jEdit.addPluginJAR(String)</CODE></A>,
  259. <A HREF="../../../../org/gjt/sp/jedit/jEdit.html#removePluginJAR(org.gjt.sp.jedit.PluginJAR, boolean)"><CODE>jEdit.removePluginJAR(PluginJAR,boolean)</CODE></A>,
  260. <A HREF="../../../../org/gjt/sp/jedit/ActionSet.html" title="class in org.gjt.sp.jedit"><CODE>ActionSet</CODE></A>,
  261. <A HREF="../../../../org/gjt/sp/jedit/gui/DockableWindowManager.html" title="class in org.gjt.sp.jedit.gui"><CODE>DockableWindowManager</CODE></A>,
  262. <A HREF="../../../../org/gjt/sp/jedit/OptionPane.html" title="interface in org.gjt.sp.jedit"><CODE>OptionPane</CODE></A>,
  263. <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit"><CODE>PluginJAR</CODE></A>,
  264. <A HREF="../../../../org/gjt/sp/jedit/ServiceManager.html" title="class in org.gjt.sp.jedit"><CODE>ServiceManager</CODE></A></DL>
  265. <HR>
  266. <P>
  267. <!-- ======== NESTED CLASS SUMMARY ======== -->
  268. <A NAME="nested_class_summary"><!-- --></A>
  269. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  270. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  271. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  272. <B>Nested Class Summary</B></FONT></TH>
  273. </TR>
  274. <TR BGCOLOR="white" CLASS="TableRowColor">
  275. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  276. <CODE>static&nbsp;class</CODE></FONT></TD>
  277. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Broken.html" title="class in org.gjt.sp.jedit">EditPlugin.Broken</A></B></CODE>
  278. <BR>
  279. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A placeholder for a plugin that didn't load.</TD>
  280. </TR>
  281. <TR BGCOLOR="white" CLASS="TableRowColor">
  282. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  283. <CODE>static&nbsp;class</CODE></FONT></TD>
  284. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.Deferred.html" title="class in org.gjt.sp.jedit">EditPlugin.Deferred</A></B></CODE>
  285. <BR>
  286. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A placeholder for a plugin that hasn't been loaded yet.</TD>
  287. </TR>
  288. </TABLE>
  289. &nbsp;
  290. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  291. <A NAME="constructor_summary"><!-- --></A>
  292. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  293. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  294. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  295. <B>Constructor Summary</B></FONT></TH>
  296. </TR>
  297. <TR BGCOLOR="white" CLASS="TableRowColor">
  298. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#EditPlugin()">EditPlugin</A></B>()</CODE>
  299. <BR>
  300. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  301. </TR>
  302. </TABLE>
  303. &nbsp;
  304. <!-- ========== METHOD SUMMARY =========== -->
  305. <A NAME="method_summary"><!-- --></A>
  306. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  307. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  308. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  309. <B>Method Summary</B></FONT></TH>
  310. </TR>
  311. <TR BGCOLOR="white" CLASS="TableRowColor">
  312. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  313. <CODE>&nbsp;javax.swing.JMenuItem</CODE></FONT></TD>
  314. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#createBrowserMenuItems()">createBrowserMenuItems</A></B>()</CODE>
  315. <BR>
  316. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the filesystem browser when constructing its
  317. <b>Plugins</b> menu.</TD>
  318. </TR>
  319. <TR BGCOLOR="white" CLASS="TableRowColor">
  320. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  321. <CODE>&nbsp;javax.swing.JMenuItem</CODE></FONT></TD>
  322. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#createMenuItems()">createMenuItems</A></B>()</CODE>
  323. <BR>
  324. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the view when constructing its <b>Plugins</b> menu.</TD>
  325. </TR>
  326. <TR BGCOLOR="white" CLASS="TableRowColor">
  327. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  328. <CODE>&nbsp;void</CODE></FONT></TD>
  329. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#createMenuItems(java.util.Vector)">createMenuItems</A></B>(java.util.Vector&nbsp;menuItems)</CODE>
  330. <BR>
  331. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Instead of overriding this method, define properties
  332. as specified in the description of this class.</I></TD>
  333. </TR>
  334. <TR BGCOLOR="white" CLASS="TableRowColor">
  335. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  336. <CODE>&nbsp;void</CODE></FONT></TD>
  337. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#createOptionPanes(org.gjt.sp.jedit.gui.OptionsDialog)">createOptionPanes</A></B>(<A HREF="../../../../org/gjt/sp/jedit/gui/OptionsDialog.html" title="class in org.gjt.sp.jedit.gui">OptionsDialog</A>&nbsp;optionsDialog)</CODE>
  338. <BR>
  339. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Instead of overriding this method, define properties
  340. as specified in the description of this class.</I></TD>
  341. </TR>
  342. <TR BGCOLOR="white" CLASS="TableRowColor">
  343. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  344. <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
  345. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getClassName()">getClassName</A></B>()</CODE>
  346. <BR>
  347. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the plugin's class name.</TD>
  348. </TR>
  349. <TR BGCOLOR="white" CLASS="TableRowColor">
  350. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  351. <CODE>&nbsp;java.io.File</CODE></FONT></TD>
  352. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()">getPluginHome</A></B>()</CODE>
  353. <BR>
  354. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the home of your plugin.</TD>
  355. </TR>
  356. <TR BGCOLOR="white" CLASS="TableRowColor">
  357. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  358. <CODE>static&nbsp;java.io.File</CODE></FONT></TD>
  359. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome(java.lang.Class)">getPluginHome</A></B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz)</CODE>
  360. <BR>
  361. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the home of the specified plugin.</TD>
  362. </TR>
  363. <TR BGCOLOR="white" CLASS="TableRowColor">
  364. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  365. <CODE>static&nbsp;java.io.File</CODE></FONT></TD>
  366. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome(org.gjt.sp.jedit.EditPlugin)">getPluginHome</A></B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin)</CODE>
  367. <BR>
  368. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the home of the specified plugin.</TD>
  369. </TR>
  370. <TR BGCOLOR="white" CLASS="TableRowColor">
  371. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  372. <CODE>&nbsp;<A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A></CODE></FONT></TD>
  373. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginJAR()">getPluginJAR</A></B>()</CODE>
  374. <BR>
  375. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the JAR file containing this plugin.</TD>
  376. </TR>
  377. <TR BGCOLOR="white" CLASS="TableRowColor">
  378. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  379. <CODE>static&nbsp;java.io.OutputStream</CODE></FONT></TD>
  380. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)">getResourceAsOutputStream</A></B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  381. java.lang.String&nbsp;path)</CODE>
  382. <BR>
  383. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an output stream to the specified resource, or <code>null</code>
  384. if access to that resource is denied.</TD>
  385. </TR>
  386. <TR BGCOLOR="white" CLASS="TableRowColor">
  387. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  388. <CODE>static&nbsp;java.io.OutputStream</CODE></FONT></TD>
  389. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)">getResourceAsOutputStream</A></B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  390. java.lang.String&nbsp;path)</CODE>
  391. <BR>
  392. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an output stream to the specified resource, or <code>null</node> if access
  393. to that resource is denied.</TD>
  394. </TR>
  395. <TR BGCOLOR="white" CLASS="TableRowColor">
  396. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  397. <CODE>static&nbsp;java.io.InputStream</CODE></FONT></TD>
  398. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)">getResourceAsStream</A></B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  399. java.lang.String&nbsp;path)</CODE>
  400. <BR>
  401. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an input stream to the specified resource, or <code>null</code>
  402. if none is found.</TD>
  403. </TR>
  404. <TR BGCOLOR="white" CLASS="TableRowColor">
  405. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  406. <CODE>static&nbsp;java.io.InputStream</CODE></FONT></TD>
  407. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)">getResourceAsStream</A></B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  408. java.lang.String&nbsp;path)</CODE>
  409. <BR>
  410. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an input stream to the specified resource, or <code>null</code>
  411. if none is found.</TD>
  412. </TR>
  413. <TR BGCOLOR="white" CLASS="TableRowColor">
  414. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  415. <CODE>static&nbsp;java.io.File</CODE></FONT></TD>
  416. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)">getResourcePath</A></B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  417. java.lang.String&nbsp;path)</CODE>
  418. <BR>
  419. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full path of the specified plugin resource.</TD>
  420. </TR>
  421. <TR BGCOLOR="white" CLASS="TableRowColor">
  422. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  423. <CODE>static&nbsp;java.io.File</CODE></FONT></TD>
  424. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(org.gjt.sp.jedit.EditPlugin, java.lang.String)">getResourcePath</A></B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  425. java.lang.String&nbsp;path)</CODE>
  426. <BR>
  427. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full path of the specified plugin resource.</TD>
  428. </TR>
  429. <TR BGCOLOR="white" CLASS="TableRowColor">
  430. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  431. <CODE>&nbsp;void</CODE></FONT></TD>
  432. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#start()">start</A></B>()</CODE>
  433. <BR>
  434. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jEdit calls this method when the plugin is being activated, either
  435. during startup or at any other time.</TD>
  436. </TR>
  437. <TR BGCOLOR="white" CLASS="TableRowColor">
  438. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  439. <CODE>&nbsp;void</CODE></FONT></TD>
  440. <TD><CODE><B><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#stop()">stop</A></B>()</CODE>
  441. <BR>
  442. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jEdit calls this method when the plugin is being unloaded.</TD>
  443. </TR>
  444. </TABLE>
  445. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  446. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  447. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  448. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  449. </TR>
  450. <TR BGCOLOR="white" CLASS="TableRowColor">
  451. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  452. </TR>
  453. </TABLE>
  454. &nbsp;
  455. <P>
  456. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  457. <A NAME="constructor_detail"><!-- --></A>
  458. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  459. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  460. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  461. <B>Constructor Detail</B></FONT></TH>
  462. </TR>
  463. </TABLE>
  464. <A NAME="EditPlugin()"><!-- --></A><H3>
  465. EditPlugin</H3>
  466. <PRE>
  467. public <B>EditPlugin</B>()</PRE>
  468. <DL>
  469. </DL>
  470. <!-- ============ METHOD DETAIL ========== -->
  471. <A NAME="method_detail"><!-- --></A>
  472. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  473. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  474. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  475. <B>Method Detail</B></FONT></TH>
  476. </TR>
  477. </TABLE>
  478. <A NAME="start()"><!-- --></A><H3>
  479. start</H3>
  480. <PRE>
  481. public void <B>start</B>()</PRE>
  482. <DL>
  483. <DD>jEdit calls this method when the plugin is being activated, either
  484. during startup or at any other time. A plugin can get activated for
  485. a number of reasons:
  486. <ul>
  487. <li>The plugin is written for jEdit 4.1 or older, in which case it
  488. will always be loaded at startup.</li>
  489. <li>The plugin has its <code>activate</code> property set to
  490. <code>startup</code>, in which case it will always be loaded at
  491. startup.</li>
  492. <li>One of the properties listed in the plugin's
  493. <code>activate</code> property is set to <code>true</code>,
  494. in which case it will always be loaded at startup.</li>
  495. <li>One of the plugin's classes is being accessed by another plugin,
  496. a macro, or a BeanShell snippet in a plugin API XML file.</li>
  497. </ul>
  498. Note that this method is always called from the event dispatch
  499. thread, even if the activation resulted from a class being loaded
  500. from another thread. A side effect of this is that some of your
  501. plugin's code might get executed before this method finishes
  502. running.<p>
  503. When this method is being called for plugins written for jEdit 4.1
  504. and below, no views or buffers are open. However, this is not the
  505. case for plugins using the new API. For example, if your plugin adds
  506. tool bars to views, make sure you correctly handle the case where
  507. views are already open when the plugin is loaded.<p>
  508. If your plugin must be loaded on startup, take care to have this
  509. method return as quickly as possible.<p>
  510. The default implementation of this method does nothing.
  511. <P>
  512. <DD><DL>
  513. <DT><B>Since:</B></DT>
  514. <DD>jEdit 2.1pre1</DD>
  515. </DL>
  516. </DD>
  517. </DL>
  518. <HR>
  519. <A NAME="stop()"><!-- --></A><H3>
  520. stop</H3>
  521. <PRE>
  522. public void <B>stop</B>()</PRE>
  523. <DL>
  524. <DD>jEdit calls this method when the plugin is being unloaded. This can
  525. be when the program is exiting, or at any other time.<p>
  526. If a plugin uses state information or other persistent data
  527. that should be stored in a special format, this would be a good place
  528. to write the data to storage. If the plugin uses jEdit's properties
  529. API to hold settings, no special processing is needed for them on
  530. exit, since they will be saved automatically.<p>
  531. With plugins written for jEdit 4.1 and below, this method is only
  532. called when the program is exiting. However, this is not the case
  533. for plugins using the new API. For example, if your plugin adds
  534. tool bars to views, make sure you correctly handle the case where
  535. views are still open when the plugin is unloaded.<p>
  536. To avoid memory leaks, this method should ensure that no references
  537. to any objects created by this plugin remain in the heap. In the
  538. case of actions, dockable windows and services, jEdit ensures this
  539. automatically. For other objects, your plugin must clean up maually.
  540. <p>
  541. The default implementation of this method does nothing.
  542. <P>
  543. <DD><DL>
  544. <DT><B>Since:</B></DT>
  545. <DD>jEdit 2.1pre1</DD>
  546. </DL>
  547. </DD>
  548. </DL>
  549. <HR>
  550. <A NAME="getPluginHome()"><!-- --></A><H3>
  551. getPluginHome</H3>
  552. <PRE>
  553. public java.io.File <B>getPluginHome</B>()</PRE>
  554. <DL>
  555. <DD>Returns the home of your plugin.
  556. <P>
  557. <DD><DL>
  558. <DT><B>Returns:</B><DD>the plugin home. It can be null if there is no
  559. settings directory<DT><B>Since:</B></DT>
  560. <DD>4.3pre10</DD>
  561. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  562. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  563. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  564. </DD>
  565. </DL>
  566. <HR>
  567. <A NAME="getPluginHome(java.lang.Class)"><!-- --></A><H3>
  568. getPluginHome</H3>
  569. <PRE>
  570. public static java.io.File <B>getPluginHome</B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz)</PRE>
  571. <DL>
  572. <DD><p>Returns the home of the specified plugin.</p>
  573. <p>Since the first parameter is a reference to the
  574. <code>Class</code> instance for the plugin,
  575. this method requires the plugin to be activated.</p>
  576. <p>See <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome(org.gjt.sp.jedit.EditPlugin)"><CODE>getPluginHome(EditPlugin)</CODE></A> method, as
  577. an alternate, for when the plugin doesn't need
  578. to be activated, or when you do not have the
  579. <code>Class</code> instance available.</p>
  580. <P>
  581. <DD><DL>
  582. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - the class of the plugin
  583. <DT><B>Returns:</B><DD>the plugin home. It can be null if there is no
  584. settings directory<DT><B>Since:</B></DT>
  585. <DD>4.3pre10</DD>
  586. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome(org.gjt.sp.jedit.EditPlugin)"><CODE>getPluginHome(EditPlugin)</CODE></A>,
  587. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  588. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  589. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  590. </DD>
  591. </DL>
  592. <HR>
  593. <A NAME="getPluginHome(org.gjt.sp.jedit.EditPlugin)"><!-- --></A><H3>
  594. getPluginHome</H3>
  595. <PRE>
  596. public static java.io.File <B>getPluginHome</B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin)</PRE>
  597. <DL>
  598. <DD><p>Returns the home of the specified plugin.</p>
  599. <p>This method doesn't need the plugin to be activated. You can pass
  600. an <code>EditPlugin.Deferred</code> instance that you get from
  601. <code>jEdit.getPlugin(String)</code> or <code>jEdit.getPlugins()</code> if
  602. the plugin in question is not activated yet and this method doesn't
  603. cause the plugin to get activated. If you have a reference to the
  604. plugins <code>Class</code> instance available, consider using the
  605. <code>Class</code> method.</p>
  606. <P>
  607. <DD><DL>
  608. <DT><B>Parameters:</B><DD><CODE>plugin</CODE> - the plugin
  609. <DT><B>Returns:</B><DD>the plugin home. It can be null if there is no settings directory<DT><B>Since:</B></DT>
  610. <DD>4.3pre10</DD>
  611. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome(java.lang.Class)"><CODE>getPluginHome(Class)</CODE></A>,
  612. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  613. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  614. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  615. </DD>
  616. </DL>
  617. <HR>
  618. <A NAME="getResourceAsStream(java.lang.Class, java.lang.String)"><!-- --></A><H3>
  619. getResourceAsStream</H3>
  620. <PRE>
  621. public static java.io.InputStream <B>getResourceAsStream</B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  622. java.lang.String&nbsp;path)</PRE>
  623. <DL>
  624. <DD><p>Returns an input stream to the specified resource, or <code>null</code>
  625. if none is found.</p>
  626. <p>Since the first parameter is a reference to the
  627. <code>Class</code> instance for the plugin,
  628. this method requires the plugin to be activated.</p>
  629. <p>See <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourceAsStream(EditPlugin,String)</CODE></A> method, as
  630. an alternate, for when the plugin doesn't need
  631. to be activated, or when you do not have the
  632. <code>Class</code> instance available.</p>
  633. <P>
  634. <DD><DL>
  635. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - the plugin class<DD><CODE>path</CODE> - The path to the resource to be returned, relative to
  636. the plugin's resource path.
  637. <DT><B>Returns:</B><DD>An input stream for the resource, or <code>null</code>.<DT><B>Since:</B></DT>
  638. <DD>4.3pre10</DD>
  639. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  640. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourceAsStream(EditPlugin,String)</CODE></A>,
  641. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  642. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  643. </DD>
  644. </DL>
  645. <HR>
  646. <A NAME="getResourceAsStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><!-- --></A><H3>
  647. getResourceAsStream</H3>
  648. <PRE>
  649. public static java.io.InputStream <B>getResourceAsStream</B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  650. java.lang.String&nbsp;path)</PRE>
  651. <DL>
  652. <DD><p>Returns an input stream to the specified resource, or <code>null</code>
  653. if none is found.</p>
  654. <p>This method doesn't need the plugin to be activated. You can pass
  655. an <code>EditPlugin.Deferred</code> instance that you get from
  656. <code>jEdit.getPlugin(String)</code> or <code>jEdit.getPlugins()</code> if
  657. the plugin in question is not activated yet and this method doesn't
  658. cause the plugin to get activated. If you have a reference to the
  659. plugins <code>Class</code> instance available, consider using the
  660. <code>Class</code> method.</p>
  661. <P>
  662. <DD><DL>
  663. <DT><B>Parameters:</B><DD><CODE>plugin</CODE> - the plugin<DD><CODE>path</CODE> - The path to the resource to be returned, relative to
  664. the plugin's resource path.
  665. <DT><B>Returns:</B><DD>An input stream for the resource, or <code>null</code>.<DT><B>Since:</B></DT>
  666. <DD>4.3pre10</DD>
  667. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  668. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(Class,String)</CODE></A>,
  669. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  670. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  671. </DD>
  672. </DL>
  673. <HR>
  674. <A NAME="getResourceAsOutputStream(java.lang.Class, java.lang.String)"><!-- --></A><H3>
  675. getResourceAsOutputStream</H3>
  676. <PRE>
  677. public static java.io.OutputStream <B>getResourceAsOutputStream</B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  678. java.lang.String&nbsp;path)</PRE>
  679. <DL>
  680. <DD><p>Returns an output stream to the specified resource, or <code>null</code>
  681. if access to that resource is denied.</p>
  682. <p>Since the first parameter is a reference to the
  683. <code>Class</code> instance for the plugin,
  684. this method requires the plugin to be activated.</p>
  685. <p>See <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourceAsOutputStream(EditPlugin,String)</CODE></A> method, as
  686. an alternate, for when the plugin doesn't need
  687. to be activated, or when you do not have the
  688. <code>Class</code> instance available.</p>
  689. <P>
  690. <DD><DL>
  691. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - the plugin class<DD><CODE>path</CODE> - The path to the resource to be returned, relative to
  692. the plugin's resource path.
  693. <DT><B>Returns:</B><DD>An output stream for the resource, or <code>null</code>.<DT><B>Since:</B></DT>
  694. <DD>4.3pre10</DD>
  695. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  696. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourceAsOutputStream(EditPlugin,String)</CODE></A>,
  697. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  698. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  699. </DD>
  700. </DL>
  701. <HR>
  702. <A NAME="getResourceAsOutputStream(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><!-- --></A><H3>
  703. getResourceAsOutputStream</H3>
  704. <PRE>
  705. public static java.io.OutputStream <B>getResourceAsOutputStream</B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  706. java.lang.String&nbsp;path)</PRE>
  707. <DL>
  708. <DD><p>Returns an output stream to the specified resource, or <code>null</node> if access
  709. to that resource is denied.</p>
  710. <p>This method doesn't need the plugin to be activated. You can pass
  711. an <code>EditPlugin.Deferred</code> instance that you get from
  712. <code>jEdit.getPlugin(String)</code> or <code>jEdit.getPlugins()</code> if
  713. the plugin in question is not activated yet and this method doesn't
  714. cause the plugin to get activated. If you have a reference to the
  715. plugins <code>Class</code> instance available, consider using the
  716. <code>Class</code> method.</p>
  717. <P>
  718. <DD><DL>
  719. <DT><B>Parameters:</B><DD><CODE>plugin</CODE> - the plugin<DD><CODE>path</CODE> - The path to the resource to be returned, relative to
  720. the plugin's resource path.
  721. <DT><B>Returns:</B><DD>An output stream for the resource, or <code>null</code>.<DT><B>Since:</B></DT>
  722. <DD>4.3pre10</DD>
  723. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  724. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(Class,String)</CODE></A>,
  725. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  726. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A></DL>
  727. </DD>
  728. </DL>
  729. <HR>
  730. <A NAME="getResourcePath(java.lang.Class, java.lang.String)"><!-- --></A><H3>
  731. getResourcePath</H3>
  732. <PRE>
  733. public static java.io.File <B>getResourcePath</B>(java.lang.Class&lt;? extends <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&gt;&nbsp;clazz,
  734. java.lang.String&nbsp;path)</PRE>
  735. <DL>
  736. <DD><p>Returns the full path of the specified plugin resource.</p>
  737. <p>Since the first parameter is a reference to the
  738. <code>Class</code> instance for the plugin,
  739. this method requires the plugin to be activated.</p>
  740. <p>See <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourcePath(EditPlugin,String)</CODE></A> method, as
  741. an alternate, for when the plugin doesn't need
  742. to be activated, or when you do not have the
  743. <code>Class</code> instance available.</p>
  744. <P>
  745. <DD><DL>
  746. <DT><B>Parameters:</B><DD><CODE>clazz</CODE> - the plugin class<DD><CODE>path</CODE> - The relative path to the resource from the plugin's
  747. resource path.
  748. <DT><B>Returns:</B><DD>The absolute path to the resource or null if there is no plugin home.<DT><B>Since:</B></DT>
  749. <DD>4.3pre10</DD>
  750. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  751. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  752. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  753. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><CODE>getResourcePath(EditPlugin,String)</CODE></A></DL>
  754. </DD>
  755. </DL>
  756. <HR>
  757. <A NAME="getResourcePath(org.gjt.sp.jedit.EditPlugin, java.lang.String)"><!-- --></A><H3>
  758. getResourcePath</H3>
  759. <PRE>
  760. public static java.io.File <B>getResourcePath</B>(<A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html" title="class in org.gjt.sp.jedit">EditPlugin</A>&nbsp;plugin,
  761. java.lang.String&nbsp;path)</PRE>
  762. <DL>
  763. <DD><p>Returns the full path of the specified plugin resource.</p>
  764. <p>This method doesn't need the plugin to be activated. You can pass
  765. an <code>EditPlugin.Deferred</code> instance that you get from
  766. <code>jEdit.getPlugin(String)</code> or <code>jEdit.getPlugins()</code> if
  767. the plugin in question is not activated yet and this method doesn't
  768. cause the plugin to get activated. If you have a reference to the
  769. plugins <code>Class</code> instance available, consider using the
  770. <code>Class</code> method.</p>
  771. <P>
  772. <DD><DL>
  773. <DT><B>Parameters:</B><DD><CODE>plugin</CODE> - the plugin<DD><CODE>path</CODE> - The relative path to the resource from the plugin's
  774. resource path.
  775. <DT><B>Returns:</B><DD>The absolute path to the resource or null if there is no plugin home.<DT><B>Since:</B></DT>
  776. <DD>4.3pre10</DD>
  777. <DT><B>See Also:</B><DD><A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getPluginHome()"><CODE>getPluginHome()</CODE></A>,
  778. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsOutputStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsOutputStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  779. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourceAsStream(java.lang.Class, java.lang.String)"><CODE>getResourceAsStream(java.lang.Class<? extends org.gjt.sp.jedit.EditPlugin>, java.lang.String)</CODE></A>,
  780. <A HREF="../../../../org/gjt/sp/jedit/EditPlugin.html#getResourcePath(java.lang.Class, java.lang.String)"><CODE>getResourcePath(Class,String)</CODE></A></DL>
  781. </DD>
  782. </DL>
  783. <HR>
  784. <A NAME="getClassName()"><!-- --></A><H3>
  785. getClassName</H3>
  786. <PRE>
  787. public java.lang.String <B>getClassName</B>()</PRE>
  788. <DL>
  789. <DD>Returns the plugin's class name. This might not be the same as
  790. the class of the actual <code>EditPlugin</code> instance, for
  791. example if the plugin is not loaded yet.
  792. <P>
  793. <DD><DL>
  794. <DT><B>Since:</B></DT>
  795. <DD>jEdit 2.5pre3</DD>
  796. </DL>
  797. </DD>
  798. </DL>
  799. <HR>
  800. <A NAME="getPluginJAR()"><!-- --></A><H3>
  801. getPluginJAR</H3>
  802. <PRE>
  803. public <A HREF="../../../../org/gjt/sp/jedit/PluginJAR.html" title="class in org.gjt.sp.jedit">PluginJAR</A> <B>getPluginJAR</B>()</PRE>
  804. <DL>
  805. <DD>Returns the JAR file containing this plugin.
  806. <P>
  807. <DD><DL>
  808. <DT><B>Since:</B></DT>
  809. <DD>jEdit 4.2pre1</DD>
  810. </DL>
  811. </DD>
  812. </DL>
  813. <HR>
  814. <A NAME="createMenuItems()"><!-- --></A><H3>
  815. createMenuItems</H3>
  816. <PRE>
  817. public final javax.swing.JMenuItem <B>createMenuItems</B>()</PRE>
  818. <DL>
  819. <DD>Called by the view when constructing its <b>Plugins</b> menu.
  820. See the description of this class for details about how the
  821. menu items are constructed from plugin properties.
  822. <P>
  823. <DD><DL>
  824. <DT><B>Since:</B></DT>
  825. <DD>jEdit 4.2pre1</DD>
  826. </DL>
  827. </DD>
  828. </DL>
  829. <HR>
  830. <A NAME="createBrowserMenuItems()"><!-- --></A><H3>
  831. createBrowserMenuItems</H3>
  832. <PRE>
  833. public final javax.swing.JMenuItem <B>createBrowserMenuItems</B>()</PRE>
  834. <DL>
  835. <DD>Called by the filesystem browser when constructing its
  836. <b>Plugins</b> menu.
  837. See the description of this class for details about how the
  838. menu items are constructed from plugin properties.
  839. <P>
  840. <DD><DL>
  841. <DT><B>Since:</B></DT>
  842. <DD>jEdit 4.2pre1</DD>
  843. </DL>
  844. </DD>
  845. </DL>
  846. <HR>
  847. <A NAME="createMenuItems(java.util.Vector)"><!-- --></A><H3>
  848. createMenuItems</H3>
  849. <PRE>
  850. public void <B>createMenuItems</B>(java.util.Vector&nbsp;menuItems)</PRE>
  851. <DL>
  852. <DD><B>Deprecated.</B>&nbsp;<I>Instead of overriding this method, define properties
  853. as specified in the description of this class.</I>
  854. <P>
  855. <DD><DL>
  856. </DL>
  857. </DD>
  858. </DL>
  859. <HR>
  860. <A NAME="createOptionPanes(org.gjt.sp.jedit.gui.OptionsDialog)"><!-- --></A><H3>
  861. createOptionPanes</H3>
  862. <PRE>
  863. public void <B>createOptionPanes</B>(<A HREF="../../../../org/gjt/sp/jedit/gui/OptionsDialog.html" title="class in org.gjt.sp.jedit.gui">OptionsDialog</A>&nbsp;optionsDialog)</PRE>
  864. <DL>
  865. <DD><B>Deprecated.</B>&nbsp;<I>Instead of overriding this method, define properties
  866. as specified in the description of this class.</I>
  867. <P>
  868. <DD><DL>
  869. </DL>
  870. </DD>
  871. </DL>
  872. <!-- ========= END OF CLASS DATA ========= -->
  873. <HR>
  874. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  875. <A NAME="navbar_bottom"><!-- --></A>
  876. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  877. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  878. <TR>
  879. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  880. <A NAME="navbar_b…

Large files files are truncated, but you can click here to view the full file