## Adding items to the Carbide menu

If you are creating a plug-in specifically for use with Carbide.c++ we recommend that any menu items you create be added to existing Eclipse menus or to the Carbide menu.

Following this guideline reduces the likelihood of menu clutter for uses with multiple Carbide extensions. It also provides users with a consistent place to look for extension commands.

The standard Eclipse technique for adding items to a menu is the `org.eclipse.ui.actionSet` extension point. To add to the Carbide menu you use a standard action set, and specify the Carbide menu in the `menubarPath` attribute. Below is an example:

    <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
          id="Example.actionSet1"
          label="Example Actions"
          visible="true">
        <menu
           id="com.nokia.carbide.cpp.ui.CarbideMenu"
           label="&amp;Carbide"
           path="additions">
           <groupMarker name="CarbideExtensions"/>
         </menu>
         <action
            class="SampleItem"
            id="example.actions.CarbideExample"
            label="My Extension"
            icon="icons/sample.gif"
            toolbarPath="sampleGroup"
            menubarPath="com.nokia.carbide.cpp.ui.CarbideMenu/CarbideExtensions"
         />
      </actionSet>
    </extension>

The <menu> element must be included because Eclipse 3.2 does not completely support declaring menus in one plugin and referencing them from another. Please include this element exactly as-is.

Note that the `menubarPath` has two elements to the path:

- `com.nokia.carbide.cpp.ui.CarbideMenu` - this specifies the Carbide menu itself.
- `CarbideExtensions` - this specifies the particular group in the menu for extension commands. It's important to include this specific group for compatibility with future Carbide.c++ releases.

Carbide defines two other named groups in this menu: `CarbideStart` and `CarbideEnd`. These are for internal use and should not be used by third-party plugins.