Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 203796
Collapse All | Expand All

(-)src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java (+13 lines)
Lines 121-126 Link Here
121
import org.eclipse.swt.custom.StackLayout;
121
import org.eclipse.swt.custom.StackLayout;
122
import org.eclipse.swt.custom.StyledText;
122
import org.eclipse.swt.custom.StyledText;
123
import org.eclipse.swt.custom.VerifyKeyListener;
123
import org.eclipse.swt.custom.VerifyKeyListener;
124
import org.eclipse.swt.dnd.Clipboard;
124
import org.eclipse.swt.dnd.DND;
125
import org.eclipse.swt.dnd.DND;
125
import org.eclipse.swt.dnd.DropTarget;
126
import org.eclipse.swt.dnd.DropTarget;
126
import org.eclipse.swt.dnd.FileTransfer;
127
import org.eclipse.swt.dnd.FileTransfer;
Lines 245-250 Link Here
245
	protected static final int SUMMARY_HEIGHT = 20;
246
	protected static final int SUMMARY_HEIGHT = 20;
246
247
247
	private static final String LABEL_BUTTON_SUBMIT = "Submit";
248
	private static final String LABEL_BUTTON_SUBMIT = "Submit";
249
	
250
	private static final String LABEL_COPY_URL_TO_CLIPBOARD = "Copy &URL to Clipboard";
248
251
249
	private static final String LABEL_COPY_TO_CLIPBOARD = "Copy to Clipboard";
252
	private static final String LABEL_COPY_TO_CLIPBOARD = "Copy to Clipboard";
250
253
Lines 1445-1450 Link Here
1445
					job.schedule();
1448
					job.schedule();
1446
				}
1449
				}
1447
			};
1450
			};
1451
			
1452
			final Action copyURLToClipAction = new Action(LABEL_COPY_URL_TO_CLIPBOARD) {
1453
				public void run() {
1454
					RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
1455
					Clipboard clip = new Clipboard(PlatformUI.getWorkbench().getDisplay());
1456
					clip.setContents(new Object[] { attachment.getUrl() }, new Transfer[] { TextTransfer.getInstance() });
1457
					clip.dispose();
1458
				}
1459
			};
1448
1460
1449
			final Action copyToClipAction = new Action(LABEL_COPY_TO_CLIPBOARD) {
1461
			final Action copyToClipAction = new Action(LABEL_COPY_TO_CLIPBOARD) {
1450
				public void run() {
1462
				public void run() {
Lines 1485-1490 Link Here
1485
					popupMenu.add(new Separator());
1497
					popupMenu.add(new Separator());
1486
					popupMenu.add(saveAction);
1498
					popupMenu.add(saveAction);
1487
1499
1500
					popupMenu.add(copyURLToClipAction);
1488
					if (att.getContentType().startsWith(CTYPE_TEXT) || att.getContentType().endsWith("xml")) {
1501
					if (att.getContentType().startsWith(CTYPE_TEXT) || att.getContentType().endsWith("xml")) {
1489
						popupMenu.add(copyToClipAction);
1502
						popupMenu.add(copyToClipAction);
1490
					}
1503
					}

Return to bug 203796