ExcludesConfigurationState () { final ExcludesConfigurationState state = new ExcludesConfigurationState(); state.setDetectionEnabled(myEnabledDetectionCheckBox.isSelected()); for (ExcludeListItem item : myModel.getItems()) { final String url = item.getFileUrl(); final String typeId = item.getFrameworkTypeId(); if (url == null) { state.getFrameworkTypes().add(typeId); } else { state.getFiles().add(new ExcludedFileState(url, typeId)); } } return state; }