void (@NotNull Set<String> types) { Set<String> removed = new HashSet<>(Sets.difference(myTypes, types)); Set<String> added = new HashSet<>(Sets.difference(types, myTypes)); myTypes.clear(); myTypes.addAll(types); if (!myTypes.isEmpty()) { initServiceContentListeners(); } Set<String> enableByDefaultTypes = getEnableByDefaultTypes(); myState.configurationTypes.clear(); myState.configurationTypes.addAll(myTypes); myState.configurationTypes.removeAll(enableByDefaultTypes); myState.excludedTypes.clear(); myState.excludedTypes.addAll(enableByDefaultTypes); myState.excludedTypes.removeAll(myTypes); syncConfigurations(); if (!removed.isEmpty()) { moveRemovedContent(getContainsTypeIdCondition(removed)); } if (!added.isEmpty()) { moveAddedContent(getContainsTypeIdCondition(added)); } updateDashboard(true); }