FlattenModulesToggleAction () { return new FlattenModulesToggleAction(myProject, () -> mySettings.UI_SHOW_MODULES, () -> !mySettings.UI_SHOW_MODULE_GROUPS, (value) -> { DependencyUISettings.getInstance().UI_SHOW_MODULE_GROUPS = !value; mySettings.UI_SHOW_MODULE_GROUPS = !value; rebuild(); }); }