Community
Participate
Working Groups
I propose that TextCellEditor#isPasteEnabled() be changed to the following: boolean result = false; if (text != null && !text.isDisposed()) { Clipboard cb = new Clipboard(Display.getDefault()); TransferData[] transferTypes = cb.getAvailableTypes(); for (int i = 0; i < transferTypes.length; i++) { if (TextTransfer.getInstance().isSupportedType(transferTypes[i])) { result = true; break; } } cb.dispose(); } return result;
Can you explain the problem please?
Paste is enabled but can't actually work because no text is on the Clipboard. Changing the behavior would require that paste re-enable later. This is currently not possible since clipboard notification doesn't exist.
TextCellEditor updates the status of paste (on the context menu) when you copy/cut some text in that celleditor. And if you copy/cut it from somewhere else, the textcelleditor loses focus and disappears. So, I think this change would work even without the clipboard notification.
I think that menu is a native one for the win32 control. A paste action tied into the celleditor could be displayed anywhere (or actually, only toolitems and menuitems, otherwise focus would be lost). The copy could occur within the celleditor itself, making paste dynamically enabled.
*** This bug has been marked as a duplicate of 88527 ***