-
-
Notifications
You must be signed in to change notification settings - Fork 105
Add Paste button to Java Input pane (#136) #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a Paste button to the Java Input pane, allowing users to quickly paste Java code from the clipboard without manually selecting and pasting in the text editor. This improves the user experience when testing different code snippets.
- Added
GetTextAsync()method to theITextClipboardinterface and its implementation - Implemented
PasteInputcommand inMainWindowViewModelwith clipboard reading and user feedback - Added Paste button to the UI with proper accessibility attributes and FontAwesome icon
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| JavaToCSharpGui/Infrastructure/ITextClipboard.cs | Added GetTextAsync() method to clipboard interface for reading clipboard text |
| JavaToCSharpGui/Infrastructure/TextClipboard.cs | Implemented GetTextAsync() to retrieve clipboard content with null check |
| JavaToCSharpGui/ViewModels/MainWindowViewModel.cs | Added PasteInput command to handle paste functionality with user feedback message |
| JavaToCSharpGui/Views/MainWindow.axaml | Added Paste button to Java Input pane with proper grid layout, tooltip, and accessibility properties |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
paulirwin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
* GUI: Add Paste button to Java Input pane, paulirwin#136 * GUI: Fix Paste button positioning in file controls row, paulirwin#136 * Update JavaToCSharpGui/Infrastructure/TextClipboard.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Danial Ahmad <108906119+iamdanialahmad@users.noreply.github.com> Co-authored-by: Paul Irwin <paulirwin@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR closes #136 by adding a Paste button to the Java Input pane.
The Paste button allows users to quickly paste and overwrite the Java source input from clipboard without having to manually click into the text editor, select all, and paste. This improves the user experience when quickly testing different Java code snippets.
Changes Made
Backend Changes
GetTextAsync()method to read text from clipboardGetTextAsync()method that retrieves clipboard contentPasteInputcommand that:UI Changes
fa-paste)UI Layout
The Paste button is now positioned in the file controls row.
Usage
Screenshots/Demo
Before - No Paste button:
After - With Paste button:
Demo:

Related Issues
Closes #136