Package org.eclipse.ui.internal

# Class ShowViewMenu

java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.internal.ShowViewMenu

All Implemented Interfaces:
  `IContributionItem`

public class ShowViewMenu extends ContributionItem
A `ShowViewMenu` is used to populate a menu manager with Show View actions. The visible views are determined by user preference from the Perspective Customize dialog.

## Constructor Summary

Constructors
Constructor
Description
`ShowViewMenu(IWorkbenchWindow window, String id)`
Creates a Show View menu.
`ShowViewMenu(IWorkbenchWindow window, String id, boolean makeFast)`
Creates a Show View menu.

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
The default implementation of this `IContributionItem` method does nothing.
`void`
`fill(Menu menu, int index)`
The default implementation of this `IContributionItem` method does nothing.
`boolean`
`isDynamic()`
Overridden to always return true and force dynamic menu building.
`protected void`
`removeAction(String viewId)`

### Methods inherited from class org.eclipse.jface.action.ContributionItem

`fill, fill, fill, getId, getParent, isDirty, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update`

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

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

## Constructor Details

### ShowViewMenu

public ShowViewMenu(IWorkbenchWindow window, String id)
Creates a Show View menu.

Parameters:
  `window` - the window containing the menu
  `id` - the id

### ShowViewMenu

public ShowViewMenu(IWorkbenchWindow window, String id, boolean makeFast)
Creates a Show View menu.

Parameters:
  `window` - the window containing the menu
  `id` - the id
  `makeFast` - use the fact view variant of the command

## Method Details

### isDynamic

public boolean isDynamic()
Overridden to always return true and force dynamic menu building.

Specified by:
  `isDynamic` in interface `IContributionItem`
Overrides:
  `isDynamic` in class `ContributionItem`
Returns:
  `true` if this item is dynamic, and `false` for normal items

### fill

public void fill(Menu menu, int index)
Description copied from class: `ContributionItem`
The default implementation of this `IContributionItem` method does nothing. Subclasses may override.

Specified by:
  `fill` in interface `IContributionItem`
Overrides:
  `fill` in class `ContributionItem`
Parameters:
  `menu` - the parent menu
  `index` - the index where the controls are inserted, or `-1` to insert at the end

### removeAction

protected void removeAction(String viewId)

### dispose

public void dispose()
Description copied from class: `ContributionItem`
The default implementation of this `IContributionItem` method does nothing. Subclasses may override.

Specified by:
  `dispose` in interface `IContributionItem`
Overrides:
  `dispose` in class `ContributionItem`