Skip to content

Add auto organize imports action to save action.#402

Merged
fbricon merged 3 commits into
redhat-developer:masterfrom
btstream:master
Jan 17, 2018
Merged

Add auto organize imports action to save action.#402
fbricon merged 3 commits into
redhat-developer:masterfrom
btstream:master

Conversation

@btstream

@btstream btstream commented Jan 4, 2018

Copy link
Copy Markdown
Contributor

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

bonaluo commented Aug 6, 2019

Copy link
Copy Markdown

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.

3 participants