// If we are already engaged in a doc share (either as initiator or as receiver)
// Then present menu item to stop
final List presenceContainerAdapters = getPresenceContainerAdapters();
for (final Iterator i = presenceContainerAdapters.iterator(); i.hasNext();) {
final IPresenceContainerAdapter pca = (IPresenceContainerAdapter) i.next();
final DocShare docShare = getDocShareForPresenceContainerAdapter(pca);
if (docShare != null && docShare.isSharing() && docShare.getTextEditor().equals(editorPart)) {
return getMenuContributionForStopShare(pca.getRosterManager().getRoster(), docShare, docShare.getOtherID());
}
}
return super.getContributionItems();
}