mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-62859 "Reformat code"/"Optimize imports" aplies on whole project if dialog is disabled.
Added control flow branching for 'reformat' action in case of various target types (file vs directory)
This commit is contained in:
@@ -168,7 +168,12 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
|
||||
}
|
||||
|
||||
if (optimizeImports && range == null) {
|
||||
new ReformatAndOptimizeImportsProcessor(project, file).run();
|
||||
if (file != null || dir == null) {
|
||||
new ReformatAndOptimizeImportsProcessor(project, file).run();
|
||||
}
|
||||
else {
|
||||
new ReformatAndOptimizeImportsProcessor(project, dir, true).run();
|
||||
}
|
||||
}
|
||||
else {
|
||||
new ReformatCodeProcessor(project, file, range).run();
|
||||
|
||||
Reference in New Issue
Block a user