Jump to: navigation, search

Difference between revisions of "FAQ What is an action set?"

 
m
Line 1: Line 1:
An action set is a logical group of menus and actions that should appear together
+
An action set is a logical group of menus and actions that should appear together at the same time.  For example, when you are debugging a Java program, you want all the debug actions, such as '''Step''' and '''Resume''', to appear in the menus. Actions in an action set can appear either in the workbench window toolbar or in the main menus.   
at the same time.  For example, when you are debugging a Java program,
+
you want all the debug actions, such as '''Step''' and  
+
'''Resume''', to appear in the menus. Actions in an action set  
+
can appear either in the workbench window toolbar or in the main menus.   
+
  
You can create your own action sets, thus contributing to the main  
+
You can create your own action sets, thus contributing to the main menu and toolbar, using the <tt>org.eclipse.ui.actionSets</tt> extension point.  Here is an action set definition from the FAQ examples plug-in:
menu and toolbar, using the <tt>org.eclipse.ui.actionSets</tt>  
+
extension point.  Here is an action set definition from the FAQ  
+
examples plug-in:
+
 
<pre>
 
<pre>
 
   &lt;extension
 
   &lt;extension
Line 23: Line 16:
 
</pre>
 
</pre>
  
The action set declaration itself is followed by a series of menu
+
The action set declaration itself is followed by a series of menu and action attributes, which are discussed in more detail in the FAQs that follow this one.  Action sets are an entirely declarative concept.  They cannot be defined, customized, or manipulated programmatically.
and action attributes, which are discussed in more detail in the FAQs that follow
+
this one.  Action sets are an entirely declarative concept.  They  
+
cannot be defined, customized, or manipulated programmatically.
+
 
+
  
 
== See Also: ==
 
== See Also: ==
 
+
*[[FAQ How do I make my action set visible?]]
[[FAQ_How_do_I_make_my_action_set_visible%3F]]
+
*[[FAQ How do I add actions to the global toolbar?]]
 
+
*[http://help.eclipse.org/help31/index.jsp Platform Plug-in Developer Guide], under '''Reference &gt; Extension Points Reference &gt; org.eclipse.ui.actionSets'''
[[FAQ_How_do_I_add_actions_to_the_global_toolbar%3F]]
+
*[http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html "Contributing Actions to the Eclipse Workbench"]
 
+
'''Platform Plug-in Developer Guide''', under '''Reference &gt;
+
Extension Points Reference &gt; org.eclipse.ui.actionSets''',
+
Eclipse online article &#147;Contributing Actions to the Eclipse Workbench&#148;
+
  
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>

Revision as of 22:01, 8 May 2007

An action set is a logical group of menus and actions that should appear together at the same time. For example, when you are debugging a Java program, you want all the debug actions, such as Step and Resume, to appear in the menus. Actions in an action set can appear either in the workbench window toolbar or in the main menus.

You can create your own action sets, thus contributing to the main menu and toolbar, using the org.eclipse.ui.actionSets extension point. Here is an action set definition from the FAQ examples plug-in:

   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
         label="Sample Action Set"
         visible="false"
         id="org.eclipse.faq.examples.actionSet">
         <menu>...</menu>
         <action>...</action>
         ...
      </actionSet>
   </extension>

The action set declaration itself is followed by a series of menu and action attributes, which are discussed in more detail in the FAQs that follow this one. Action sets are an entirely declarative concept. They cannot be defined, customized, or manipulated programmatically.

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.