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 auto organize imports action to save action. #402

Merged
merged 3 commits into from
Jan 17, 2018

Conversation

btstream
Copy link
Contributor

@btstream btstream commented Jan 4, 2018

Add a java.saveActions.organizeImports option for auto organize imports to save action.

Signed-off-by: Zichen Liu <btstream@hotmail.com>
…nizeImports`

Signed-off-by: Zichen Liu <btstream@hotmail.com>
Signed-off-by: Zichen Liu <btstream@hotmail.com>
@fbricon fbricon merged commit 7793516 into redhat-developer:master Jan 17, 2018
@fbricon fbricon added this to the End January 2018 milestone Jan 31, 2018
@bonaluo
Copy link

bonaluo commented Aug 6, 2019

There is two ways to use "auto organize imports".

  • First
  1. set "java.saveActions.organizeImports": true,
  2. don't use autosave
  • Second
  1. set "editor.codeActionsOnSave": {"source.organizeImports": true},
  2. set "files.autoSave": "onFocusChange",

The second can use autosave, but only "onFocusChange" or "onWindowChange"

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.

None yet

3 participants