org.eclipse.jdt.ui.actions

## Class GenerateActionGroup

- java.lang.Object
- - org.eclipse.ui.actions.ActionGroup
  - - org.eclipse.jdt.ui.actions.GenerateActionGroup

    public class GenerateActionGroup
    extends ActionGroup

Action group that adds the source and generate actions to a part's context menu and installs handlers for the corresponding global menu actions.

This class may be instantiated; it is not intended to be subclassed.

Since:
  2.0
Restriction:
  This class is not intended to be subclassed by clients.

### Field Summary

Fields
`static String` `GROUP_CODE` Pop-up menu: id of the code group of the source sub menu (value `codeGroup`).
`static String` `GROUP_GENERATE` Pop-up menu: id of the generate group of the source sub menu (value `generateGroup`).
`static String` `GROUP_IMPORT` Pop-up menu: id of the import group of the source sub menu (value `importGroup`).
`static String` `MENU_ID` Pop-up menu: id of the source sub menu (value `org.eclipse.jdt.ui.source.menu`).

### Constructor Summary

Constructors
Constructor and Description
`GenerateActionGroup(org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor editor, String groupName)` Note: This constructor is for internal use only.
`GenerateActionGroup(IViewPart part)` Creates a new `GenerateActionGroup`.
`GenerateActionGroup(IWorkbenchSite site, ISelectionProvider selectionProvider)` Creates a new `GenerateActionGroup`.
`GenerateActionGroup(Page page)` Creates a new `GenerateActionGroup`.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `dispose()`
`void` `editorStateChanged()` Deprecated. As of 3.5, this method is no longer called
`void` `fillActionBars(IActionBars actionBar)`
`void` `fillContextMenu(IMenuManager menu)`

### Methods inherited from class org.eclipse.ui.actions.ActionGroup

`getContext, setContext, updateActionBars`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MENU_ID

    public static final String MENU_ID

Pop-up menu: id of the source sub menu (value `org.eclipse.jdt.ui.source.menu`).

Since:
  3.0
See Also:
  Constant Field Values

#### GROUP_IMPORT

    public static final String GROUP_IMPORT

Pop-up menu: id of the import group of the source sub menu (value `importGroup`).

Since:
  3.0
See Also:
  Constant Field Values

#### GROUP_GENERATE

    public static final String GROUP_GENERATE

Pop-up menu: id of the generate group of the source sub menu (value `generateGroup`).

Since:
  3.0
See Also:
  Constant Field Values

#### GROUP_CODE

    public static final String GROUP_CODE

Pop-up menu: id of the code group of the source sub menu (value `codeGroup`).

Since:
  3.0
See Also:
  Constant Field Values

### Constructor Detail

#### GenerateActionGroup

    public GenerateActionGroup(org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor editor,
                               String groupName)

Note: This constructor is for internal use only. Clients should not call this constructor.

Parameters:
  `editor` - the compilation unit editor
  `groupName` - the group name to add the action to
Restriction:
  This constructor is not intended to be referenced by clients.

#### GenerateActionGroup

    public GenerateActionGroup(Page page)

Creates a new `GenerateActionGroup`. The group requires that the selection provided by the page's selection provider is of type `org.eclipse.jface.viewers.IStructuredSelection`.

Parameters:
  `page` - the page that owns this action group

#### GenerateActionGroup

    public GenerateActionGroup(IViewPart part)

Creates a new `GenerateActionGroup`. The group requires that the selection provided by the part's selection provider is of type `org.eclipse.jface.viewers.IStructuredSelection`.

Parameters:
  `part` - the view part that owns this action group

#### GenerateActionGroup

    public GenerateActionGroup(IWorkbenchSite site,
                               ISelectionProvider selectionProvider)

Creates a new `GenerateActionGroup`. The group requires that the selection provided by the given selection provider is of type `IStructuredSelection`.

Parameters:
  `site` - the site that will own the action group.
  `selectionProvider` - the selection provider used instead of the page selection provider.
Since:
  3.4

### Method Detail

#### editorStateChanged

    @Deprecated
    public void editorStateChanged()

Deprecated. As of 3.5, this method is no longer called
Note: This method is for internal use only. Clients should not call this method.

Restriction:
  This method is not intended to be referenced by clients.

#### fillActionBars

    public void fillActionBars(IActionBars actionBar)

Overrides:
  `fillActionBars` in class `ActionGroup`

#### fillContextMenu

    public void fillContextMenu(IMenuManager menu)

Overrides:
  `fillContextMenu` in class `ActionGroup`

#### dispose

    public void dispose()

Overrides:
  `dispose` in class `ActionGroup`