blob: 3d2e20db02aad21a7e00578dd8fb3bf5439dd095 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE>
Contributing new retargetable actions
</TITLE>
<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>Contributing new retargetable actions</h3>
<p>The workbench is not the only plug-in that can create retargetable
actions.&nbsp; Your plug-in can define its own retargetable action, so that
views and editors within your plug-in can share the same menu actions.&nbsp;
There are two ways to contribute retargetable actions from your plug-in:</p>
<ul>
<li>An <b>editor</b> can define a retargetable action for which the editor and
related views can hook handlers.&nbsp; The action is only available in the
menu bar when the editor is open.&nbsp;&nbsp;</li>
<li>An <b>action set</b> can define a retargetable action for which editors
and views can hook handlers.&nbsp; The action will be visible as long as the
action set is visible, but it will only be enabled if the active part has
hooked a handler for the action.</li>
</ul>
<p>This mechanism is useful for providing tight integration between editors and
related views.&nbsp; For example, a content outline view can implement a handler
for an action defined by its associated editor.&nbsp;&nbsp;</p>
<p>The <a href="../samples/org.eclipse.ui.examples.readmetool/doc-html/ui_readmetool_ex.html">readme
tool</a> example demonstrates both of these techniques.</p>
</BODY>
</HTML>