Community
Participate
Working Groups
Copy some texts into clipboard by "Ctrl+C", and go to Remote System view, expand a host's file system, click on "My Home" or "Root", right click, "Paste" menu item will be enabled. And click it will do nothing. "Paste" menu item should only be enabled when a file or similar resources are in clipboard.
Created attachment 140652 [details] Fixing the bug Index: src/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java =================================================================== --- src/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java (revision 11) +++ src/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java (working copy) @@ -259,6 +259,10 @@ if (va != null) { enable = va.canDrop(selectedObject); + // Fix bug#282241: Copy anything, for example, text string, will enable "Paste" menu item + if (enable) { + enable = _srcType != SystemDNDTransferRunnable.SRC_TYPE_TEXT && _srcType != SystemDNDTransferRunnable.SRC_TYPE_UNKNOWN; + } /* to allow disable of paste * not sure if this is a performance hit or not if (enable)
Hi Zhou, thanks for the contribution! Note that these contributions need the following: 1) modified files need to contain your copyright line 2) a legal disclaimer is needed for your patch as per http://www.eclipse.org/dsdp/tm/development/committer_howto.php#external_contrib
Created attachment 140735 [details] Fixing the bug and fix copyrights Legal Message: I, Zhou Renjian, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer, Shanghai Kortide, to make this contribution under the EPL. /org.eclipse.rse.ui/src/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
Comment on attachment 140735 [details] Fixing the bug and fix copyrights My eclipse doesn't handle this form of patch for some reason but I'm able to make the changes manually.
Thanks for the contribution. I've committed the change to cvs.
Comment on attachment 140652 [details] Fixing the bug Obsoleted by later patch.