Search in sources :

Example 11 with Filter

use of edu.umd.cs.findbugs.filter.Filter in project spotbugs by spotbugs.

the class MainFrame method shouldDisplayIssueIgnoringPackagePrefixes.

// @SuppressWarnings({ "SimplifiableIfStatement" })
private boolean shouldDisplayIssueIgnoringPackagePrefixes(BugInstance b) {
    Project project = getProject();
    Filter suppressionFilter = project.getSuppressionFilter();
    if (null == getBugCollection() || suppressionFilter.match(b)) {
        return false;
    }
    return viewFilter.showIgnoringPackagePrefixes(b);
}
Also used : Project(edu.umd.cs.findbugs.Project) Filter(edu.umd.cs.findbugs.filter.Filter)

Example 12 with Filter

use of edu.umd.cs.findbugs.filter.Filter in project spotbugs by spotbugs.

the class BugLoader method addDeadBugMatcher.

static void addDeadBugMatcher(BugCollection bugCollection) {
    if (bugCollection == null || !bugCollection.hasDeadBugs()) {
        return;
    }
    Filter suppressionMatcher = bugCollection.getProject().getSuppressionFilter();
    suppressionMatcher.softAdd(LastVersionMatcher.DEAD_BUG_MATCHER);
}
Also used : Filter(edu.umd.cs.findbugs.filter.Filter)

Aggregations

Filter (edu.umd.cs.findbugs.filter.Filter)12 Matcher (edu.umd.cs.findbugs.filter.Matcher)5 FileFilter (javax.swing.filechooser.FileFilter)4 Project (edu.umd.cs.findbugs.Project)3 JMenuItem (javax.swing.JMenuItem)3 GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 Insets (java.awt.Insets)2 File (java.io.File)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 JButton (javax.swing.JButton)2 JLabel (javax.swing.JLabel)2 JPanel (javax.swing.JPanel)2 JPopupMenu (javax.swing.JPopupMenu)2 JScrollPane (javax.swing.JScrollPane)2 TreeModelEvent (javax.swing.event.TreeModelEvent)2 TreePath (javax.swing.tree.TreePath)2 CompoundMatcher (edu.umd.cs.findbugs.filter.CompoundMatcher)1 FilterActivityNotifier (edu.umd.cs.findbugs.gui2.FilterActivity.FilterActivityNotifier)1