PartSite is the general implementation for an
IWorkbenchPartSite. A site maintains the context for a part,
including the part, its pane, active contributions, selection provider, etc.
Together, these components make up the complete behavior for a part as if it
was implemented by one person.
The PartSite lifecycle is as follows ..
a site is constructed
a part is constructed and stored in the part
the site calls part.init()
a pane is constructed and stored in the site
the action bars for a part are constructed and stored in the site
the pane is added to a presentation
the SWT widgets for the pane and part are created
the site is activated, causing the actions to become visible
registerContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput, IWorkbenchPart part, Collection menuExtenders) This is a helper method for the register context menu functionality.
public void
registerContextMenu(String menuID, MenuManager menuMgr, ISelectionProvider selProvider) Register a popup menu for extension.
public void
registerContextMenu(MenuManager menuMgr, ISelectionProvider selProvider) Register a popup menu with the default id for extension.
Returns the action bars for the part. If this part is a view then it has
exclusive use of the action bars. If this part is an editor then the
action bars are shared among this editor and other editors of the same
type.
final public static void registerContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput, IWorkbenchPart part, Collection menuExtenders)(Code)
This is a helper method for the register context menu functionality. It
is provided so that different implementations of the
IWorkbenchPartSite interface don't have to worry about how
context menus should work.
Parameters: menuId - the menu id Parameters: menuManager - the menu manager Parameters: selectionProvider - the selection provider Parameters: includeEditorInput - whether editor inputs should be included in the structuredselection when calculating contributions Parameters: part - the part for this site Parameters: menuExtenders - the collection of menu extenders for this site See Also:IWorkbenchPartSite.registerContextMenu(MenuManagerISelectionProvider)
registerContextMenu
public void registerContextMenu(String menuID, MenuManager menuMgr, ISelectionProvider selProvider)(Code)
Register a popup menu for extension.
registerContextMenu
public void registerContextMenu(MenuManager menuMgr, ISelectionProvider selProvider)(Code)
Register a popup menu with the default id for extension.