org.eclipse.ecf.presence.ui.roster
Class AbstractRosterContributionItem

java.lang.Object
  extended by org.eclipse.jface.action.ContributionItem
      extended by org.eclipse.ui.actions.CompoundContributionItem
          extended by org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem
              extended by org.eclipse.ecf.presence.ui.roster.AbstractRosterContributionItem
All Implemented Interfaces:
org.eclipse.jface.action.IContributionItem
Direct Known Subclasses:
ScreenCaptureShareRosterContributionItem, URLShareRosterContributionItem, ViewShareRosterContributionItem

public abstract class AbstractRosterContributionItem
extends AbstractPresenceContributionItem

Abstract contribution item class for creating menu contribution items for roster entries. Subclasses should be created as appropriate.


Field Summary
 
Fields inherited from class org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem
EMPTY_ARRAY
 
Constructor Summary
AbstractRosterContributionItem()
           
AbstractRosterContributionItem(java.lang.String id)
           
 
Method Summary
protected  IContainer getContainerForRoster(IRoster roster)
          Get container for the given IRoster.
protected  IRoster getSelectedRoster()
          Get the currently selected IRoster.
 
Methods inherited from class org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem
getContributionItems, getSelection, makeActions
 
Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem
dispose, 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

AbstractRosterContributionItem

public AbstractRosterContributionItem()

AbstractRosterContributionItem

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

getSelectedRoster

protected IRoster getSelectedRoster()
Get the currently selected IRoster.

Returns:
IRoster that is current workbenchwindow selection. Returns null if nothing is selected or if something other than IRoster is selected.

getContainerForRoster

protected IContainer getContainerForRoster(IRoster roster)
Get container for the given IRoster.

Parameters:
roster - the IRoster. May be null.
Returns:
IContainer associated with currently selected IRosterEntry. Returns null if the given entry is null, or if the container associated with the entry cannot be accessed.