Source:
private void createDescriptionArea(Composite parent) { Label label = new Label(parent, SWT.NONE); label.setText(MarkerMessages.propertiesDialog_description_text); GridData labelGridData = new GridData(SWT.LEFT, SWT.TOP, false, false); label.setLayoutData(labelGridData); Composite textContainer = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.marginHeight = layout.marginWidth = 0; textContainer.setLayout(layout); textContainer.setLayoutData(new GridData(GridData.FILL_BOTH)); descriptionText = new Text(textContainer, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = gridData.heightHint = 0; gridData.grabExcessHorizontalSpace = true; descriptionText.setLayoutData(gridData); descriptionText.setText(Util.getProperty(IMarker.MESSAGE, marker)); descriptionText.setEditable(Util.isEditable(marker)); copyButton = new Button(textContainer, SWT.PUSH); copyButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY)); copyButton.setLayoutData(new GridData(GridData.FILL_VERTICAL)); ((GridData) copyButton.getLayoutData()).verticalAlignment = SWT.BOTTOM; clipboard = new Clipboard(parent.getDisplay()); copyButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event event) { clipboard.setContents(new Object[] { descriptionText.getText() }, new Transfer[] { TextTransfer.getInstance() }); clipboard.dispose(); } }); }

Target:
private void createDescriptionArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridData cGridData = new GridData(SWT.FILL, SWT.FILL, true, true); cGridData.horizontalSpan = 2; composite.setLayoutData(cGridData); GridLayout layout = new GridLayout(1, false); layout.marginHeight = layout.marginWidth = 0; composite.setLayout(layout); Label label = new Label(composite, SWT.NONE); label.setText(MarkerMessages.propertiesDialog_description_text); GridData labelGridData = new GridData(SWT.LEFT, SWT.TOP, false, false); label.setLayoutData(labelGridData); Composite textContainer = new Composite(composite, SWT.NONE); layout = new GridLayout(); layout.numColumns = 2; layout.marginHeight = layout.marginWidth = 0; textContainer.setLayout(layout); textContainer.setLayoutData(new GridData(GridData.FILL_BOTH)); descriptionText = new Text(textContainer, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = gridData.heightHint = 0; gridData.grabExcessHorizontalSpace = true; descriptionText.setLayoutData(gridData); descriptionText.setText(Util.getProperty(IMarker.MESSAGE, marker)); descriptionText.setEditable(Util.isEditable(marker)); copyButton = new Button(textContainer, SWT.PUSH); copyButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY)); copyButton.setLayoutData(new GridData(GridData.FILL_VERTICAL)); ((GridData) copyButton.getLayoutData()).verticalAlignment = SWT.BOTTOM; copyButton.addListener(SWT.Selection, event -> { Clipboard clipboard = new Clipboard(event.display); try { clipboard.setContents(new Object[] { descriptionText.getText() }, new Transfer[] { TextTransfer.getInstance() }); } finally { clipboard.dispose(); } }); }