Bug 137893 [Markers] Filtering ion Problems view should allow "ANDing" filter conditions
I am trying to make use of the filter settings in ProblemView, but apparently the misc. filters are OR-ed. I want to filter away several types of warnings but can't do so, because conditions are apparently OR'ed instead of AND-ed. Usecase: I don't want to see warnings that contain the substring "(The field <foo>).COPYRIGHT is never read locally" nor warnings containing "(The field <foo>).COPYRIGHT is hiding a field from type (<bar>)" (note: the parts in bracket I only included for clarity. My filters of course only specify the parts outside the brackets). I realize that I could specify a single filter just using ".COPYRIGHT is" but that might inadvertedly also hide other warnings that I might be interested in. And occasionally I also would like to enable additional filters like "<foo> should be tagged with @Override since ..." or "... is emulated by a synthetic aceessor method. Increasing its visibility will improve ...". Changing filters is easier and quicker for such temporary adaptations than changing compilation pref's and rebuilding everything. Michael
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/provisional/views/markers/MarkerContentGenerator.java
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.XMLMemento;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.internal.provisional.views.markers.api.FilterConfigurationArea;
import org.eclipse.ui.internal.provisional.views.markers.api.MarkerField;
import org.eclipse.ui.internal.provisional.views.markers.api.MarkerItem;
import org.eclipse.ui.internal.provisional.views.markers.api.MarkerSupportConstants;
import org.eclipse.ui.statushandlers.StatusManager;
import org.eclipse.ui.views.markers.internal.MarkerGroup;
import org.eclipse.ui.views.markers.internal.MarkerMessages;
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
import org.eclipse.ui.views.markers.internal.MarkerType;
import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
import org.eclipse.ui.views.markers.internal.Util;
/**
 * MarkerContentGenerator is the representation of the markerContentGenerator
 * extension point.
 * 
 * @since 3.4
 * 
 */
public class MarkerContentGenerator {