blob: dbb40051723cc41f58bc7cfb402104fa661caafc [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Eclipse Workbench Extension Point: Action Definitions</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4613.1700" name=GENERATOR></HEAD>
<BODY vLink=#800080 link=#0000ff>
<CENTER>
<H1>Action Definitions</H1></CENTER><B><I>Identifier:
</I></B>org.eclipse.ui.actionDefinitions
<P><B><I>Description: </I></B>This extension point is used to register action definitions. Accelerators
(see the Accelerator Sets extension point) use action defintions to reference actions. An action associates
itself with a given accelerator by registering with that accelerator's associated action definition.
An action registers itself with an action definition by calling the setActionDefinitionId(String id) method and
supplying the action definition's id as an argument.
<P><B><I>Since:</I></B> Release 2.0
<P><B><I>Configuration Markup:</I></B>
<P><TT>&nbsp;&nbsp; &lt;!ELEMENT actionDefintion EMPTY&gt;</TT> <BR><TT>&nbsp;&nbsp;
&lt;!ATTLIST actionDefinition</TT> <BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
id&nbsp;&nbsp;&nbsp; CDATA
#REQUIRED</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&gt;</TT>
<UL>
<LI><B>id -</B> a unique name that can be used to identify this action.
<LI> <B><font color="#FF0000">NOTE</font> -</b> other attributes may be added in the future, as needed.
</UL>
<B><I>Examples:</I></B>
<P>Following is an example of an action definition extension:
<P><TT>&nbsp;&nbsp; &lt;extension point="org.eclipse.ui.actionDefinitions"&gt;</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actionDefinition</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.ui.file.save"</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/actionDefinition&gt;</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actionDefinition</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.ui.file.saveAll"</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/actionDefinition&gt;</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actionDefinition</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.ui.file.close"</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/actionDefinition&gt;</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actionDefinition</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.ui.file.closeAll"</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/actionDefinition&gt;</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actionDefinition</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.ui.file.print"</TT>
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/actionDefinition&gt;</TT>
<BR><TT>&nbsp;&nbsp; &lt;/extension&gt;</TT>
<P><B><I>API Information: </I></B>The methods public void setActionDefinitionId(String id) and
public String getActionDefinitionId() have been added to <TT>IAction</TT>.
<P><B><I>Supplied Implementation: </I></B>The workbench provides many action definitions.
<p><a href="hglegal2002.htm"><img SRC="ngibmcpy2002.gif" ALT="Copyright IBM Corporation and others 2000, 2002." BORDER=0></a>
</body>
</html>