Skip to content

Add missing import on paste#2320

Merged
CsCherrYY merged 2 commits intoeclipse-jdtls:masterfrom
CsCherrYY:cs-paste-imports
Jan 11, 2023
Merged

Add missing import on paste#2320
CsCherrYY merged 2 commits intoeclipse-jdtls:masterfrom
CsCherrYY:cs-paste-imports

Conversation

@CsCherrYY
Copy link
Copy Markdown
Contributor

@CsCherrYY
Copy link
Copy Markdown
Contributor Author

test this please

@CsCherrYY CsCherrYY marked this pull request as ready for review January 6, 2023 06:47
@datho7561
Copy link
Copy Markdown
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.

@CsCherrYY
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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