Skip to content
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

Add missing import on paste #2320

Merged
merged 2 commits into from
Jan 11, 2023
Merged

Conversation

CsCherrYY
Copy link
Contributor

@CsCherrYY
Copy link
Contributor Author

test this please

Signed-off-by: Shi Chen <chenshi@microsoft.com>
@CsCherrYY CsCherrYY marked this pull request as ready for review January 6, 2023 06:47
@datho7561
Copy link
Contributor

If I have a Java file, and I put my cursor after the main class declaration, then I add a newline and attempt to paste without saving, nothing ends up being pasted.

Signed-off-by: Shi Chen <chenshi@microsoft.com>
@CsCherrYY
Copy link
Contributor Author

If I have a Java file, and I put my cursor after the main class declaration, then I add a newline and attempt to paste without saving, nothing ends up being pasted.

👍, I can reproduce this issue, fixed in e88736a

Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me!

@CsCherrYY
Copy link
Contributor Author

@datho7561 thanks for reviewing! And I have another concern, should we surrond https://github.com/redhat-developer/vscode-java/blob/7738468875332c3a94f5b62a88ff2ede67aa49eb/src/pasteEventHandler.ts#L92 with a try-catch to avoid the possible bugs in the server side? (when unexpected exception throws, the client side can fall back to paste the original text directly, so that the server bug will not block users)

@datho7561
Copy link
Contributor

I think that that's a good idea, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants