From: <va...@us...> - 2007-07-08 01:26:45
|
Revision: 9951 http://svn.sourceforge.net/jedit/?rev=9951&view=rev Author: vanza Date: 2007-07-07 18:26:44 -0700 (Sat, 07 Jul 2007) Log Message: ----------- update javadoc for how to create new actions. Modified Paths: -------------- plugins/ProjectViewer/trunk/projectviewer/action/package.html Modified: plugins/ProjectViewer/trunk/projectviewer/action/package.html =================================================================== --- plugins/ProjectViewer/trunk/projectviewer/action/package.html 2007-07-08 01:22:46 UTC (rev 9950) +++ plugins/ProjectViewer/trunk/projectviewer/action/package.html 2007-07-08 01:26:44 UTC (rev 9951) @@ -12,31 +12,15 @@ <li>Create a new class that extends {@link projectviewer.action.Action Action}.</li> <li>Implement the {@link projectviewer.action.Action#actionPerformed(ActionEvent) actionPerformed()} method to execute the desired operations.</li> -<li>Register the action in the context menu - ({@link projectviewer.vpt.VPTContextMenu#registerAction(Action) registerAction()}) - or in the toolbar - ({@link projectviewer.ProjectViewer#registerAction(Action) registerAction()}) - by calling the appropriate method.</li> +<li>In your plugin's <tt>services.xml</tt> file, add aen entry like the following: + <blockquote><tt> + <SERVICE CLASS="projectviewer.action.Action" NAME="My Action Name"> + code_that_returns_instance_of_action(); + </SERVICE> + </tt></blockquote> +</li> </ul> -<p>It's recommended to use the new API to register actions. Create the -following properties to automatically register actions with -ProjectViewer:</p> - -<ul> - <li>plugin.projectviewer.<i>class name</i>.toolbar-actions:<br> - list of classes that provide {@link projectviewer.action.Action Action}s that - will be added to the toolbar of the ProjectViewer dockable. One instance is - created for each class, and for each jEdit view the instance is cloned, - and then the "projectViewer" instance is set for the cloned object.</li> - - <li>plugin.projectviewer.<i>class name</i>.context-menu-actions:<br> - list of classes that provide {@link projectviewer.action.Action Action}s that - will be added to the tree's context menu. One instance is created for each - class, and for each jEdit view the instance is cloned, and then the - "projectViewer" instance is set for the cloned object.</li> -</ul> - <p>The menu item show in the context menu is provided by the {@link projectviewer.action.Action#getMenuItem() getMenuItem()} of the Action class. Subclasses are welcome to override this method to provide other kinds This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |