Bug 291755 [Filters] Filters implementation and API cleanup
This bug is raised to track reviewing and cleanup of filters API and implementation.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterGroup.java
null),
				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_excludeAll,
						null) };
	}
	public static void setValue(FilterCopy filter, String property, Object value) {
		if (property.equals(FilterTypeUtil.ID)) {
			IFilterDescriptor descriptor;
			if (value instanceof Integer) {
				int selection = ((Integer) value).intValue();
				descriptor = FilterTypeUtil.getDescriptorFromIndex(selection);
			} else
				descriptor = FilterTypeUtil.getDescriptorByName((String) value);
			if (descriptor != null)
				filter.setId(descriptor.getId());
		}
		if (property.equals(FilterTypeUtil.MODE)) {
			int selection = ((Integer) value).intValue();
			int type = filter.getType()
					& ~(IResourceFilter.INCLUDE_ONLY | IResourceFilter.EXCLUDE_ALL);
			if (selection == 0)
				filter.setType(type | IResourceFilter.INCLUDE_ONLY);
			else
				filter.setType(type | IResourceFilter.EXCLUDE_ALL);
		}
		if (property.equals(FilterTypeUtil.TARGET)) {
			int selection = ((Integer) value).intValue();
			int type = filter.getType()
					& ~(IResourceFilter.FILES | IResourceFilter.FOLDERS);
			if (selection == 0)
				filter.setType(type | IResourceFilter.FILES);