| Summary: | Cannot set clipboard content to empty string | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Grant Gayed <grant_gayed> |
| Component: | SWT | Assignee: | Veronika Irvine <veronika_irvine> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-Motif | ||
| Whiteboard: | |||
It is my intention to make Windows throw the same exception. Unfortunately, Windows does the action asynchronously so I need to figure out a way to make this happen. |
The following snippet works on win32, but on motif it throws the shown exception: public static void main(String[] args) { Display display = new Display(); Clipboard clipboard = new Clipboard(display); TextTransfer transfer = TextTransfer.getInstance(); clipboard.setContents(new String[]{""}, new Transfer[]{transfer}); } Exception in thread "main" org.eclipse.swt.SWTError: Cannot set data in clipboard at org.eclipse.swt.dnd.DND.error(DND.java:225) at org.eclipse.swt.dnd.DND.error(DND.java:181) at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:291)