org.eclipse.ecf.presence.collab.ui.console
Class ConsoleRosterMenuContributionItem

java.lang.Object
  extended by org.eclipse.jface.action.ContributionItem
      extended by org.eclipse.ui.actions.CompoundContributionItem
          extended by org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem
              extended by org.eclipse.ecf.presence.collab.ui.console.ConsoleRosterMenuContributionItem
All Implemented Interfaces:
org.eclipse.jface.action.IContributionItem

public class ConsoleRosterMenuContributionItem
extends AbstractRosterMenuContributionItem


Field Summary
 
Fields inherited from class org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem
NO_CONTRIBUTIONS
 
Constructor Summary
ConsoleRosterMenuContributionItem()
           
ConsoleRosterMenuContributionItem(java.lang.String id)
           
 
Method Summary
protected  AbstractRosterMenuHandler createRosterEntryHandler(IRosterEntry rosterEntry)
          Create a AbstractRosterMenuHandler for a given IRosterEntry instance.
protected  java.lang.Object getSelection()
          Get the currently selected model object.
 
Methods inherited from class org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem
addEntry, createCommandContributionItemForEntry, createContributionItemsForEntry, createContributionItemsForGroup, createContributionItemsForPresenceContainer, createContributionItemsForRoster, createMenuManagerForGroup, createMenuManagerForRoster, createMenuManagerForTop, dispose, getContributionItems, getPresenceContainerAdapters, getRosterEntryImageDescriptor, getTopMenuImageDescriptor, setTopMenuImageDescriptor, setTopMenuName
 
Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem
fill, isDirty, isDynamic, setParent
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsoleRosterMenuContributionItem

public ConsoleRosterMenuContributionItem()

ConsoleRosterMenuContributionItem

public ConsoleRosterMenuContributionItem(java.lang.String id)
Method Detail

getSelection

protected java.lang.Object getSelection()
Get the currently selected model object.

Returns:
Object that is current workbenchwindow selection. Returns null if nothing is selected.

createRosterEntryHandler

protected AbstractRosterMenuHandler createRosterEntryHandler(IRosterEntry rosterEntry)
Description copied from class: AbstractRosterMenuContributionItem
Create a AbstractRosterMenuHandler for a given IRosterEntry instance. Implementers of this method should construct and return a new AbstractRosterMenuHandler. When a menu selection is made for a given IRosterEntry menu item, the associated AbstractRosterMenuHandler instance will have its AbstractRosterMenuHandler.execute(org.eclipse.core.commands.ExecutionEvent) method will be called. This way, subclasses may define arbitrary behavior for the dynamic menu item selection.

Specified by:
createRosterEntryHandler in class AbstractRosterMenuContributionItem
Parameters:
rosterEntry - the IRosterEntry for the AbstractRosterMenuHandler. Will not be null.
Returns:
AbstractRosterMenuHandler instance. Must not be null.