Improve Pasting in Expression's View #2299
Open
+138
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, when pasting multiple expressions in the Expressions View, Eclipse would combine all lines into a single expression. This made it tedious for users who wanted to copy and paste multiple expressions at once, such as when importing or exporting between workspaces, forcing them to paste each expression individually. Additionally, pasting often required keyboard shortcuts, which could be inconvenient for new users.
With this change, a context menu entry has been added for the Paste action
and when pasting multi-line expressions, Eclipse now prompts the user to choose how the clipboard content should be added.
Users can select either Single Expression, which combines all lines into one expression (default behaviour) or Multiple Expressions, which creates individual expressions for each line.
The preferred default behavior can be set directly in the prompt dialog, and users can later update this preference via Preferences → Run/Debug → Expressions Paste Behavior.
Current
CurrentBehav.mp4
New
AfterIm.mp4
This improvement simplifies copy/paste of multiple expressions, streamlines import/export workflows for Expressions View, and makes the pasting more user-friendly and discoverable.
Export/Import
Import.Export.mp4