Improve Copy operations of Variables & Expressions View#2613
Improve Copy operations of Variables & Expressions View#2613SougandhS wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
|
Hi @iloveeclipse, could you please trigger a co-pilot review for this PR ? |
There was a problem hiding this comment.
Pull request overview
This PR updates the Eclipse Debug Variables and Expressions views’ copy behavior to better match user expectations: copying a variable/expression should copy just its name/text by default, while a separate action can copy the full row content when columns are shown (per issue #2596).
Changes:
- Added new copy delegates to copy only variable names / expression texts.
- Added “Copy Row” delegates that keep the existing full-row copy behavior, gated on column mode being enabled.
- Updated
plugin.xml/plugin.propertiesto contribute the new actions and labels, and removed the old expressions copy delegate.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.../CopyVariableToClipboardActionDelegate.java |
New delegate intended to copy only the variable name. |
.../CopyVariableRowToClipboardActionDelegate.java |
New delegate intended to copy full row only when columns are shown. |
.../CopyExpressionToClipboardActionDelegate.java |
New delegate intended to copy only the expression text. |
.../CopyExpressionRowToClipboardActionDelegate.java |
New delegate intended to copy full row only when columns are shown (retains prior label filtering). |
.../CopyExpressionsToClipboardActionDelegate.java |
Removed old expressions copy implementation (row-style). |
debug/org.eclipse.debug.ui/plugin.xml |
Wires in the new actions for Variables/Expressions view popup menus. |
debug/org.eclipse.debug.ui/plugin.properties |
Adds new labels for the new actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...org/eclipse/debug/internal/ui/actions/expressions/CopyVariableToClipboardActionDelegate.java
Show resolved
Hide resolved
...g/eclipse/debug/internal/ui/actions/expressions/CopyExpressionToClipboardActionDelegate.java
Show resolved
Hide resolved
.../eclipse/debug/internal/ui/actions/expressions/CopyVariableRowToClipboardActionDelegate.java
Outdated
Show resolved
Hide resolved
...clipse/debug/internal/ui/actions/expressions/CopyExpressionRowToClipboardActionDelegate.java
Outdated
Show resolved
Hide resolved
1a63b4c to
63190ae
Compare
Improves copy behavior in Variables and Expressions views for more predictable results. Previously, copying would include the entire row (Name, Value, Type), leading to incorrect clipboard content. Introduces dedicated actions: Copy Variable/Expression for copying only the name/text, and Copy Row for full row content when columns are shown. Fixes : eclipse-platform#2596
63190ae to
0640435
Compare
|
Hi @trancexpress, WDYT ? |
I'll try to take a look on the weekend or early next week. |
| CopyVariablesToClipboardAction.label=Copy &Variables | ||
| CopyExpressionsToClipboardAction.label=Copy &Expressions | ||
| CopyVariableRowToClipboardAction.label=Copy Row | ||
| CopyVariableToClipboardAction.label=Copy Variable |
There was a problem hiding this comment.
Please keep the &, its for accessibility.
E.g. when I right-click on a variable row in the Variables view on master, I can press v and this will select the Copy Variables entry. This is no longer the case with the PR.
It would be nice to have & also for the new buttons, it requires a unique letter though, for the respective dialog or menu.
|
It looks very good! Please check the comment with I don't see tests for the original copy actions, I assume this is another case where its difficult to test in the platform. |
Improves copy behavior in Variables and Expressions views for more predictable results. Previously, copying would include the entire row (Name, Value, Type), leading to incorrect clipboard content. Introduces dedicated actions: Copy Variable/Expression for copying only the name/text, and Copy Row for full row content when columns are shown. This aligns copy behavior with IDE standards and user expectations
OLD
Copies everything shown in the UI
NEW
Copies Variable Name only
Copies entire row
Same for expressions
Fixes : #2596