final TextSelection selection = ConsoleShare.getSelection();
if (selection == null)
return null;
// Else check for Roster entry
final IRosterEntry entry = getSelectedRosterEntry();
final IContainer c = getContainerForRosterEntry(entry);
// If roster entry is selected and it has a container
if (entry != null && c != null) {
final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class);
// If the container has channel container adapter and is online/available
if (channelAdapter != null && isAvailable(entry)) {
final ConsoleShare tmp = ConsoleShare.getStackShare(c.getID());
// If there is an URL share associated with this container
if (tmp != null) {
final ConsoleShare stackshare = tmp;
final IAction action = new Action() {
public void run() {