Source:
private ProblemFilter newFilter(IConfigurationElement element) { ProblemFilter filter = new ProblemFilter(element.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_NAME)); filter.createContributionFrom(element); String enabledValue = element.getAttribute(ENABLED); filter.setEnabled(enabledValue == null || Boolean.valueOf(enabledValue).booleanValue()); int scopeValue = getScopeValue(element); if (scopeValue >= 0) { filter.setOnResource(scopeValue); } String description = element.getAttribute(DESCRIPTION); if (description != null) { boolean contains = true; if (description.charAt(0) == '!') { description = description.substring(1, description.length()); contains = false; } filter.setContains(contains); filter.setDescription(description); } int severityValue = getSeverityValue(element); if (severityValue > 0) { filter.setSelectBySeverity(true); filter.setSeverity(severityValue); } else { filter.setSelectBySeverity(false); } List<MarkerType> selectedTypes = new ArrayList<>(); for (IConfigurationElement configElement : element.getChildren(SELECTED_TYPE)) { String markerId = configElement.getAttribute(MARKER_ID); if (markerId != null) { MarkerType type = filter.getMarkerType(markerId); if (type == null) { IStatus status = new Status(IStatus.WARNING, IDEWorkbenchPlugin.IDE_WORKBENCH, IStatus.WARNING, NLS.bind(MarkerMessages.ProblemFilterRegistry_nullType, new Object[] { markerId, filter.getName() }), null); IDEWorkbenchPlugin.getDefault().getLog().log(status); } else { selectedTypes.add(type); } } } if (selectedTypes.size() > 0) { filter.setSelectedTypes(selectedTypes); } return filter; }

Target:
private ProblemFilter newFilter(IConfigurationElement element) { ProblemFilter filter = new ProblemFilter(element.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_NAME)); filter.createContributionFrom(element); String enabledValue = element.getAttribute(ENABLED); filter.setEnabled(enabledValue == null || Boolean.valueOf(enabledValue).booleanValue()); int scopeValue = getScopeValue(element); if (scopeValue >= 0) { filter.setOnResource(scopeValue); } String description = element.getAttribute(DESCRIPTION); if (description != null) { boolean contains = true; if (description.charAt(0) == '!') { description = description.substring(1, description.length()); contains = false; } filter.setContains(contains); filter.setDescription(description); } int severityValue = getSeverityValue(element); if (severityValue > 0) { filter.setSelectBySeverity(true); filter.setSeverity(severityValue); } else { filter.setSelectBySeverity(false); } List<MarkerType> selectedTypes = new ArrayList<>(); for (IConfigurationElement type : element.getChildren(SELECTED_TYPE)) { String markerId = type.getAttribute(MARKER_ID); if (markerId != null) { MarkerType markerType = filter.getMarkerType(markerId); if (markerType == null) { IStatus status = new Status(IStatus.WARNING, IDEWorkbenchPlugin.IDE_WORKBENCH, IStatus.WARNING, NLS.bind(MarkerMessages.ProblemFilterRegistry_nullType, new Object[] { markerId, filter.getName() }), null); IDEWorkbenchPlugin.getDefault().getLog().log(status); } else { selectedTypes.add(markerType); } } } if (selectedTypes.size() > 0) { filter.setSelectedTypes(selectedTypes); } return filter; }