Examples of DetectorFactoryCollection


Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

        }
    }

    public static void main(String args[]) throws Exception {
        FindBugs.setNoAnalysis();
        DetectorFactoryCollection dfc = DetectorFactoryCollection.instance();
        UpdateChecker checker = dfc.getUpdateChecker();
        if (checker.updateChecksGloballyDisabled()) {
            System.out.println("Update checkes are globally disabled");
        }
        URI redirect = checker.getRedirectURL(false);
        if (redirect != null) {
            System.out.println("All update checks redirected to " + redirect);
        }
        checker.writeXml(System.out, dfc.plugins(), "UpdateChecker", true);


    }
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

    engine.setBugReporter(_bugReporter);
    engine.setProject(_findBugsProject);
    engine.setProgressCallback(_bugReporter);

    // add plugins to detector collection
    final DetectorFactoryCollection dfc = FindBugsPreferences.getDetectorFactorCollection();
    engine.setDetectorFactoryCollection(dfc);

    // configure detectors.
    engine.setUserPreferences(_userPrefs);
    return engine;
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

    FindBugsCustomPluginUtil.setDetectorEnabled(plugin, getDetectors(), enabled);
  }


  public void applyDetectors() {
    final DetectorFactoryCollection detectorFactoryCollection = FindBugsPreferences.getDetectorFactorCollection();

    final Iterator<DetectorFactory> iterator = detectorFactoryCollection.factoryIterator();
    while (iterator.hasNext()) {
      final DetectorFactory factory = iterator.next();
      final Plugin plugin = factory.getPlugin();
      final boolean enabledByUser = Boolean.valueOf(getDetectors().get(factory.getShortName()));
      final boolean enable = enabledByUser && plugin.isGloballyEnabled();
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

    //engine.setRankThreshold(99);
    configureFilter(engine);


    // add plugins to detector collection
    final DetectorFactoryCollection factoryCollection = FindBugsPreferences.getDetectorFactorCollection();
    engine.setDetectorFactoryCollection(factoryCollection);

    //engine.excludeBaselineBugs(_userPrefs.getExcludeBugsFiles());
    // configure detectors.
    engine.setUserPreferences(_userPrefs);
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

    return _textArea;
  }


  private void populateAvailableRulesTable() {
    final DetectorFactoryCollection detectorFactoryCollection = FindBugsPreferences.getDetectorFactorCollection();
    for (final Entry<String, String> entry : _preferences.getDetectors().entrySet()) {
      final DetectorFactory factory = detectorFactoryCollection.getFactory(entry.getKey());
      if (factory != null) {
        // Only configure non-hidden factories
        if (factory.isHidden() && !getHiddenCheckBox().isSelected()) {
          continue;
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

                }
            }
        }

        private void addCategoryKey(String argument) {
            DetectorFactoryCollection i18n = DetectorFactoryCollection.instance();

            for (String x : argument.split("[,|]")) {
                for (BugCategory category : i18n.getBugCategoryObjects()) {
                    if (category.getAbbrev().equals(x) || category.getCategory().equals(x)) {
                        this.categoryKey.add(category.getCategory());
                        break;
                    }
                }
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

    private static Collection<SourceLineAnnotation> countWarnings( Collection<BugInstance> warnings,
            @CheckForNull String bugCode,
            int desiredPriority, int rank) {
        Collection<SourceLineAnnotation> matching = new HashSet<SourceLineAnnotation>();
        DetectorFactoryCollection i18n = DetectorFactoryCollection.instance();
        boolean matchPattern = false;
        try {
            i18n.getBugCode(bugCode);
        } catch (IllegalArgumentException e) {
            matchPattern = true;
        }

        if (warnings != null) {
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

                    + edge.getTarget().getFactory().getShortName());
        }
    }

    public static void main(String[] argv) throws Exception {
        DetectorFactoryCollection detectorFactoryCollection = DetectorFactoryCollection.instance();

        ExecutionPlan execPlan = new ExecutionPlan();

        for (String pluginId : argv) {
            Plugin plugin = detectorFactoryCollection.getPluginById(pluginId);
            if (plugin != null) {
                execPlan.addPlugin(plugin);
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

import edu.umd.cs.findbugs.DetectorFactoryCollection;

public abstract class PrintBugDescriptions {
    public void print() throws IOException {
        // Ensure bug patterns are loaded
        DetectorFactoryCollection factories = DetectorFactoryCollection.instance();

        // Find all bug patterns reported by at least one non-disabled detector.
        Collection<BugPattern> enabledPatternSet = new HashSet<BugPattern>();
        for (Iterator<DetectorFactory> i = factories.factoryIterator(); i.hasNext();) {
            DetectorFactory factory = i.next();
            if (isEnabled(factory)) {
                enabledPatternSet.addAll(factory.getReportedBugPatterns());
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.DetectorFactoryCollection

*/
public class GenerateUpdateXml {

    public static void main(String args[]) {
        FindBugs.setNoAnalysis();
        DetectorFactoryCollection dfc = DetectorFactoryCollection.instance();
        for(Plugin p : dfc.plugins()) {
            System.out.println(p.getPluginId());
            System.out.println(p.getReleaseDate());
            System.out.println(p.getVersion());
            System.out.println();

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.