Package edu.umd.cs.findbugs.config

Examples of edu.umd.cs.findbugs.config.UserPreferences


  }

  private UserPreferences buildFindbugsPreferences(final MavenPluginConfigurationTranslator pluginCfgTranslator)
      throws CoreException {
    log.debug("entering buildFindbugsPreferences");
    final UserPreferences prefs = UserPreferences
        .createDefaultUserPreferences();
    pluginCfgTranslator.setIncludeFilterFiles(prefs);
    pluginCfgTranslator.setExcludeFilterFiles(prefs);
    //pluginCfgTranslator.setBugCatagories(prefs);
    pluginCfgTranslator.setEffort(prefs);
View Full Code Here


     * Disables all unchecked detector factories and enables checked factory
     * detectors, leaving those not in the table unmodified.
     */
    protected void syncUserPreferencesWithTable() {
        TableItem[] itemList = availableFactoriesTableViewer.getTable().getItems();
        UserPreferences currentProps = getCurrentProps();
        for (int i = 0; i < itemList.length; i++) {
            DetectorFactory factory = (DetectorFactory) itemList[i].getData();
            // set enabled if defined in configuration
            currentProps.enableDetector(factory, itemList[i].getChecked());
        }
    }
View Full Code Here

            addBugsAbbreviation(factory);
        }

        availableFactoriesTableViewer.setInput(allAvailableList);
        TableItem[] itemList = availableFactoriesTableViewer.getTable().getItems();
        UserPreferences userPreferences = getCurrentProps();
        for (int i = 0; i < itemList.length; i++) {
            DetectorFactory rule = (DetectorFactory) itemList[i].getData();
            // set enabled if defined in configuration
            if (userPreferences.isDetectorEnabled(rule)) {
                itemList[i].setChecked(true);
            }
        }
    }
View Full Code Here

        this.collection = theCollection;
        this.project = project;
    }

    public void run(IProgressMonitor monitor) throws CoreException {
        UserPreferences userPrefs = FindbugsPlugin.getUserPreferences(project);
        ProjectFilterSettings filterSettings = userPrefs.getFilterSettings();
        IPreferenceStore store = FindbugsPlugin.getPluginPreferences(project);
        for (MarkerParameter mp : mpList) {
            if (mp.markerType == null) {
                continue;
            }
View Full Code Here

        // and false warnings are not being displayed, then we can
        // remove the marker.
        if (!isBug) {
            IProject project = marker.getResource().getProject();
            try {
                UserPreferences userPrefs = FindbugsPlugin.getUserPreferences(project);
                if (!MarkerUtil.shouldDisplayWarning(warning, userPrefs.getFilterSettings())) {
                    if (DEBUG) {
                        System.out.println("Deleting marker for false warning!");
                    }
                    marker.delete();
                }
View Full Code Here

        // disabled to be able to distinguish between default and current value
        // store.setDefault(PROJECT_PROPS_DISABLED, true);
    }

    public static UserPreferences createDefaultUserPreferences() {
        UserPreferences prefs = UserPreferences.createDefaultUserPreferences();
        IPreferenceStore store = FindbugsPlugin.getDefault().getPreferenceStore();
        String categoriesStr = store.getString(DISABLED_CATEGORIES);
        Set<String> ids = decodeIds(categoriesStr);
        for (String categoryId : ids) {
            prefs.getFilterSettings().removeCategory(categoryId);
        }
        prefs.setRunAtFullBuild(false);

        // Do not need, as per default the factory default is used if key is
        // missing
        // TODO later we can use custom workspace settings to disable detectors
        // here
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.config.UserPreferences

Copyright © 2018 www.massapicom. 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.