Community
Participate
Working Groups
The expressions view supports drag and drop (variables and text dropped to create new watch expressions). The view also supports copying of expressions. The view should support the paste command so that the drag and drop functionality can be accomplished using the keyboard.
Not committed for 3.4
I'll take a shot at this one for today (Bug Day).
Created attachment 106047 [details] Suggested patch Attached is a suggested patch. This is the first time I've tried submitting a patch; apologies if I did it wrong (and please let me know so I can learn from my mistakes). The code is fine as far as it goes, but it has a couple of shortcomings (this is all I had time to do): - It only pastes text. If you had, for example, cut/copied an expression to the clipboard, then this code does not recognize it as an IExpression or IWatchExpression or whatever -- it just views it as text. This isn't terrible -- after all, this handles the most common case, which is copying from an editor -- but it could be better. - This does not add a "Paste" right-click context menu command. Doing that would require some plugin.xml work, which was a little tricky to reconcile with the way the code currently works. I implemented this by starting from the Breakpoints view's "paste" command and modifying it, and that code doesn't do the paste command from plugin.xml, it has it defined in code.
Thanks for the patch, we will consider this in the next cycle.
Applied patch to HEAD. Thanks for the contribution Mike.
.