public static void copyToClipboard(String content){
  if (content == null) {
    return;
  }
  Clipboard cb=null;
  try {
    cb=new Clipboard(Display.getDefault());
    cb.setContents(new String[]{content},new TextTransfer[]{TextTransfer.getInstance()});
  }
  finally {
    if (cb != null) {
      cb.dispose();
    }
  }
}

public static void copyToClipboard ( String content ) { if ( content == null ) { return ; } Clipboard cb = null ; try { cb = new Clipboard ( Display . getDefault ( ) ) ; cb . setContents ( new String [ ] { content } , new TextTransfer [ ] { TextTransfer . getInstance ( ) } ) ; } finally { if ( cb != null ) { cb . dispose ( ) ; } } }
copies given string to the system clipboard
