buildSearchIndexIfNecessary();
}
public PersistencePreferencesBean getState() {
final PersistencePreferencesBean preferencesBean = new PersistencePreferencesBean();
if (_preferences == null) {
_preferences = getDefaultPreferences();
}
//noinspection ForLoopWithMissingComponent
for (final Enumeration<?> confNames = _preferences.propertyNames(); confNames.hasMoreElements();) {
final String elementName = (String) confNames.nextElement();
preferencesBean.getBasePreferences().put(elementName, _preferences.getProperty(elementName));
}
preferencesBean.getDetectors().putAll(_preferences.getDetectors());
preferencesBean.getBugCategories().putAll(_preferences.getBugCategories());
preferencesBean.getIncludeFilters().addAll(_preferences.getIncludeFilters());
preferencesBean.getExcludeFilters().addAll(_preferences.getExcludeFilters());
preferencesBean.getExcludeBaselineBugs().addAll(_preferences.getExcludeBaselineBugs());
preferencesBean.getPlugins().addAll(_preferences.getPlugins());
preferencesBean.getEnabledUserPluginIds().addAll(_preferences.getEnabledUserPluginIds());
preferencesBean.getDisabledUserPluginIds().addAll(_preferences.getDisabledUserPluginIds());
preferencesBean.getEnabledBundledPluginIds().addAll(_preferences.getEnabledBundledPluginIds());
preferencesBean.getDisabledBundledPluginIds().addAll(_preferences.getDisabledBundledPluginIds());
preferencesBean.getEnabledModuleConfigs().addAll(_preferences.getEnabledModuleConfigs());
preferencesBean.setAnnotationSuppressWarningsClass(_preferences.getAnnotationSuppressWarningsClass());
preferencesBean.setAnnotationGutterIconEnabled(_preferences.isAnnotationGutterIconEnabled());
preferencesBean.setAnnotationTextRangeMarkupEnabled(_preferences.isAnnotationTextRangeMarkupEnabled());
preferencesBean.setAnnotationTypeSettings(_preferences.getFlattendAnnotationTypeSettings());
return preferencesBean;
}