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 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