code: public static Shell getShell(Widget widget) {
  		if (widget instanceof Control)
  			return ((Control)widget).getShell();
  		if (widget instanceof Caret)
  			return ((Caret)widget).getParent().getShell();
  		if (widget instanceof DragSource)
  			return ((DragSource)widget).getControl().getShell();
  		if (widget instanceof DropTarget)
  			return ((DropTarget)widget).getControl().getShell();
  		if (widget instanceof Menu)
  			return ((Menu)widget).getParent().getShell();
  		if (widget instanceof ScrollBar)
  			return ((ScrollBar)widget).getParent().getShell();
  
  		return null;
  	}
docs: Returns the shell for the given widget. If the widget doesn't represent
  a SWT object that manage a shell, <code>null</code> is returned.
  @param widget the widget
  
  @return the shell for the given widget