Community
Participate
Working Groups
20040512 In the Java editor we add extra information to the clipboard on copy and paste. But (as far as I know) the only way to manipulate the clipboard is set (replace) it. I currently solve this by making assumptions that the styled text widget only uses the text and the rtf transfer, so I read them and enhance them with my information. Is there a way to get all the current tranfers, or is there a way to 'add' instead of 'set' the clipboard?
Clipboard.getAvailableTypes() returns a TransferData[] which will give you all of the currently available types. Note that some of these types may not be supported by SWT (e.g. image data transfer). New API for "adding" to the clipboard will not be created in 3.0. Currently, we do not use a lazy mechanism for presenting the data to the OS clipboard. Therefore this change would require a complete rework of the Clipboard on all platforms.
>Clipboard.getAvailableTypes() We know about this one, but how can this be used to get the data using Clipboard.getContents(...) which expects a Transfer and not a TransferData object?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.