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 imports on paste introduces unexpected imports when the file is in wrong package #2442

Closed
CsCherrYY opened this issue Feb 8, 2023 · 0 comments · Fixed by #2455
Assignees
Labels

Comments

@CsCherrYY
Copy link
Contributor

When the copied content declares a wrong package, the users will encounter this bug.

steps to reproduce:

  1. enable add missing imports on paste via editor.experimental.pasteActions.enabled
  2. given project https://github.com/spring-projects/spring-petclinic
  3. create Owner.java in package org.springframework.samples.petclinic.model
  4. copy the content of existing Owner.java in package org.springframework.samples.petclinic.owner, and paste the content into the new created file.
  5. the unexpected imports appear
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants