Bug 221337 [Markers] MarkerItem has too much API
We are exposing too much as API in MarkerItem. We should only provide getAtttributeValue and the methods that support PATH_ATTRIBUTE and NAME_ATTRIBUTE as they are tricky. Everything else needs to be pushed down to an internal class. We should mention the relevant IMarker constants for those removed.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java
XMLMemento memento = XMLMemento.createWriteRoot(TAG_FILTERS_SECTION);
		writeFiltersSettings(memento);
		StringWriter writer = new StringWriter();
		try {
			memento.save(writer);
		} catch (IOException e) {
			IDEWorkbenchPlugin.getDefault().getLog().log(Util.errorStatus(e));
		}
		IDEWorkbenchPlugin.getDefault().getPreferenceStore().putValue(
				getMementoPreferenceName(), writer.toString());
		IDEWorkbenchPlugin.getDefault().savePluginPreferences();
	}
	/**
	 * Write the settings for the filters to the memento.
	 * 
	 * @param memento
	 */
	private void writeFiltersSettings(XMLMemento memento) {
		memento.putBoolean(TAG_AND, andFilters);
		Iterator groups = getAllFilters().iterator();
		while (groups.hasNext()) {
			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
					.next();
			IMemento child = memento
					.createChild(TAG_GROUP_ENTRY, group.getID());
			group.saveFilterSettings(child);
		}
	}
}