Add Paste button to Java Input pane (#136)#139
Merged
paulirwin merged 3 commits intopaulirwin:masterfrom Dec 9, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
added a commit
to Lancelotbronner/java2csharp
that referenced
this pull request
Dec 11, 2025
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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