final Widget widget,
final Viewer viewer) {
Action copyAction = new Action() {
public void run() {
Clipboard clipboard = new Clipboard(widget.getDisplay());
VariantTransfer transfer = VariantTransfer.getInstance();
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
Object[] selectionArray = selection.toArray();
VariantBuilder[] modelArray = new VariantBuilder[selectionArray.length];
for (int i = 0; i < selectionArray.length; i++) {
modelArray[i] = (VariantBuilder) ((Proxy) selectionArray[i]).getModelObject();