void (@Nullable Runnable onDone) { model.onValidThread(() -> { root.childrenValid = false; LOG.debug("whole structure changed"); ViewSettings settings = root.getSettings(); boolean isShowExcludedFiles = false; if (settings instanceof ProjectViewSettings && ((ProjectViewSettings)settings).isShowExcludedFiles()) { NamedScopeFilter filter = getFilter(); Class<? extends NamedScope> type = filter == null ? null : filter.getScope().getClass(); isShowExcludedFiles = !NamedScope.class.equals(type); // disable excluded files for custom scopes } model.setSettings(isShowExcludedFiles, PlatformUtils.isIntelliJ() && settings.isShowModules()); treeStructureChanged(null, null, null); if (onDone != null) onDone.run(); }); }