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

Pasting code into empty file will trigger organize imports #1079

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

NikolasKomonen
Copy link
Contributor

Issue #1075

Signed-off-by: Nikolas Komonen [email protected]

Copy link
Collaborator

@fbricon fbricon left a comment

Choose a reason for hiding this comment

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

You need to limit it to Java files only

@fbricon
Copy link
Collaborator

fbricon commented Sep 28, 2019

There should be a preference to enable or disable this feature

@fbricon
Copy link
Collaborator

fbricon commented Sep 30, 2019

Can you investigate whether it'll be possible to also automatically apply the quickfixes for these 2 errors that'll likely pop up:

  • The declared package "foo.bar" does not match the expected package "org.acme"Java(536871240) -> change package declaration to org.acme
  • The public type Foo must be defined in its own file Java(16777541)-> Rename type to Something (i.e if the code was copied into a file named Something.java)

@fbricon fbricon modified the milestone: Mid October 2019 Oct 3, 2019
@fbricon
Copy link
Collaborator

fbricon commented Oct 4, 2019

when adding a preference, don't forget to update the readme

@NikolasKomonen
Copy link
Contributor Author

@fbricon I updated it with the preference java.paste.organizeImportsOnPaste

README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/settings.ts Outdated Show resolved Hide resolved
Issue redhat-developer#1075

New preference: java.paste.organizeImportsOnPaste

Signed-off-by: Nikolas Komonen <[email protected]>
@NikolasKomonen
Copy link
Contributor Author

@fbricon updated with new preference name

@fbricon fbricon merged commit cab7674 into redhat-developer:master Oct 14, 2019
@fbricon
Copy link
Collaborator

fbricon commented Oct 14, 2019

Thanks @NikolasKomonen !

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

Successfully merging this pull request may close these issues.

2 participants